Package org.elasticsearch.index.analysis
Class PreConfiguredAnalysisComponent<T>
- java.lang.Object
-
- org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent<T>
-
- All Implemented Interfaces:
AnalysisModule.AnalysisProvider<T>
- Direct Known Subclasses:
PreBuiltAnalyzerProviderFactory,PreConfiguredCharFilter,PreConfiguredTokenFilter,PreConfiguredTokenizer
public abstract class PreConfiguredAnalysisComponent<T> extends java.lang.Object implements AnalysisModule.AnalysisProvider<T>
Shared implementation for pre-configured analysis components.
-
-
Field Summary
Fields Modifier and Type Field Description protected PreBuiltCacheFactory.PreBuiltCache<T>cache
-
Constructor Summary
Constructors Modifier Constructor Description protectedPreConfiguredAnalysisComponent(java.lang.String name, PreBuiltCacheFactory.CachingStrategy cache)protectedPreConfiguredAnalysisComponent(java.lang.String name, PreBuiltCacheFactory.PreBuiltCache<T> cache)
-
Method Summary
Modifier and Type Method Description protected abstract Tcreate(Version version)Tget(IndexSettings indexSettings, Environment environment, java.lang.String name, Settings settings)Creates a new analysis provider.java.lang.StringgetName()The name of the analysis component in the API.-
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
-
-
-
-
Field Detail
-
cache
protected final PreBuiltCacheFactory.PreBuiltCache<T> cache
-
-
Constructor Detail
-
PreConfiguredAnalysisComponent
protected PreConfiguredAnalysisComponent(java.lang.String name, PreBuiltCacheFactory.CachingStrategy cache)
-
PreConfiguredAnalysisComponent
protected PreConfiguredAnalysisComponent(java.lang.String name, PreBuiltCacheFactory.PreBuiltCache<T> cache)
-
-
Method Detail
-
get
public T 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<T>- 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
-
getName
public java.lang.String getName()
The name of the analysis component in the API.
-
-