Class FunctionMatchQuery
java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.queries.function.FunctionMatchQuery
A query that retrieves all documents with a
DoubleValues value matching a predicate
This query works by a linear scan of the index, and is best used in conjunction with other queries that can restrict the number of documents visited
-
Constructor Summary
ConstructorsConstructorDescriptionFunctionMatchQuery(DoubleValuesSource source, DoublePredicate filter) Create a FunctionMatchQuery with default TwoPhaseIterator matchCost -DEFAULT_MATCH_COST= 100.0fFunctionMatchQuery(DoubleValuesSource source, DoublePredicate filter, float matchCost) Create a FunctionMatchQuery -
Method Summary
Modifier and TypeMethodDescriptioncreateWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) booleaninthashCode()voidvisit(QueryVisitor visitor) Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
-
Constructor Details
-
FunctionMatchQuery
Create a FunctionMatchQuery with default TwoPhaseIterator matchCost -DEFAULT_MATCH_COST= 100.0f- Parameters:
source- aDoubleValuesSourceto use for valuesfilter- the predicate to match against
-
FunctionMatchQuery
Create a FunctionMatchQuery- Parameters:
source- aDoubleValuesSourceto use for valuesfilter- the predicate to match againstmatchCost- to be returned byTwoPhaseIterator.matchCost()
-
-
Method Details
-
toString
-
visit
-
createWeight
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException - Overrides:
createWeightin classQuery- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-