public class FunctionQuery extends Query
ValueSourceScorer
Modifier and Type | Class and Description |
---|---|
protected class |
FunctionQuery.AllScorer |
protected class |
FunctionQuery.FunctionWeight |
Modifier and Type | Field and Description |
---|---|
(package private) ValueSource |
func |
Constructor and Description |
---|
FunctionQuery(ValueSource func) |
Modifier and Type | Method and Description |
---|---|
Weight |
createWeight(IndexSearcher searcher,
ScoreMode scoreMode,
float boost)
Expert: Constructs an appropriate Weight implementation for this query.
|
boolean |
equals(java.lang.Object other)
Returns true if
o is equal to this. |
ValueSource |
getValueSource() |
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
java.lang.String |
toString(java.lang.String field)
Prints a user-readable version of this query.
|
void |
visit(QueryVisitor visitor)
Recurse through the query tree, visiting any child queries
|
classHash, rewrite, sameClassAs, toString
final ValueSource func
public FunctionQuery(ValueSource func)
func
- defines the function to be used for scoringpublic ValueSource getValueSource()
public void visit(QueryVisitor visitor)
Query
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws java.io.IOException
Query
Only implemented by primitive queries, which re-write to themselves.
createWeight
in class Query
scoreMode
- How the produced scorers will be consumed.boost
- The boost that is propagated by the parent queries.java.io.IOException
public java.lang.String toString(java.lang.String field)
public boolean equals(java.lang.Object other)
o
is equal to this.equals
in class Query
Query.sameClassAs(Object)
,
Query.classHash()
public int hashCode()
Query
QueryCache
works properly.hashCode
in class Query
Query.equals(Object)