public class FunctionRangeQuery extends Query
ValueSource
that matches docs in which the values in the value source match a configured
range. The score is the float value. This can be a slow query if run by itself since it must visit all docs;
ideally it's combined with other queries.
It's mostly a wrapper around
FunctionValues.getRangeScorer(Weight, LeafReaderContext, String, String, boolean, boolean)
.
A similar class is org.apache.lucene.search.DocValuesRangeQuery
in the sandbox module. That one is
constant scoring.(constant scoring)
Constructor and Description |
---|
FunctionRangeQuery(ValueSource valueSource,
Number lowerVal,
Number upperVal,
boolean includeLower,
boolean includeUpper) |
FunctionRangeQuery(ValueSource valueSource,
String lowerVal,
String upperVal,
boolean includeLower,
boolean includeUpper) |
Modifier and Type | Method and Description |
---|---|
Weight |
createWeight(IndexSearcher searcher,
ScoreMode scoreMode,
float boost) |
boolean |
equals(Object other) |
String |
getLowerVal() |
String |
getUpperVal() |
ValueSource |
getValueSource() |
int |
hashCode() |
boolean |
isIncludeLower() |
boolean |
isIncludeUpper() |
String |
toString(String field) |
void |
visit(QueryVisitor visitor) |
classHash, rewrite, sameClassAs, toString
public FunctionRangeQuery(ValueSource valueSource, Number lowerVal, Number upperVal, boolean includeLower, boolean includeUpper)
public FunctionRangeQuery(ValueSource valueSource, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper)
public ValueSource getValueSource()
public String getLowerVal()
public String getUpperVal()
public boolean isIncludeLower()
public boolean isIncludeUpper()
public void visit(QueryVisitor visitor)
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
createWeight
in class Query
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.