public class FunctionQuery extends Query
ValueSourceScorer| Modifier and Type | Class and Description |
|---|---|
protected class |
FunctionQuery.AllScorer |
protected class |
FunctionQuery.FunctionWeight |
| 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(Object other)
Returns true if
o is equal to this. |
ValueSource |
getValueSource() |
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
String |
toString(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, toStringpublic FunctionQuery(ValueSource func)
func - defines the function to be used for scoringpublic ValueSource getValueSource()
public void visit(QueryVisitor visitor)
Querypublic Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
QueryOnly implemented by primitive queries, which re-write to themselves.
createWeight in class QueryscoreMode - How the produced scorers will be consumed.boost - The boost that is propagated by the parent queries.IOExceptionpublic boolean equals(Object other)
o is equal to this.equals in class QueryQuery.sameClassAs(Object),
Query.classHash()public int hashCode()
QueryQueryCache works properly.hashCode in class QueryQuery.equals(Object)Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.