Class SortedNumericIndexFieldData
java.lang.Object
org.elasticsearch.index.fielddata.IndexNumericFieldData
org.elasticsearch.index.fielddata.plain.SortedNumericIndexFieldData
- All Implemented Interfaces:
IndexFieldData<LeafNumericFieldData>,IndexComponent
public class SortedNumericIndexFieldData extends IndexNumericFieldData
FieldData backed by
LeafReader.getSortedNumericDocValues(String)- See Also:
DocValuesType.SORTED_NUMERIC
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSortedNumericIndexFieldData.BuilderclassSortedNumericIndexFieldData.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.IndexNumericFieldData
IndexNumericFieldData.NumericTypeNested classes/interfaces inherited from interface org.elasticsearch.index.fielddata.IndexFieldData
IndexFieldData.Global<FD extends LeafFieldData>, IndexFieldData.XFieldComparatorSource -
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringfieldNameprotected Indexindexprotected ValuesSourceTypevaluesSourceType -
Constructor Summary
Constructors Constructor Description SortedNumericIndexFieldData(Index index, java.lang.String fieldName, IndexNumericFieldData.NumericType numericType) -
Method Summary
Modifier and Type Method Description voidclear()Clears any resources associated with this field data.protected IndexFieldData.XFieldComparatorSourcedateComparatorSource(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested)protected IndexFieldData.XFieldComparatorSourcedateNanosComparatorSource(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested)java.lang.StringgetFieldName()The field name.IndexNumericFieldData.NumericTypegetNumericType()The numeric type of this number.ValuesSourceTypegetValuesSourceType()The ValuesSourceType of the underlying data.Indexindex()LeafNumericFieldDataload(org.apache.lucene.index.LeafReaderContext context)Loads the atomic field data for the reader, possibly cached.LeafNumericFieldDataloadDirect(org.apache.lucene.index.LeafReaderContext context)Loads directly the atomic field data for the reader, ignoring any caching involved.protected booleansortRequiresCustomComparator()DoesIndexNumericFieldData.sortField(org.elasticsearch.index.fielddata.IndexNumericFieldData.NumericType, java.lang.Object, org.elasticsearch.search.MultiValueMode, org.elasticsearch.index.fielddata.IndexFieldData.XFieldComparatorSource.Nested, boolean)require a custom comparator because of the way the data is stored in doc values (true) or are the docs values stored such that they can be sorted without decoding (false).Methods inherited from class org.elasticsearch.index.fielddata.IndexNumericFieldData
convertNumeric, newBucketedSort, newBucketedSort, sortField, sortField
-
Field Details
-
index
-
fieldName
protected final java.lang.String fieldName -
valuesSourceType
-
-
Constructor Details
-
SortedNumericIndexFieldData
public SortedNumericIndexFieldData(Index index, java.lang.String fieldName, IndexNumericFieldData.NumericType numericType)
-
-
Method Details
-
getFieldName
public final java.lang.String getFieldName()Description copied from interface:IndexFieldDataThe field name. -
getValuesSourceType
Description copied from interface:IndexFieldDataThe ValuesSourceType of the underlying data. It's possible for fields that use the same IndexFieldData implementation to have different ValuesSourceTypes, such as in the case of Longs and Dates. -
clear
public final void clear()Description copied from interface:IndexFieldDataClears any resources associated with this field data. -
index
-
sortRequiresCustomComparator
protected boolean sortRequiresCustomComparator()Description copied from class:IndexNumericFieldDataDoesIndexNumericFieldData.sortField(org.elasticsearch.index.fielddata.IndexNumericFieldData.NumericType, java.lang.Object, org.elasticsearch.search.MultiValueMode, org.elasticsearch.index.fielddata.IndexFieldData.XFieldComparatorSource.Nested, boolean)require a custom comparator because of the way the data is stored in doc values (true) or are the docs values stored such that they can be sorted without decoding (false).- Specified by:
sortRequiresCustomComparatorin classIndexNumericFieldData
-
dateComparatorSource
protected IndexFieldData.XFieldComparatorSource dateComparatorSource(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested)- Overrides:
dateComparatorSourcein classIndexNumericFieldData
-
dateNanosComparatorSource
protected IndexFieldData.XFieldComparatorSource dateNanosComparatorSource(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested)- Overrides:
dateNanosComparatorSourcein classIndexNumericFieldData
-
getNumericType
Description copied from class:IndexNumericFieldDataThe numeric type of this number.- Specified by:
getNumericTypein classIndexNumericFieldData
-
loadDirect
public LeafNumericFieldData 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.- Throws:
java.lang.Exception
-
load
Description copied from interface:IndexFieldDataLoads the atomic field data for the reader, possibly cached.
-