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 other)
Override and implement query instance equivalence properly in a subclass.
|
String |
getField() |
Set<Long> |
getNumbers() |
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
String |
toString(String defaultField)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
classHash, rewrite, sameClassAs, toStringpublic boolean equals(Object other)
QueryQueryCache works properly.
Typically a query will be equal to another only if it's an instance of
the same class and its document-filtering properties are identical that other
instance. Utility methods are provided for certain repetitive code.equals in class QueryQuery.sameClassAs(Object),
Query.classHash()public int hashCode()
QueryQueryCache works properly.hashCode in class QueryQuery.equals(Object)public String getField()
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.