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,
boolean needsScores)
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.
|
classHash, rewrite, sameClassAs, toString
public FunctionQuery(ValueSource func)
func
- defines the function to be used for scoringpublic ValueSource getValueSource()
public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException
Query
Only implemented by primitive queries, which re-write to themselves.
createWeight
in class Query
needsScores
- True if document scores (Scorer.score()
) or match
frequencies (Scorer.freq()
) are needed.IOException
public boolean equals(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)
Copyright © 2000–2017 The Apache Software Foundation. All rights reserved.