Class AbstractIndexOrdinalsFieldData
java.lang.Object
org.elasticsearch.index.AbstractIndexComponent
org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData<LeafOrdinalsFieldData>
org.elasticsearch.index.fielddata.plain.AbstractIndexOrdinalsFieldData
- All Implemented Interfaces:
IndexFieldData<LeafOrdinalsFieldData>,IndexFieldData.Global<LeafOrdinalsFieldData>,IndexOrdinalsFieldData,IndexComponent
- Direct Known Subclasses:
ConstantIndexFieldData,PagedBytesIndexFieldData
public abstract class AbstractIndexOrdinalsFieldData extends AbstractIndexFieldData<LeafOrdinalsFieldData> implements IndexOrdinalsFieldData
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData
AbstractIndexFieldData.PerValueEstimatorNested classes/interfaces inherited from interface org.elasticsearch.index.fielddata.IndexFieldData
IndexFieldData.Builder, IndexFieldData.Global<FD extends LeafFieldData>, IndexFieldData.XFieldComparatorSource -
Field Summary
Fields Modifier and Type Field Description protected CircuitBreakerServicebreakerServiceFields inherited from class org.elasticsearch.index.AbstractIndexComponent
deprecationLogger, indexSettings, logger -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractIndexOrdinalsFieldData(IndexSettings indexSettings, java.lang.String fieldName, IndexFieldDataCache cache, CircuitBreakerService breakerService, double minFrequency, double maxFrequency, int minSegmentSize) -
Method Summary
Modifier and Type Method Description protected LeafOrdinalsFieldDataempty(int maxDoc)protected org.apache.lucene.index.TermsEnumfilter(org.apache.lucene.index.Terms terms, org.apache.lucene.index.TermsEnum iterator, org.apache.lucene.index.LeafReader reader)org.apache.lucene.index.OrdinalMapgetOrdinalMap()Returns the underlyingOrdinalMapfor this fielddata or null if global ordinals are not needed (constant value or single segment).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.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, loadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.index.fielddata.IndexFieldData
clear, getFieldName, load, loadDirect, newBucketedSort, sortField
-
Field Details
-
Constructor Details
-
AbstractIndexOrdinalsFieldData
protected AbstractIndexOrdinalsFieldData(IndexSettings indexSettings, java.lang.String fieldName, IndexFieldDataCache cache, CircuitBreakerService breakerService, double minFrequency, double maxFrequency, int minSegmentSize)
-
-
Method Details
-
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
-
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
-
empty
- Specified by:
emptyin classAbstractIndexFieldData<LeafOrdinalsFieldData>- Parameters:
maxDoc- of the current reader- Returns:
- an empty field data instances for field data lookups of empty segments (returning no values)
-
filter
protected org.apache.lucene.index.TermsEnum filter(org.apache.lucene.index.Terms terms, org.apache.lucene.index.TermsEnum iterator, org.apache.lucene.index.LeafReader reader) throws java.io.IOException- Throws:
java.io.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
-