Package org.apache.lucene.search
Class DocValuesNumbersQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.search.DocValuesNumbersQuery
-
public class DocValuesNumbersQuery extends Query
LikeDocValuesTermsQuery
, but this query only runs on a longNumericDocValuesField
or aSortedNumericDocValuesField
, matching all documents whose value in the specified field is contained in the provided set of long values.NOTE: be very careful using this query: it is typically much slower than using
TermsQuery
, but in certain specialized cases may be faster.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description DocValuesNumbersQuery(String field, long[] numbers)
DocValuesNumbersQuery(String field, Long... numbers)
DocValuesNumbersQuery(String field, Collection<Long> numbers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Weight
createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)
boolean
equals(Object other)
String
getField()
Set<Long>
getNumbers()
int
hashCode()
String
toString(String defaultField)
void
visit(QueryVisitor visitor)
-
Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
-
-
-
-
Method Detail
-
visit
public void visit(QueryVisitor visitor)
-
getField
public String getField()
-
createWeight
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
- Overrides:
createWeight
in classQuery
- Throws:
IOException
-
-