Package org.apache.lucene.document
Class IntRangeDocValuesField
java.lang.Object
org.apache.lucene.document.Field
org.apache.lucene.document.BinaryDocValuesField
org.apache.lucene.document.BinaryRangeDocValuesField
org.apache.lucene.document.IntRangeDocValuesField
- All Implemented Interfaces:
IndexableField
DocValues field for IntRange. This is a single valued field per document due to being an
extension of BinaryDocValuesField.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.document.Field
Field.Store
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final String
(package private) final int[]
(package private) final int[]
Fields inherited from class org.apache.lucene.document.BinaryRangeDocValuesField
numBytesPerDimension, numDims, packedValue
Fields inherited from class org.apache.lucene.document.BinaryDocValuesField
TYPE
Fields inherited from class org.apache.lucene.document.Field
fieldsData, name, tokenStream, type
-
Constructor Summary
ConstructorsConstructorDescriptionIntRangeDocValuesField
(String field, int[] min, int[] max) Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
checkArgs
(int[] min, int[] max) validate the argumentsint
getMax
(int dimension) Get the maximum value for the given dimension.int
getMin
(int dimension) Get the minimum value for the given dimension.static Query
newSlowIntersectsQuery
(String field, int[] min, int[] max) Create a new range query that finds all ranges that intersect using doc values.private static Query
newSlowRangeQuery
(String field, int[] min, int[] max, RangeFieldQuery.QueryType queryType) Methods inherited from class org.apache.lucene.document.Field
binaryValue, fieldType, getCharSequenceValue, name, numericValue, readerValue, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setReaderValue, setShortValue, setStringValue, setTokenStream, stringValue, tokenStream, tokenStreamValue, toString
-
Field Details
-
field
-
min
final int[] min -
max
final int[] max
-
-
Constructor Details
-
IntRangeDocValuesField
Sole constructor.
-
-
Method Details
-
getMin
public int getMin(int dimension) Get the minimum value for the given dimension. -
getMax
public int getMax(int dimension) Get the maximum value for the given dimension. -
newSlowRangeQuery
private static Query newSlowRangeQuery(String field, int[] min, int[] max, RangeFieldQuery.QueryType queryType) -
newSlowIntersectsQuery
Create a new range query that finds all ranges that intersect using doc values. NOTE: This doesn't leverage indexing and may be slow. -
checkArgs
private static void checkArgs(int[] min, int[] max) validate the arguments
-