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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Scores all documents, applying the function to each documentprotected class
Creates FunctionQuery scorer instances -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateWeight
(IndexSearcher searcher, ScoreMode scoreMode, float boost) Expert: Constructs an appropriate Weight implementation for this query.boolean
Returns true ifo
is equal to this.int
hashCode()
Override and implement query hash code properly in a subclass.Prints a user-readable version of this query.void
visit
(QueryVisitor visitor) Recurse through the query tree, visiting any child queries.
-
Field Details
-
func
-
-
Constructor Details
-
FunctionQuery
- Parameters:
func
- defines the function to be used for scoring
-
-
Method Details
-
getValueSource
- Returns:
- The associated ValueSource
-
visit
Description copied from class:Query
Recurse through the query tree, visiting any child queries. -
createWeight
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException Description copied from class:Query
Expert: Constructs an appropriate Weight implementation for this query.Only implemented by primitive queries, which re-write to themselves.
- Overrides:
createWeight
in classQuery
scoreMode
- How the produced scorers will be consumed.boost
- The boost that is propagated by the parent queries.- Throws:
IOException
-
toString
Prints a user-readable version of this query. -
equals
Returns true ifo
is equal to this. -
hashCode
public int hashCode()Description copied from class:Query
Override and implement query hash code properly in a subclass. This is required so thatQueryCache
works properly.
-