Class IndexFieldDataService
java.lang.Object
org.elasticsearch.index.AbstractIndexComponent
org.elasticsearch.index.fielddata.IndexFieldDataService
- All Implemented Interfaces:
Closeable,AutoCloseable,IndexComponent
-
Field Summary
FieldsFields inherited from class org.elasticsearch.index.AbstractIndexComponent
deprecationLogger, indexSettings, logger -
Constructor Summary
ConstructorsConstructorDescriptionIndexFieldDataService(IndexSettings indexSettings, IndicesFieldDataCache indicesFieldDataCache, CircuitBreakerService circuitBreakerService, MapperService mapperService) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidclearField(String fieldName)voidclose()<IFD extends IndexFieldData<?>>
IFDgetForField(MappedFieldType fieldType, String fullyQualifiedIndexName, Supplier<SearchLookup> searchLookup)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.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:
- Constant Field Values
-
FIELDDATA_CACHE_KEY
- See Also:
- Constant Field Values
-
INDEX_FIELDDATA_CACHE_KEY
-
-
Constructor Details
-
IndexFieldDataService
public IndexFieldDataService(IndexSettings indexSettings, IndicesFieldDataCache indicesFieldDataCache, CircuitBreakerService circuitBreakerService, MapperService mapperService)
-
-
Method Details
-
clear
public void clear() -
clearField
-
getForField
public <IFD extends IndexFieldData<?>> IFD getForField(MappedFieldType fieldType, String fullyQualifiedIndexName, Supplier<SearchLookup> searchLookup)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. -
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
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-