Class FunctionQuery
java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.queries.function.FunctionQuery
Returns a score for each document based on a ValueSource, often some function of the value of a
field.
- See Also:
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classScores all documents, applying the function to each documentprotected classCreates FunctionQuery scorer instances -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) booleanReturns true ifois equal to this.inthashCode()Prints a user-readable version of this query.voidvisit(QueryVisitor visitor) Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
-
Constructor Details
-
FunctionQuery
- Parameters:
func- defines the function to be used for scoring
-
-
Method Details
-
getValueSource
- Returns:
- The associated ValueSource
-
visit
-
createWeight
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException - Overrides:
createWeightin classQuery- Throws:
IOException
-
toString
Prints a user-readable version of this query. -
equals
Returns true ifois equal to this. -
hashCode
public int hashCode()
-