Class AbstractIndexFieldData<FD extends LeafFieldData>
java.lang.Object
org.elasticsearch.index.AbstractIndexComponent
org.elasticsearch.index.fielddata.plain.AbstractIndexFieldData<FD>
- All Implemented Interfaces:
IndexFieldData<FD>
,IndexComponent
- Direct Known Subclasses:
AbstractIndexOrdinalsFieldData
public abstract class AbstractIndexFieldData<FD extends LeafFieldData> extends AbstractIndexComponent implements IndexFieldData<FD>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AbstractIndexFieldData.PerValueEstimator
APerValueEstimator
is a sub-class that can be used to estimate the memory overhead for loading the data.Nested 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 IndexFieldDataCache
cache
Fields inherited from class org.elasticsearch.index.AbstractIndexComponent
deprecationLogger, indexSettings, logger
-
Constructor Summary
Constructors Constructor Description AbstractIndexFieldData(IndexSettings indexSettings, java.lang.String fieldName, ValuesSourceType valuesSourceType, IndexFieldDataCache cache)
-
Method Summary
Modifier and Type Method Description void
clear()
Clears any resources associated with this field data.protected abstract FD
empty(int maxDoc)
java.lang.String
getFieldName()
The field name.ValuesSourceType
getValuesSourceType()
The ValuesSourceType of the underlying data.FD
load(org.apache.lucene.index.LeafReaderContext context)
Loads the atomic field data for the reader, possibly cached.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
loadDirect, newBucketedSort, sortField
-
Field Details
-
Constructor Details
-
AbstractIndexFieldData
public AbstractIndexFieldData(IndexSettings indexSettings, java.lang.String fieldName, ValuesSourceType valuesSourceType, IndexFieldDataCache cache)
-
-
Method Details
-
getFieldName
public java.lang.String getFieldName()Description copied from interface:IndexFieldData
The field name.- Specified by:
getFieldName
in interfaceIndexFieldData<FD extends LeafFieldData>
-
getValuesSourceType
Description copied from interface:IndexFieldData
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.- Specified by:
getValuesSourceType
in interfaceIndexFieldData<FD extends LeafFieldData>
-
clear
public void clear()Description copied from interface:IndexFieldData
Clears any resources associated with this field data.- Specified by:
clear
in interfaceIndexFieldData<FD extends LeafFieldData>
-
load
Description copied from interface:IndexFieldData
Loads the atomic field data for the reader, possibly cached.- Specified by:
load
in interfaceIndexFieldData<FD extends LeafFieldData>
-
empty
- Parameters:
maxDoc
- of the current reader- Returns:
- an empty field data instances for field data lookups of empty segments (returning no values)
-