Package org.opensearch.index.fielddata
Interface IndexFieldData<FD extends LeafFieldData>
- All Known Subinterfaces:
IndexFieldData.Global<FD>
,IndexGeoPointFieldData
,IndexOrdinalsFieldData
- All Known Implementing Classes:
AbstractGeoShapeIndexFieldData
,AbstractGeoShapeIndexFieldData.GeoShapeIndexFieldData
,AbstractIndexOrdinalsFieldData
,AbstractLatLonPointIndexFieldData
,AbstractLatLonPointIndexFieldData.LatLonPointIndexFieldData
,BinaryIndexFieldData
,BytesBinaryIndexFieldData
,ConstantIndexFieldData
,GlobalOrdinalsIndexFieldData
,GlobalOrdinalsIndexFieldData.Consumer
,IndexHistogramFieldData
,IndexNumericFieldData
,PagedBytesIndexFieldData
,SortedNumericIndexFieldData
,SortedSetOrdinalsIndexFieldData
,StringBinaryIndexFieldData
Thread-safe utility class that allows to get per-segment values via the
load(LeafReaderContext)
method.- Opensearch.api:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Base builder interfacestatic interface
IndexFieldData.Global<FD extends LeafFieldData>
Base Global field data classstatic class
we need this extended source we we have custom comparators to reuse our field data in this case, we need to reduce type that will be used when search results are reduced on another node (we don't have the custom source them...) -
Method Summary
Modifier and TypeMethodDescriptionThe field name.The ValuesSourceType of the underlying data.load
(org.apache.lucene.index.LeafReaderContext context) Loads the atomic field data for the reader, possibly cached.loadDirect
(org.apache.lucene.index.LeafReaderContext context) Loads directly the atomic field data for the reader, ignoring any caching involved.newBucketedSort
(BigArrays bigArrays, 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
(Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse) Returns theSortField
to use for sorting.default org.apache.lucene.search.SortField
wideSortField
(Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse) Returns theSortField
to use for index sorting where we widen the sort field type to higher or equal bytes.
-
Method Details
-
getFieldName
String getFieldName()The field name. -
getValuesSourceType
ValuesSourceType getValuesSourceType()The 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. -
load
Loads the atomic field data for the reader, possibly cached. -
loadDirect
Loads directly the atomic field data for the reader, ignoring any caching involved.- Throws:
Exception
-
sortField
org.apache.lucene.search.SortField sortField(@Nullable Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse) Returns theSortField
to use for sorting. -
wideSortField
default org.apache.lucene.search.SortField wideSortField(@Nullable Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse) Returns theSortField
to use for index sorting where we widen the sort field type to higher or equal bytes. -
newBucketedSort
BucketedSort newBucketedSort(BigArrays bigArrays, @Nullable Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, SortOrder sortOrder, DocValueFormat format, int bucketSize, BucketedSort.ExtraData extra) Build a sort implementation specialized for aggregations.
-