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 CircuitBreakerService
breakerService
Fields inherited from class org.elasticsearch.index.AbstractIndexComponent
deprecationLogger, indexSettings, logger
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractIndexOrdinalsFieldData(IndexSettings indexSettings, java.lang.String fieldName, IndexFieldDataCache cache, CircuitBreakerService breakerService, double minFrequency, double maxFrequency, int minSegmentSize)
-
Method Summary
Modifier and Type Method Description protected AtomicOrdinalsFieldData
empty(int maxDoc)
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)
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).IndexOrdinalsFieldData
loadGlobal(org.apache.lucene.index.DirectoryReader indexReader)
Load a global view of the ordinals for the givenIndexReader
, potentially from a cache.IndexOrdinalsFieldData
localGlobalDirect(org.apache.lucene.index.DirectoryReader indexReader)
Load a global view of the ordinals for the givenIndexReader
.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.AbstractIndexFieldData
clear, getFieldName, load
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.fielddata.IndexFieldData
clear, getFieldName, load, loadDirect, 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: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
-
loadGlobal
Description copied from interface:IndexOrdinalsFieldData
Load a global view of the ordinals for the givenIndexReader
, potentially from a cache.- Specified by:
loadGlobal
in interfaceIndexFieldData.Global<AtomicOrdinalsFieldData>
- Specified by:
loadGlobal
in interfaceIndexOrdinalsFieldData
-
localGlobalDirect
public IndexOrdinalsFieldData localGlobalDirect(org.apache.lucene.index.DirectoryReader indexReader) throws java.lang.ExceptionDescription copied from interface:IndexOrdinalsFieldData
Load a global view of the ordinals for the givenIndexReader
.- Specified by:
localGlobalDirect
in interfaceIndexFieldData.Global<AtomicOrdinalsFieldData>
- Specified by:
localGlobalDirect
in interfaceIndexOrdinalsFieldData
- Throws:
java.lang.Exception
-
empty
- Specified by:
empty
in 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 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: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
-