Package org.elasticsearch.index.analysis
Class PreBuiltAnalyzerProviderFactory
- java.lang.Object
-
- org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent<AnalyzerProvider<?>>
-
- org.elasticsearch.index.analysis.PreBuiltAnalyzerProviderFactory
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,AnalysisModule.AnalysisProvider<AnalyzerProvider<?>>
public class PreBuiltAnalyzerProviderFactory extends PreConfiguredAnalysisComponent<AnalyzerProvider<?>> implements java.io.Closeable
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent
cache
-
-
Constructor Summary
Constructors Constructor Description PreBuiltAnalyzerProviderFactory(java.lang.String name, PreBuiltCacheFactory.CachingStrategy cache, java.util.function.Supplier<org.apache.lucene.analysis.Analyzer> create)
-
Method Summary
Modifier and Type Method Description voidclose()protected AnalyzerProvider<?>create(Version version)AnalyzerProvider<?>get(IndexSettings indexSettings, Environment environment, java.lang.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(java.lang.String name, PreBuiltCacheFactory.CachingStrategy cache, java.util.function.Supplier<org.apache.lucene.analysis.Analyzer> create)
-
-
Method Detail
-
get
public AnalyzerProvider<?> get(IndexSettings indexSettings, Environment environment, java.lang.String name, Settings settings) throws java.io.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:
java.io.IOException- if anIOExceptionoccurs
-
create
protected AnalyzerProvider<?> create(Version version)
- Specified by:
createin classPreConfiguredAnalysisComponent<AnalyzerProvider<?>>
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-