Class IndexFieldDataService
java.lang.Object
org.elasticsearch.index.AbstractIndexComponent
org.elasticsearch.index.fielddata.IndexFieldDataService
- All Implemented Interfaces:
Closeable
,AutoCloseable
,IndexComponent
-
Field Summary
Fields inherited from class org.elasticsearch.index.AbstractIndexComponent
deprecationLogger, indexSettings, logger
-
Constructor Summary
ConstructorDescriptionIndexFieldDataService(IndexSettings indexSettings, IndicesFieldDataCache indicesFieldDataCache, CircuitBreakerService circuitBreakerService, MapperService mapperService)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
clearField(String fieldName)
void
close()
<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 aSearchLookup
supplier available that is required for runtime fields.void
setListener(IndexFieldDataCache.Listener listener)
Sets aIndexFieldDataCache.Listener
passed to eachIndexFieldData
creation 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 aSearchLookup
supplier available that is required for runtime fields. -
setListener
Sets aIndexFieldDataCache.Listener
passed to eachIndexFieldData
creation 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-