Class GlobalOrdinalsIndexFieldData
- java.lang.Object
-
- org.elasticsearch.index.AbstractIndexComponent
-
- org.elasticsearch.index.fielddata.ordinals.GlobalOrdinalsIndexFieldData
-
- All Implemented Interfaces:
org.apache.lucene.util.Accountable,IndexFieldData<AtomicOrdinalsFieldData>,IndexFieldData.Global<AtomicOrdinalsFieldData>,IndexOrdinalsFieldData,IndexComponent
public class GlobalOrdinalsIndexFieldData extends AbstractIndexComponent implements IndexOrdinalsFieldData, org.apache.lucene.util.Accountable
IndexFieldDatabase class for concrete global ordinals implementations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.index.fielddata.IndexFieldData
IndexFieldData.Builder, IndexFieldData.Global<FD extends AtomicFieldData>, IndexFieldData.XFieldComparatorSource
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.index.AbstractIndexComponent
deprecationLogger, indexSettings, logger
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGlobalOrdinalsIndexFieldData(IndexSettings indexSettings, java.lang.String fieldName, AtomicOrdinalsFieldData[] segmentAfd, org.apache.lucene.index.OrdinalMap ordinalMap, long memorySizeInBytes, java.util.function.Function<org.apache.lucene.index.SortedSetDocValues,ScriptDocValues<?>> scriptFunction)
-
Method Summary
Modifier and Type Method Description voidclear()Clears any resources associated with this field data.java.util.Collection<org.apache.lucene.util.Accountable>getChildResources()java.lang.StringgetFieldName()The field name.org.apache.lucene.index.OrdinalMapgetOrdinalMap()Returns the underlyingOrdinalMapfor this fielddata or null if global ordinals are not needed (constant value or single segment).AtomicOrdinalsFieldDataload(org.apache.lucene.index.LeafReaderContext context)Loads the atomic field data for the reader, possibly cached.AtomicOrdinalsFieldDataloadDirect(org.apache.lucene.index.LeafReaderContext context)Loads directly the atomic field data for the reader, ignoring any caching involved.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.longramBytesUsed()org.apache.lucene.search.SortFieldsortField(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)Returns theSortFieldto use for sorting.-
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
-
-
-
-
Constructor Detail
-
GlobalOrdinalsIndexFieldData
protected GlobalOrdinalsIndexFieldData(IndexSettings indexSettings, java.lang.String fieldName, AtomicOrdinalsFieldData[] segmentAfd, org.apache.lucene.index.OrdinalMap ordinalMap, long memorySizeInBytes, java.util.function.Function<org.apache.lucene.index.SortedSetDocValues,ScriptDocValues<?>> scriptFunction)
-
-
Method Detail
-
loadDirect
public AtomicOrdinalsFieldData loadDirect(org.apache.lucene.index.LeafReaderContext context) throws java.lang.Exception
Description copied from interface:IndexFieldDataLoads directly the atomic field data for the reader, ignoring any caching involved.- Specified by:
loadDirectin interfaceIndexFieldData<AtomicOrdinalsFieldData>- Throws:
java.lang.Exception
-
loadGlobal
public IndexOrdinalsFieldData loadGlobal(org.apache.lucene.index.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(org.apache.lucene.index.DirectoryReader indexReader) throws java.lang.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:
java.lang.Exception
-
getFieldName
public java.lang.String getFieldName()
Description copied from interface:IndexFieldDataThe field name.- Specified by:
getFieldNamein interfaceIndexFieldData<AtomicOrdinalsFieldData>
-
sortField
public org.apache.lucene.search.SortField sortField(@Nullable java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)
Description copied from interface:IndexFieldDataReturns theSortFieldto use for sorting.- Specified by:
sortFieldin interfaceIndexFieldData<AtomicOrdinalsFieldData>
-
clear
public void clear()
Description copied from interface:IndexFieldDataClears any resources associated with this field data.- Specified by:
clearin interfaceIndexFieldData<AtomicOrdinalsFieldData>
-
ramBytesUsed
public long ramBytesUsed()
- Specified by:
ramBytesUsedin interfaceorg.apache.lucene.util.Accountable
-
getChildResources
public java.util.Collection<org.apache.lucene.util.Accountable> getChildResources()
- Specified by:
getChildResourcesin interfaceorg.apache.lucene.util.Accountable
-
load
public AtomicOrdinalsFieldData load(org.apache.lucene.index.LeafReaderContext context)
Description copied from interface:IndexFieldDataLoads the atomic field data for the reader, possibly cached.- Specified by:
loadin interfaceIndexFieldData<AtomicOrdinalsFieldData>
-
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
-
-