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,
Collection<Long> numbers) |
DocValuesNumbersQuery(String field,
Long... numbers) |
DocValuesNumbersQuery(String field,
long[] numbers) |
Modifier and Type | Method and Description |
---|---|
Weight |
createWeight(IndexSearcher searcher,
boolean needsScores,
float boost) |
boolean |
equals(Object other) |
String |
getField() |
Set<Long> |
getNumbers() |
int |
hashCode() |
String |
toString(String defaultField) |
classHash, rewrite, sameClassAs, toString
public DocValuesNumbersQuery(String field, long[] numbers)
public DocValuesNumbersQuery(String field, Collection<Long> numbers)
public String getField()
public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException
createWeight
in class Query
IOException
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.