Class SortedNumericDVIndexFieldData
java.lang.Object
org.elasticsearch.index.fielddata.plain.DocValuesIndexFieldData
org.elasticsearch.index.fielddata.plain.SortedNumericDVIndexFieldData
- All Implemented Interfaces:
IndexFieldData<AtomicNumericFieldData>,IndexNumericFieldData,IndexComponent
public class SortedNumericDVIndexFieldData extends DocValuesIndexFieldData implements IndexNumericFieldData
FieldData backed by
LeafReader.getSortedNumericDocValues(String)- See Also:
DocValuesType.SORTED_NUMERIC
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSortedNumericDVIndexFieldData.NanoSecondFieldDataA small helper class that can be configured to load nanosecond field data either in nanosecond resolution retaining the original values or in millisecond resolution converting the nanosecond values to millisecondsNested classes/interfaces inherited from class org.elasticsearch.index.fielddata.plain.DocValuesIndexFieldData
DocValuesIndexFieldData.BuilderNested classes/interfaces inherited from interface org.elasticsearch.index.fielddata.IndexFieldData
IndexFieldData.Builder, IndexFieldData.Global<FD extends AtomicFieldData>, IndexFieldData.XFieldComparatorSourceNested classes/interfaces inherited from interface org.elasticsearch.index.fielddata.IndexNumericFieldData
IndexNumericFieldData.NumericType -
Field Summary
Fields inherited from class org.elasticsearch.index.fielddata.plain.DocValuesIndexFieldData
fieldName, index -
Constructor Summary
Constructors Constructor Description SortedNumericDVIndexFieldData(Index index, java.lang.String fieldNames, IndexNumericFieldData.NumericType numericType) -
Method Summary
Modifier and Type Method Description IndexNumericFieldData.NumericTypegetNumericType()AtomicNumericFieldDataload(org.apache.lucene.index.LeafReaderContext context)Loads the atomic field data for the reader, possibly cached.AtomicNumericFieldDataloadDirect(org.apache.lucene.index.LeafReaderContext context)Loads directly the atomic field data for the reader, ignoring any caching involved.org.apache.lucene.search.SortFieldsortField(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)Returns theSortFieldto use for sorting.org.apache.lucene.search.SortFieldsortField(IndexNumericFieldData.NumericType targetNumericType, java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)Returns theSortFieldto used for sorting.Methods inherited from class org.elasticsearch.index.fielddata.plain.DocValuesIndexFieldData
clear, clear, getFieldName, indexMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.index.fielddata.IndexFieldData
clear, getFieldName
-
Constructor Details
-
SortedNumericDVIndexFieldData
public SortedNumericDVIndexFieldData(Index index, java.lang.String fieldNames, IndexNumericFieldData.NumericType numericType)
-
-
Method Details
-
sortField
public org.apache.lucene.search.SortField sortField(IndexNumericFieldData.NumericType targetNumericType, java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)Returns theSortFieldto used for sorting. Values are casted to the providedtargetNumericTypetype if it doesn't match the field'snumericType. -
sortField
public org.apache.lucene.search.SortField sortField(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)Description copied from interface:IndexFieldDataReturns theSortFieldto use for sorting.- Specified by:
sortFieldin interfaceIndexFieldData<AtomicNumericFieldData>
-
getNumericType
- Specified by:
getNumericTypein interfaceIndexNumericFieldData
-
loadDirect
public AtomicNumericFieldData loadDirect(org.apache.lucene.index.LeafReaderContext context) throws java.lang.ExceptionDescription copied from interface:IndexFieldDataLoads directly the atomic field data for the reader, ignoring any caching involved.- Specified by:
loadDirectin interfaceIndexFieldData<AtomicNumericFieldData>- Throws:
java.lang.Exception
-
load
Description copied from interface:IndexFieldDataLoads the atomic field data for the reader, possibly cached.- Specified by:
loadin interfaceIndexFieldData<AtomicNumericFieldData>
-