Module org.elasticsearch.server
Class IndexFieldDataService
java.lang.Object
org.elasticsearch.index.AbstractIndexComponent
org.elasticsearch.index.fielddata.IndexFieldDataService
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
FieldsFields inherited from class org.elasticsearch.index.AbstractIndexComponent
indexSettings, logger -
Constructor Summary
ConstructorsConstructorDescriptionIndexFieldDataService(IndexSettings indexSettings, IndicesFieldDataCache indicesFieldDataCache, CircuitBreakerService circuitBreakerService) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidclearField(String fieldName) voidclose()<IFD extends IndexFieldData<?>>
IFDgetForField(MappedFieldType fieldType, FieldDataContext fieldDataContext) Returns fielddata for the provided field type, given the provided fully qualified index name, while also making aSearchLookupsupplier available that is required for runtime fields.<IFD extends IndexFieldData<?>>
IFDgetFromBuilder(MappedFieldType fieldType, IndexFieldData.Builder builder) voidsetListener(IndexFieldDataCache.Listener listener) Sets aIndexFieldDataCache.Listenerpassed to eachIndexFieldDatacreation to capture onCache and onRemoval events.Methods inherited from class org.elasticsearch.index.AbstractIndexComponent
getIndexSettings, index
-
Field Details
-
FIELDDATA_CACHE_VALUE_NODE
- See Also:
-
FIELDDATA_CACHE_KEY
- See Also:
-
INDEX_FIELDDATA_CACHE_KEY
-
-
Constructor Details
-
IndexFieldDataService
public IndexFieldDataService(IndexSettings indexSettings, IndicesFieldDataCache indicesFieldDataCache, CircuitBreakerService circuitBreakerService)
-
-
Method Details
-
clear
public void clear() -
clearField
-
getForField
public <IFD extends IndexFieldData<?>> IFD getForField(MappedFieldType fieldType, FieldDataContext fieldDataContext) Returns fielddata for the provided field type, given the provided fully qualified index name, while also making aSearchLookupsupplier available that is required for runtime fields. -
getFromBuilder
public <IFD extends IndexFieldData<?>> IFD getFromBuilder(MappedFieldType fieldType, IndexFieldData.Builder builder) -
setListener
Sets aIndexFieldDataCache.Listenerpassed to eachIndexFieldDatacreation to capture onCache and onRemoval events. Setting a listener on this method will override any previously set listeners.- Throws:
IllegalStateException- if the listener is set more than once
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-