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
protected java.lang.String
name
-
Constructor Summary
Constructors Modifier Constructor Description protected
PreConfiguredAnalysisComponent(java.lang.String name, PreBuiltCacheFactory.CachingStrategy cache)
protected
PreConfiguredAnalysisComponent(java.lang.String name, PreBuiltCacheFactory.PreBuiltCache<T> cache)
-
Method Summary
Modifier and Type Method Description protected abstract T
create(Version version)
T
get(IndexSettings indexSettings, Environment environment, java.lang.String name, Settings settings)
Creates a new analysis provider.java.lang.String
getName()
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 Details
-
name
protected final java.lang.String name -
cache
-
-
Constructor Details
-
PreConfiguredAnalysisComponent
protected PreConfiguredAnalysisComponent(java.lang.String name, PreBuiltCacheFactory.CachingStrategy cache) -
PreConfiguredAnalysisComponent
protected PreConfiguredAnalysisComponent(java.lang.String name, PreBuiltCacheFactory.PreBuiltCache<T> cache)
-
-
Method Details
-
get
public T get(IndexSettings indexSettings, Environment environment, java.lang.String name, Settings settings) throws java.io.IOExceptionDescription copied from interface:AnalysisModule.AnalysisProvider
Creates a new analysis provider.- Specified by:
get
in 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 anIOException
occurs
-
getName
public java.lang.String getName()The name of the analysis component in the API. -
create
-