Package org.apache.lucene.sandbox.search
Class DocValuesNumbersQuery
java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.sandbox.search.DocValuesNumbersQuery
- All Implemented Interfaces:
Accountable
Like
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.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Constructor Summary
ConstructorDescriptionDocValuesNumbersQuery
(String field, long[] numbers) DocValuesNumbersQuery
(String field, Long... numbers) DocValuesNumbersQuery
(String field, Collection<Long> numbers) -
Method Summary
Modifier and TypeMethodDescriptioncreateWeight
(IndexSearcher searcher, ScoreMode scoreMode, float boost) boolean
getField()
int
hashCode()
long
void
visit
(QueryVisitor visitor) Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Constructor Details
-
DocValuesNumbersQuery
-
DocValuesNumbersQuery
-
DocValuesNumbersQuery
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
visit
-
getField
-
getNumbers
-
toString
-
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsed
in interfaceAccountable
-
createWeight
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException - Overrides:
createWeight
in classQuery
- Throws:
IOException
-