- java.lang.Object
-
- org.apache.lucene.document.Field
-
- org.apache.lucene.document.BinaryDocValuesField
-
- org.apache.lucene.document.BinaryRangeDocValuesField
-
- org.apache.lucene.document.DoubleRangeDocValuesField
-
- All Implemented Interfaces:
IndexableField
public class DoubleRangeDocValuesField extends BinaryRangeDocValuesField
DocValues field for DoubleRange. This is a single valued field i.e. can have only one value 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
Fields Modifier and Type Field Description (package private) java.lang.String
field
(package private) double[]
max
(package private) double[]
min
-
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
Constructors Constructor Description DoubleRangeDocValuesField(java.lang.String field, double[] min, double[] max)
Sole constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static void
checkArgs(double[] min, double[] max)
validate the argumentsdouble
getMax(int dimension)
Get the maximum value for the given dimension.double
getMin(int dimension)
Get the minimum value for the given dimension.static Query
newSlowIntersectsQuery(java.lang.String field, double[] min, double[] max)
Create a new range query that finds all ranges that intersect using doc values.private static Query
newSlowRangeQuery(java.lang.String field, double[] min, double[] max, RangeFieldQuery.QueryType queryType)
-
Methods inherited from class org.apache.lucene.document.Field
binaryValue, fieldType, getCharSequenceValue, invertableType, name, numericValue, readerValue, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setReaderValue, setShortValue, setStringValue, setTokenStream, storedValue, stringValue, tokenStream, tokenStreamValue, toString
-
-
-
-
Method Detail
-
getMin
public double getMin(int dimension)
Get the minimum value for the given dimension.
-
getMax
public double getMax(int dimension)
Get the maximum value for the given dimension.
-
newSlowRangeQuery
private static Query newSlowRangeQuery(java.lang.String field, double[] min, double[] max, RangeFieldQuery.QueryType queryType)
-
newSlowIntersectsQuery
public static Query newSlowIntersectsQuery(java.lang.String field, double[] min, double[] max)
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(double[] min, double[] max)
validate the arguments
-
-