public class GlobalOrdinalsIndexFieldData extends AbstractIndexComponent implements IndexOrdinalsFieldData, org.apache.lucene.util.Accountable
IndexFieldData
base class for concrete global ordinals implementations.IndexFieldData.Builder, IndexFieldData.CommonSettings, IndexFieldData.Global<FD extends AtomicFieldData>, IndexFieldData.XFieldComparatorSource
deprecationLogger, indexSettings, logger
Modifier | Constructor and Description |
---|---|
protected |
GlobalOrdinalsIndexFieldData(IndexSettings indexSettings,
java.lang.String fieldName,
AtomicOrdinalsFieldData[] segmentAfd,
org.apache.lucene.index.MultiDocValues.OrdinalMap ordinalMap,
long memorySizeInBytes,
java.util.function.Function<org.apache.lucene.index.RandomAccessOrds,ScriptDocValues<?>> scriptFunction) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears any resources associated with this field data.
|
java.util.Collection<org.apache.lucene.util.Accountable> |
getChildResources() |
java.lang.String |
getFieldName()
The field name.
|
org.apache.lucene.index.MultiDocValues.OrdinalMap |
getOrdinalMap()
Returns the underlying
MultiDocValues.OrdinalMap for this fielddata
or null if global ordinals are not needed (constant value or single segment). |
AtomicOrdinalsFieldData |
load(org.apache.lucene.index.LeafReaderContext context)
Loads the atomic field data for the reader, possibly cached.
|
AtomicOrdinalsFieldData |
loadDirect(org.apache.lucene.index.LeafReaderContext context)
Loads directly the atomic field data for the reader, ignoring any caching involved.
|
IndexOrdinalsFieldData |
loadGlobal(org.apache.lucene.index.DirectoryReader indexReader)
Load a global view of the ordinals for the given
IndexReader ,
potentially from a cache. |
IndexOrdinalsFieldData |
localGlobalDirect(org.apache.lucene.index.DirectoryReader indexReader)
Load a global view of the ordinals for the given
IndexReader . |
long |
ramBytesUsed() |
org.apache.lucene.search.SortField |
sortField(java.lang.Object missingValue,
MultiValueMode sortMode,
IndexFieldData.XFieldComparatorSource.Nested nested,
boolean reverse)
Returns the
SortField to used for sorting. |
getIndexSettings, index
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
index
protected GlobalOrdinalsIndexFieldData(IndexSettings indexSettings, java.lang.String fieldName, AtomicOrdinalsFieldData[] segmentAfd, org.apache.lucene.index.MultiDocValues.OrdinalMap ordinalMap, long memorySizeInBytes, java.util.function.Function<org.apache.lucene.index.RandomAccessOrds,ScriptDocValues<?>> scriptFunction)
public AtomicOrdinalsFieldData loadDirect(org.apache.lucene.index.LeafReaderContext context) throws java.lang.Exception
IndexFieldData
loadDirect
in interface IndexFieldData<AtomicOrdinalsFieldData>
java.lang.Exception
public IndexOrdinalsFieldData loadGlobal(org.apache.lucene.index.DirectoryReader indexReader)
IndexOrdinalsFieldData
IndexReader
,
potentially from a cache.loadGlobal
in interface IndexFieldData.Global<AtomicOrdinalsFieldData>
loadGlobal
in interface IndexOrdinalsFieldData
public IndexOrdinalsFieldData localGlobalDirect(org.apache.lucene.index.DirectoryReader indexReader) throws java.lang.Exception
IndexOrdinalsFieldData
IndexReader
.localGlobalDirect
in interface IndexFieldData.Global<AtomicOrdinalsFieldData>
localGlobalDirect
in interface IndexOrdinalsFieldData
java.lang.Exception
public java.lang.String getFieldName()
IndexFieldData
getFieldName
in interface IndexFieldData<AtomicOrdinalsFieldData>
public org.apache.lucene.search.SortField sortField(@Nullable java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)
IndexFieldData
SortField
to used for sorting.sortField
in interface IndexFieldData<AtomicOrdinalsFieldData>
public void clear()
IndexFieldData
clear
in interface IndexFieldData<AtomicOrdinalsFieldData>
public long ramBytesUsed()
ramBytesUsed
in interface org.apache.lucene.util.Accountable
public java.util.Collection<org.apache.lucene.util.Accountable> getChildResources()
getChildResources
in interface org.apache.lucene.util.Accountable
public AtomicOrdinalsFieldData load(org.apache.lucene.index.LeafReaderContext context)
IndexFieldData
load
in interface IndexFieldData<AtomicOrdinalsFieldData>
public org.apache.lucene.index.MultiDocValues.OrdinalMap getOrdinalMap()
IndexOrdinalsFieldData
MultiDocValues.OrdinalMap
for this fielddata
or null if global ordinals are not needed (constant value or single segment).getOrdinalMap
in interface IndexOrdinalsFieldData