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 aDoubleValues
value 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 Weight
createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)
boolean
equals(Object o)
int
hashCode()
String
toString(String field)
void
visit(QueryVisitor visitor)
-
Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
-
-
-
-
Constructor Detail
-
FunctionMatchQuery
public FunctionMatchQuery(DoubleValuesSource source, DoublePredicate filter)
Create a FunctionMatchQuery with default TwoPhaseIterator matchCost -DEFAULT_MATCH_COST
= 100.0f- Parameters:
source
- aDoubleValuesSource
to use for valuesfilter
- the predicate to match against
-
FunctionMatchQuery
public FunctionMatchQuery(DoubleValuesSource source, DoublePredicate filter, float matchCost)
Create a FunctionMatchQuery- Parameters:
source
- aDoubleValuesSource
to 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:
createWeight
in classQuery
- Throws:
IOException
-
-