Class IndexFieldDataService
- java.lang.Object
-
- org.elasticsearch.index.AbstractIndexComponent
-
- org.elasticsearch.index.fielddata.IndexFieldDataService
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,IndexComponent
public class IndexFieldDataService extends AbstractIndexComponent implements java.io.Closeable
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFIELDDATA_CACHE_KEYstatic java.lang.StringFIELDDATA_CACHE_VALUE_NODEstatic Setting<java.lang.String>INDEX_FIELDDATA_CACHE_KEY-
Fields inherited from class org.elasticsearch.index.AbstractIndexComponent
deprecationLogger, indexSettings, logger
-
-
Constructor Summary
Constructors Constructor Description IndexFieldDataService(IndexSettings indexSettings, IndicesFieldDataCache indicesFieldDataCache, CircuitBreakerService circuitBreakerService, MapperService mapperService)
-
Method Summary
Modifier and Type Method Description voidclear()voidclearField(java.lang.String fieldName)voidclose()<IFD extends IndexFieldData<?>>
IFDgetForField(MappedFieldType fieldType)<IFD extends IndexFieldData<?>>
IFDgetForField(MappedFieldType fieldType, java.lang.String fullyQualifiedIndexName)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 Detail
-
FIELDDATA_CACHE_VALUE_NODE
public static final java.lang.String FIELDDATA_CACHE_VALUE_NODE
- See Also:
- Constant Field Values
-
FIELDDATA_CACHE_KEY
public static final java.lang.String FIELDDATA_CACHE_KEY
- See Also:
- Constant Field Values
-
INDEX_FIELDDATA_CACHE_KEY
public static final Setting<java.lang.String> INDEX_FIELDDATA_CACHE_KEY
-
-
Constructor Detail
-
IndexFieldDataService
public IndexFieldDataService(IndexSettings indexSettings, IndicesFieldDataCache indicesFieldDataCache, CircuitBreakerService circuitBreakerService, MapperService mapperService)
-
-
Method Detail
-
clear
public void clear()
-
clearField
public void clearField(java.lang.String fieldName)
-
getForField
public <IFD extends IndexFieldData<?>> IFD getForField(MappedFieldType fieldType)
-
getForField
public <IFD extends IndexFieldData<?>> IFD getForField(MappedFieldType fieldType, java.lang.String fullyQualifiedIndexName)
-
setListener
public void setListener(IndexFieldDataCache.Listener listener)
Sets aIndexFieldDataCache.Listenerpassed to eachIndexFieldDatacreation to capture onCache and onRemoval events. Setting a listener on this method will override any previously set listeners.- Throws:
java.lang.IllegalStateException- if the listener is set more than once
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-