Class AbstractIndexOrdinalsFieldData
- java.lang.Object
-
- org.elasticsearch.index.AbstractIndexComponent
-
- org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData<AtomicOrdinalsFieldData>
-
- org.elasticsearch.index.fielddata.plain.AbstractIndexOrdinalsFieldData
-
- All Implemented Interfaces:
IndexFieldData<AtomicOrdinalsFieldData>,IndexFieldData.Global<AtomicOrdinalsFieldData>,IndexOrdinalsFieldData,IndexComponent
- Direct Known Subclasses:
ConstantIndexFieldData,PagedBytesIndexFieldData
public abstract class AbstractIndexOrdinalsFieldData extends AbstractIndexFieldData<AtomicOrdinalsFieldData> implements IndexOrdinalsFieldData
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData
AbstractIndexFieldData.PerValueEstimator
-
Nested classes/interfaces inherited from interface org.elasticsearch.index.fielddata.IndexFieldData
IndexFieldData.Builder, IndexFieldData.Global<FD extends AtomicFieldData>, IndexFieldData.XFieldComparatorSource
-
-
Field Summary
Fields Modifier and Type Field Description protected CircuitBreakerServicebreakerService-
Fields inherited from class org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData
cache
-
Fields inherited from class org.elasticsearch.index.AbstractIndexComponent
deprecationLogger, indexSettings, logger
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractIndexOrdinalsFieldData(IndexSettings indexSettings, String fieldName, IndexFieldDataCache cache, CircuitBreakerService breakerService, double minFrequency, double maxFrequency, int minSegmentSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AtomicOrdinalsFieldDataempty(int maxDoc)protected TermsEnumfilter(Terms terms, TermsEnum iterator, LeafReader reader)OrdinalMapgetOrdinalMap()Returns the underlyingOrdinalMapfor this fielddata or null if global ordinals are not needed (constant value or single segment).IndexOrdinalsFieldDataloadGlobal(DirectoryReader indexReader)Load a global view of the ordinals for the givenIndexReader, potentially from a cache.IndexOrdinalsFieldDatalocalGlobalDirect(DirectoryReader indexReader)Load a global view of the ordinals for the givenIndexReader.booleansupportsGlobalOrdinalsMapping()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.AbstractIndexFieldData
clear, getFieldName, load
-
Methods inherited from class org.elasticsearch.index.AbstractIndexComponent
getIndexSettings, 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.IndexComponent
index
-
Methods inherited from interface org.elasticsearch.index.fielddata.IndexFieldData
clear, getFieldName, load, loadDirect, sortField
-
-
-
-
Field Detail
-
breakerService
protected final CircuitBreakerService breakerService
-
-
Constructor Detail
-
AbstractIndexOrdinalsFieldData
protected AbstractIndexOrdinalsFieldData(IndexSettings indexSettings, String fieldName, IndexFieldDataCache cache, CircuitBreakerService breakerService, double minFrequency, double maxFrequency, int minSegmentSize)
-
-
Method Detail
-
getOrdinalMap
public 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
-
loadGlobal
public IndexOrdinalsFieldData loadGlobal(DirectoryReader indexReader)
Description copied from interface:IndexOrdinalsFieldDataLoad a global view of the ordinals for the givenIndexReader, potentially from a cache.- Specified by:
loadGlobalin interfaceIndexFieldData.Global<AtomicOrdinalsFieldData>- Specified by:
loadGlobalin interfaceIndexOrdinalsFieldData
-
localGlobalDirect
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception
Description copied from interface:IndexOrdinalsFieldDataLoad a global view of the ordinals for the givenIndexReader.- Specified by:
localGlobalDirectin interfaceIndexFieldData.Global<AtomicOrdinalsFieldData>- Specified by:
localGlobalDirectin interfaceIndexOrdinalsFieldData- Throws:
Exception
-
empty
protected AtomicOrdinalsFieldData empty(int maxDoc)
- Specified by:
emptyin classAbstractIndexFieldData<AtomicOrdinalsFieldData>- Parameters:
maxDoc- of the current reader- Returns:
- an empty field data instances for field data lookups of empty segments (returning no values)
-
filter
protected TermsEnum filter(Terms terms, TermsEnum iterator, LeafReader reader) throws IOException
- Throws:
IOException
-
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
-
-