Class UidIndexFieldData
- java.lang.Object
-
- org.elasticsearch.index.fielddata.UidIndexFieldData
-
- All Implemented Interfaces:
IndexFieldData<AtomicFieldData>,IndexComponent
public final class UidIndexFieldData extends java.lang.Object implements IndexFieldData<AtomicFieldData>
Fielddata view of the _uid field on indices that do not index _uid but _id. It gets fielddata on the_id field, which is in-memory since the _id field does not have doc values, and prepends${type}#to all values. Note that it does not add memory compared to what fielddata on the _id is already using: this is just a view. TODO: Remove fielddata access on _uid and _id, or add doc values to _id.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.index.fielddata.IndexFieldData
IndexFieldData.Builder, IndexFieldData.Global<FD extends AtomicFieldData>, IndexFieldData.XFieldComparatorSource
-
-
Constructor Summary
Constructors Constructor Description UidIndexFieldData(Index index, java.lang.String type, IndexFieldData<?> idFieldData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears any resources associated with this field data.java.lang.StringgetFieldName()The field name.Indexindex()AtomicFieldDataload(org.apache.lucene.index.LeafReaderContext context)Loads the atomic field data for the reader, possibly cached.AtomicFieldDataloadDirect(org.apache.lucene.index.LeafReaderContext context)Loads directly the atomic field data for the reader, ignoring any caching involved.org.apache.lucene.search.SortFieldsortField(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)Returns theSortFieldto used for sorting.
-
-
-
Constructor Detail
-
UidIndexFieldData
public UidIndexFieldData(Index index, java.lang.String type, IndexFieldData<?> idFieldData)
-
-
Method Detail
-
index
public Index index()
- Specified by:
indexin interfaceIndexComponent
-
getFieldName
public java.lang.String getFieldName()
Description copied from interface:IndexFieldDataThe field name.- Specified by:
getFieldNamein interfaceIndexFieldData<AtomicFieldData>
-
sortField
public org.apache.lucene.search.SortField sortField(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)Description copied from interface:IndexFieldDataReturns theSortFieldto used for sorting.- Specified by:
sortFieldin interfaceIndexFieldData<AtomicFieldData>
-
load
public AtomicFieldData 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<AtomicFieldData>
-
loadDirect
public AtomicFieldData 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<AtomicFieldData>- Throws:
java.lang.Exception
-
clear
public void clear()
Description copied from interface:IndexFieldDataClears any resources associated with this field data.- Specified by:
clearin interfaceIndexFieldData<AtomicFieldData>
-
-