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
ConstructorDescriptionPreBuiltAnalyzerProviderFactory(String name, PreBuiltCacheFactory.CachingStrategy cache, Supplier<org.apache.lucene.analysis.Analyzer> create)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected 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 Details
-
PreBuiltAnalyzerProviderFactory
public PreBuiltAnalyzerProviderFactory(String name, PreBuiltCacheFactory.CachingStrategy cache, Supplier<org.apache.lucene.analysis.Analyzer> create)
-
-
Method Details
-
get
public AnalyzerProvider<?> get(IndexSettings indexSettings, Environment environment, String name, Settings settings) throws IOExceptionDescription copied from interface:AnalysisModule.AnalysisProvider
Creates a new analysis provider.- Specified by:
get
in interfaceAnalysisModule.AnalysisProvider<AnalyzerProvider<?>>
- Overrides:
get
in 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 anIOException
occurs
-
create
- Specified by:
create
in classPreConfiguredAnalysisComponent<AnalyzerProvider<?>>
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-