Class SortedSetOrdinalsIndexFieldData
java.lang.Object
org.elasticsearch.index.fielddata.plain.SortedSetOrdinalsIndexFieldData
- All Implemented Interfaces:
IndexFieldData<LeafOrdinalsFieldData>,IndexFieldData.Global<LeafOrdinalsFieldData>,IndexOrdinalsFieldData,IndexComponent
public class SortedSetOrdinalsIndexFieldData extends java.lang.Object implements IndexOrdinalsFieldData
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSortedSetOrdinalsIndexFieldData.BuilderNested classes/interfaces inherited from interface org.elasticsearch.index.fielddata.IndexFieldData
IndexFieldData.Global<FD extends LeafFieldData>, IndexFieldData.XFieldComparatorSource -
Field Summary
-
Constructor Summary
Constructors Constructor Description SortedSetOrdinalsIndexFieldData(IndexSettings indexSettings, IndexFieldDataCache cache, java.lang.String fieldName, ValuesSourceType valuesSourceType, CircuitBreakerService breakerService, java.util.function.Function<org.apache.lucene.index.SortedSetDocValues,ScriptDocValues<?>> scriptFunction) -
Method Summary
Modifier and Type Method Description voidclear()Clears any resources associated with this field data.java.lang.StringgetFieldName()The field name.org.apache.lucene.index.OrdinalMapgetOrdinalMap()Returns the underlyingOrdinalMapfor this fielddata or null if global ordinals are not needed (constant value or single segment).ValuesSourceTypegetValuesSourceType()The ValuesSourceType of the underlying data.Indexindex()LeafOrdinalsFieldDataload(org.apache.lucene.index.LeafReaderContext context)Loads the atomic field data for the reader, possibly cached.LeafOrdinalsFieldDataloadDirect(org.apache.lucene.index.LeafReaderContext context)Loads directly the atomic field data for the reader, ignoring any caching involved.IndexOrdinalsFieldDataloadGlobal(org.apache.lucene.index.DirectoryReader indexReader)Load a global view of the ordinals for the givenIndexReader, potentially from a cache.IndexOrdinalsFieldDatalocalGlobalDirect(org.apache.lucene.index.DirectoryReader indexReader)Load a global view of the ordinals for the givenIndexReader.BucketedSortnewBucketedSort(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.org.apache.lucene.search.SortFieldsortField(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)Returns theSortFieldto use for sorting.booleansupportsGlobalOrdinalsMapping()Whether this field data is able to provide a mapping between global and segment ordinals, by returning the underlyingOrdinalMap.
-
Field Details
-
Constructor Details
-
SortedSetOrdinalsIndexFieldData
public SortedSetOrdinalsIndexFieldData(IndexSettings indexSettings, IndexFieldDataCache cache, java.lang.String fieldName, ValuesSourceType valuesSourceType, CircuitBreakerService breakerService, java.util.function.Function<org.apache.lucene.index.SortedSetDocValues,ScriptDocValues<?>> scriptFunction)
-
-
Method Details
-
getFieldName
public final java.lang.String getFieldName()Description copied from interface:IndexFieldDataThe field name.- Specified by:
getFieldNamein interfaceIndexFieldData<LeafOrdinalsFieldData>
-
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.- Specified by:
getValuesSourceTypein interfaceIndexFieldData<LeafOrdinalsFieldData>
-
clear
public final void clear()Description copied from interface:IndexFieldDataClears any resources associated with this field data.- Specified by:
clearin interfaceIndexFieldData<LeafOrdinalsFieldData>
-
index
- Specified by:
indexin interfaceIndexComponent
-
sortField
public org.apache.lucene.search.SortField sortField(@Nullable 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<LeafOrdinalsFieldData>
-
newBucketedSort
public BucketedSort newBucketedSort(BigArrays bigArrays, java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, SortOrder sortOrder, DocValueFormat format, int bucketSize, BucketedSort.ExtraData extra)Description copied from interface:IndexFieldDataBuild a sort implementation specialized for aggregations.- Specified by:
newBucketedSortin interfaceIndexFieldData<LeafOrdinalsFieldData>
-
load
Description copied from interface:IndexFieldDataLoads the atomic field data for the reader, possibly cached.- Specified by:
loadin interfaceIndexFieldData<LeafOrdinalsFieldData>
-
loadDirect
public LeafOrdinalsFieldData 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<LeafOrdinalsFieldData>- Throws:
java.lang.Exception
-
loadGlobal
Description copied from interface:IndexOrdinalsFieldDataLoad a global view of the ordinals for the givenIndexReader, potentially from a cache.- Specified by:
loadGlobalin interfaceIndexFieldData.Global<LeafOrdinalsFieldData>- Specified by:
loadGlobalin interfaceIndexOrdinalsFieldData
-
localGlobalDirect
public IndexOrdinalsFieldData localGlobalDirect(org.apache.lucene.index.DirectoryReader indexReader) throws java.lang.ExceptionDescription copied from interface:IndexOrdinalsFieldDataLoad a global view of the ordinals for the givenIndexReader.- Specified by:
localGlobalDirectin interfaceIndexFieldData.Global<LeafOrdinalsFieldData>- Specified by:
localGlobalDirectin interfaceIndexOrdinalsFieldData- Throws:
java.lang.Exception
-
getOrdinalMap
public org.apache.lucene.index.OrdinalMap getOrdinalMap()Description copied from interface:IndexOrdinalsFieldDataReturns the underlyingOrdinalMapfor this fielddata or null if global ordinals are not needed (constant value or single segment).- Specified by:
getOrdinalMapin interfaceIndexOrdinalsFieldData
-
supportsGlobalOrdinalsMapping
public boolean supportsGlobalOrdinalsMapping()Description copied from interface:IndexOrdinalsFieldDataWhether this field data is able to provide a mapping between global and segment ordinals, by returning the underlyingOrdinalMap. If this method returns false, then callingIndexOrdinalsFieldData.getOrdinalMap()will result in anUnsupportedOperationException.- Specified by:
supportsGlobalOrdinalsMappingin interfaceIndexOrdinalsFieldData
-