Class SortedNumericDVIndexFieldData
java.lang.Object
org.elasticsearch.index.fielddata.plain.DocValuesIndexFieldData
org.elasticsearch.index.fielddata.plain.SortedNumericDVIndexFieldData
- All Implemented Interfaces:
IndexFieldData<LeafNumericFieldData>
,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 class
SortedNumericDVIndexFieldData.NanoSecondFieldData
A 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.Builder
Nested classes/interfaces inherited from interface org.elasticsearch.index.fielddata.IndexFieldData
IndexFieldData.Builder, IndexFieldData.Global<FD extends LeafFieldData>, IndexFieldData.XFieldComparatorSource
Nested 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.NumericType
getNumericType()
LeafNumericFieldData
load(org.apache.lucene.index.LeafReaderContext context)
Loads the atomic field data for the reader, possibly cached.LeafNumericFieldData
loadDirect(org.apache.lucene.index.LeafReaderContext context)
Loads directly the atomic field data for the reader, ignoring any caching involved.BucketedSort
newBucketedSort(BigArrays bigArrays, java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, SortOrder sortOrder, DocValueFormat format, int bucketSize, BucketedSort.ExtraData extra)
Build a sort implementation specialized for aggregations.BucketedSort
newBucketedSort(IndexNumericFieldData.NumericType targetNumericType, BigArrays bigArrays, java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, SortOrder sortOrder, DocValueFormat format, int bucketSize, BucketedSort.ExtraData extra)
Builds a BucketedSort for thetargetNumericType
, casting the values if their native type doesn't match.org.apache.lucene.search.SortField
sortField(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)
Returns theSortField
to use for sorting.org.apache.lucene.search.SortField
sortField(IndexNumericFieldData.NumericType targetNumericType, java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)
Returns theSortField
to used for sorting.Methods inherited from class org.elasticsearch.index.fielddata.plain.DocValuesIndexFieldData
clear, clear, getFieldName, index
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 theSortField
to used for sorting. Values are casted to the providedtargetNumericType
type 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:IndexFieldData
Returns theSortField
to use for sorting.- Specified by:
sortField
in interfaceIndexFieldData<LeafNumericFieldData>
-
newBucketedSort
public BucketedSort newBucketedSort(IndexNumericFieldData.NumericType targetNumericType, BigArrays bigArrays, @Nullable java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, SortOrder sortOrder, DocValueFormat format, int bucketSize, BucketedSort.ExtraData extra)Builds a BucketedSort for thetargetNumericType
, casting the values if their native type doesn't match. -
newBucketedSort
public BucketedSort newBucketedSort(BigArrays bigArrays, @Nullable java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, SortOrder sortOrder, DocValueFormat format, int bucketSize, BucketedSort.ExtraData extra)Description copied from interface:IndexFieldData
Build a sort implementation specialized for aggregations.- Specified by:
newBucketedSort
in interfaceIndexFieldData<LeafNumericFieldData>
-
getNumericType
- Specified by:
getNumericType
in interfaceIndexNumericFieldData
-
loadDirect
public LeafNumericFieldData loadDirect(org.apache.lucene.index.LeafReaderContext context) throws java.lang.ExceptionDescription copied from interface:IndexFieldData
Loads directly the atomic field data for the reader, ignoring any caching involved.- Specified by:
loadDirect
in interfaceIndexFieldData<LeafNumericFieldData>
- Throws:
java.lang.Exception
-
load
Description copied from interface:IndexFieldData
Loads the atomic field data for the reader, possibly cached.- Specified by:
load
in interfaceIndexFieldData<LeafNumericFieldData>
-