Interface AnalysisModule.AnalysisProvider<T>
-
- All Known Implementing Classes:
PreBuiltAnalyzerProviderFactory
,PreConfiguredAnalysisComponent
,PreConfiguredCharFilter
,PreConfiguredTokenFilter
,PreConfiguredTokenizer
- Enclosing class:
- AnalysisModule
public static interface AnalysisModule.AnalysisProvider<T>
The basic factory interface for analysis components.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default T
get(Environment environment, java.lang.String name)
Creates a new global scope analysis provider without index specific settings not settings for the provider itself.T
get(IndexSettings indexSettings, Environment environment, java.lang.String name, Settings settings)
Creates a new analysis provider.default boolean
requiresAnalysisSettings()
Iftrue
the analysis component created by this provider requires certain settings to be instantiated.
-
-
-
Method Detail
-
get
T get(IndexSettings indexSettings, Environment environment, java.lang.String name, Settings settings) throws java.io.IOException
Creates a new analysis provider.- 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
-
get
default T get(Environment environment, java.lang.String name) throws java.io.IOException
Creates a new global scope analysis provider without index specific settings not settings for the provider itself. This can be used to get a default instance of an analysis factory without binding to an index.- Parameters:
environment
- the nodes environment to load resources from persistent storagename
- the name of the analysis component- Returns:
- a new provider instance
- Throws:
java.io.IOException
- if anIOException
occursjava.lang.IllegalArgumentException
- if the provider requires analysis settings ie. ifrequiresAnalysisSettings()
returnstrue
-
requiresAnalysisSettings
default boolean requiresAnalysisSettings()
Iftrue
the analysis component created by this provider requires certain settings to be instantiated. it can't be created with defaults. The default isfalse
.
-
-