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 void
clear()
Clears any resources associated with this field data.java.lang.String
getFieldName()
The field name.Index
index()
AtomicFieldData
load(org.apache.lucene.index.LeafReaderContext context)
Loads the atomic field data for the reader, possibly cached.AtomicFieldData
loadDirect(org.apache.lucene.index.LeafReaderContext context)
Loads directly the atomic field data for the reader, ignoring any caching involved.org.apache.lucene.search.SortField
sortField(java.lang.Object missingValue, MultiValueMode sortMode, IndexFieldData.XFieldComparatorSource.Nested nested, boolean reverse)
Returns theSortField
to used for sorting.
-
-
-
Constructor Detail
-
UidIndexFieldData
public UidIndexFieldData(Index index, java.lang.String type, IndexFieldData<?> idFieldData)
-
-
Method Detail
-
index
public Index index()
- Specified by:
index
in interfaceIndexComponent
-
getFieldName
public java.lang.String getFieldName()
Description copied from interface:IndexFieldData
The field name.- Specified by:
getFieldName
in 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:IndexFieldData
Returns theSortField
to used for sorting.- Specified by:
sortField
in interfaceIndexFieldData<AtomicFieldData>
-
load
public AtomicFieldData load(org.apache.lucene.index.LeafReaderContext context)
Description copied from interface:IndexFieldData
Loads the atomic field data for the reader, possibly cached.- Specified by:
load
in interfaceIndexFieldData<AtomicFieldData>
-
loadDirect
public AtomicFieldData loadDirect(org.apache.lucene.index.LeafReaderContext context) throws java.lang.Exception
Description copied from interface:IndexFieldData
Loads directly the atomic field data for the reader, ignoring any caching involved.- Specified by:
loadDirect
in interfaceIndexFieldData<AtomicFieldData>
- Throws:
java.lang.Exception
-
clear
public void clear()
Description copied from interface:IndexFieldData
Clears any resources associated with this field data.- Specified by:
clear
in interfaceIndexFieldData<AtomicFieldData>
-
-