java.lang.Object
org.apache.lucene.document.Field
org.apache.lucene.document.BinaryDocValuesField
org.apache.lucene.document.BinaryRangeDocValuesField
org.apache.lucene.document.FloatRangeDocValuesField
- All Implemented Interfaces:
IndexableField
DocValues field for FloatRange. 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 float[](package private) final float[]Fields inherited from class org.apache.lucene.document.BinaryRangeDocValuesField
numBytesPerDimension, numDims, packedValueFields inherited from class org.apache.lucene.document.BinaryDocValuesField
TYPEFields inherited from class org.apache.lucene.document.Field
fieldsData, name, tokenStream, type -
Constructor Summary
ConstructorsConstructorDescriptionFloatRangeDocValuesField(String field, float[] min, float[] max) Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcheckArgs(float[] min, float[] max) validate the argumentsfloatgetMax(int dimension) Get the maximum value for the given dimension.floatgetMin(int dimension) Get the minimum value for the given dimension.static QuerynewSlowIntersectsQuery(String field, float[] min, float[] max) Create a new range query that finds all ranges that intersect using doc values.private static QuerynewSlowRangeQuery(String field, float[] min, float[] 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
-
Field Details
-
field
-
min
final float[] min -
max
final float[] max
-
-
Constructor Details
-
FloatRangeDocValuesField
Sole constructor.
-
-
Method Details
-
getMin
public float getMin(int dimension) Get the minimum value for the given dimension. -
getMax
public float getMax(int dimension) Get the maximum value for the given dimension. -
newSlowRangeQuery
private static Query newSlowRangeQuery(String field, float[] min, float[] 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.- See Also:
-
checkArgs
private static void checkArgs(float[] min, float[] max) validate the arguments
-