Package org.elasticsearch.index.analysis
Class PreBuiltAnalyzerProviderFactory
- java.lang.Object
-
- org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent<AnalyzerProvider<?>>
-
- org.elasticsearch.index.analysis.PreBuiltAnalyzerProviderFactory
-
- All Implemented Interfaces:
Closeable,AutoCloseable,AnalysisModule.AnalysisProvider<AnalyzerProvider<?>>
public class PreBuiltAnalyzerProviderFactory extends PreConfiguredAnalysisComponent<AnalyzerProvider<?>> implements Closeable
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent
cache, name
-
-
Constructor Summary
Constructors Constructor Description PreBuiltAnalyzerProviderFactory(String name, PreBuiltCacheFactory.CachingStrategy cache, Supplier<Analyzer> create)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected AnalyzerProvider<?>create(Version version)AnalyzerProvider<?>get(IndexSettings indexSettings, Environment environment, String name, Settings settings)Creates a new analysis provider.-
Methods inherited from class org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent
getName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.indices.analysis.AnalysisModule.AnalysisProvider
get, requiresAnalysisSettings
-
-
-
-
Constructor Detail
-
PreBuiltAnalyzerProviderFactory
public PreBuiltAnalyzerProviderFactory(String name, PreBuiltCacheFactory.CachingStrategy cache, Supplier<Analyzer> create)
-
-
Method Detail
-
get
public AnalyzerProvider<?> get(IndexSettings indexSettings, Environment environment, String name, Settings settings) throws IOException
Description copied from interface:AnalysisModule.AnalysisProviderCreates a new analysis provider.- Specified by:
getin interfaceAnalysisModule.AnalysisProvider<AnalyzerProvider<?>>- Overrides:
getin classPreConfiguredAnalysisComponent<AnalyzerProvider<?>>- Parameters:
indexSettings- the index settings for the index this provider is created forenvironment- the nodes environment to load resources from persistent storagename- the name of the analysis componentsettings- the component specific settings without context prefixes- Returns:
- a new provider instance
- Throws:
IOException- if anIOExceptionoccurs
-
create
protected AnalyzerProvider<?> create(Version version)
- Specified by:
createin classPreConfiguredAnalysisComponent<AnalyzerProvider<?>>
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-