public class DocValuesNumbersQuery extends Query
DocValuesTermsQuery, but this query only
runs on a long NumericDocValuesField or a
SortedNumericDocValuesField, 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.
| Constructor and Description |
|---|
DocValuesNumbersQuery(String field,
Long... numbers) |
DocValuesNumbersQuery(String field,
Set<Long> numbers) |
| Modifier and Type | Method and Description |
|---|---|
Weight |
createWeight(IndexSearcher searcher,
boolean needsScores)
Expert: Constructs an appropriate Weight implementation for this query.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString(String defaultField)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
public String toString(String defaultField)
Queryfield assumed to be the
default field and omitted.public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException
QueryOnly implemented by primitive queries, which re-write to themselves.
createWeight in class QueryneedsScores - True if document scores (Scorer.score()) or match
frequencies (Scorer.freq()) are needed.IOExceptionCopyright © 2000-2017 The Apache Software Foundation. All Rights Reserved.