Class FunctionMatchQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.queries.function.FunctionMatchQuery
-
public final class FunctionMatchQuery extends Query
A query that retrieves all documents with aDoubleValuesvalue matching a predicateThis 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
Constructors Constructor Description FunctionMatchQuery(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WeightcreateWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)booleanequals(Object o)inthashCode()StringtoString(String field)voidvisit(QueryVisitor visitor)
-
-
-
Constructor Detail
-
FunctionMatchQuery
public FunctionMatchQuery(DoubleValuesSource source, DoublePredicate filter)
Create a FunctionMatchQuery with default TwoPhaseIterator matchCost -DEFAULT_MATCH_COST= 100.0f- Parameters:
source- aDoubleValuesSourceto use for valuesfilter- the predicate to match against
-
FunctionMatchQuery
public FunctionMatchQuery(DoubleValuesSource source, DoublePredicate filter, float matchCost)
Create a FunctionMatchQuery- Parameters:
source- aDoubleValuesSourceto use for valuesfilter- the predicate to match againstmatchCost- to be returned byTwoPhaseIterator.matchCost()
-
-
Method Detail
-
visit
public void visit(QueryVisitor visitor)
-
createWeight
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
- Overrides:
createWeightin classQuery- Throws:
IOException
-
-