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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
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.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:
java.io.IOException
- if anIOException
occurs
-
create
protected AnalyzerProvider<?> create(Version version)
- Specified by:
create
in classPreConfiguredAnalysisComponent<AnalyzerProvider<?>>
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-