Class SortedSetOrdinalsIndexFieldData
java.lang.Object
org.elasticsearch.index.fielddata.plain.AbstractIndexOrdinalsFieldData
org.elasticsearch.index.fielddata.plain.SortedSetOrdinalsIndexFieldData
- All Implemented Interfaces:
IndexFieldData<LeafOrdinalsFieldData>
,IndexFieldData.Global<LeafOrdinalsFieldData>
,IndexOrdinalsFieldData
public class SortedSetOrdinalsIndexFieldData extends AbstractIndexOrdinalsFieldData
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SortedSetOrdinalsIndexFieldData.Builder
Nested classes/interfaces inherited from class org.elasticsearch.index.fielddata.plain.AbstractIndexOrdinalsFieldData
AbstractIndexOrdinalsFieldData.PerValueEstimator
Nested classes/interfaces inherited from interface org.elasticsearch.index.fielddata.IndexFieldData
IndexFieldData.Global<FD extends LeafFieldData>, IndexFieldData.XFieldComparatorSource
-
Field Summary
Fields inherited from class org.elasticsearch.index.fielddata.plain.AbstractIndexOrdinalsFieldData
breakerService, scriptFunction
-
Constructor Summary
Constructors Constructor Description SortedSetOrdinalsIndexFieldData(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 org.apache.lucene.index.OrdinalMap
getOrdinalMap()
Returns the underlyingOrdinalMap
for this fielddata or null if global ordinals are not needed (constant value or single segment).LeafOrdinalsFieldData
load(org.apache.lucene.index.LeafReaderContext context)
Loads the atomic field data for the reader, possibly cached.LeafOrdinalsFieldData
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.org.apache.lucene.search.SortField
sortField(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)
Returns theSortField
to use for sorting.boolean
supportsGlobalOrdinalsMapping()
Whether this field data is able to provide a mapping between global and segment ordinals, by returning the underlyingOrdinalMap
.Methods inherited from class org.elasticsearch.index.fielddata.plain.AbstractIndexOrdinalsFieldData
getFieldName, getValuesSourceType, loadGlobal, loadGlobalDirect
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SortedSetOrdinalsIndexFieldData
public SortedSetOrdinalsIndexFieldData(IndexFieldDataCache cache, java.lang.String fieldName, ValuesSourceType valuesSourceType, CircuitBreakerService breakerService, java.util.function.Function<org.apache.lucene.index.SortedSetDocValues,ScriptDocValues<?>> scriptFunction)
-
-
Method Details
-
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:IndexFieldData
Returns theSortField
to use for sorting. -
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:IndexFieldData
Build a sort implementation specialized for aggregations. -
load
Description copied from interface:IndexFieldData
Loads the atomic field data for the reader, possibly cached.- Specified by:
load
in interfaceIndexFieldData<LeafOrdinalsFieldData>
- Overrides:
load
in classAbstractIndexOrdinalsFieldData
-
loadDirect
Description copied from interface:IndexFieldData
Loads directly the atomic field data for the reader, ignoring any caching involved. -
getOrdinalMap
public org.apache.lucene.index.OrdinalMap getOrdinalMap()Description copied from interface:IndexOrdinalsFieldData
Returns the underlyingOrdinalMap
for this fielddata or null if global ordinals are not needed (constant value or single segment).- Specified by:
getOrdinalMap
in interfaceIndexOrdinalsFieldData
- Overrides:
getOrdinalMap
in classAbstractIndexOrdinalsFieldData
-
supportsGlobalOrdinalsMapping
public boolean supportsGlobalOrdinalsMapping()Description copied from interface:IndexOrdinalsFieldData
Whether 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:
supportsGlobalOrdinalsMapping
in interfaceIndexOrdinalsFieldData
- Overrides:
supportsGlobalOrdinalsMapping
in classAbstractIndexOrdinalsFieldData
-