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
Modifier and TypeClassDescriptionprotected class
Scores all documents, applying the function to each documentprotected class
Creates FunctionQuery scorer instances -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateWeight
(IndexSearcher searcher, ScoreMode scoreMode, float boost) boolean
Returns true ifo
is equal to this.int
hashCode()
Prints a user-readable version of this query.void
visit
(QueryVisitor visitor)
-
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:
createWeight
in classQuery
- Throws:
IOException
-
toString
Prints a user-readable version of this query. -
equals
Returns true ifo
is equal to this. -
hashCode
public int hashCode()
-