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
Modifier and TypeMethodDescriptiondefault Tget(Environment environment, String name)Creates a new global scope analysis provider without index specific settings not settings for the provider itself.get(IndexSettings indexSettings, Environment environment, String name, Settings settings)Creates a new analysis provider.default booleanIftruethe analysis component created by this provider requires certain settings to be instantiated.
-
Method Details
-
get
T get(IndexSettings indexSettings, Environment environment, String name, Settings settings) throws IOExceptionCreates 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:
IOException- if anIOExceptionoccurs
-
get
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:
IOException- if anIOExceptionoccursIllegalArgumentException- if the provider requires analysis settings ie. ifrequiresAnalysisSettings()returnstrue
-
requiresAnalysisSettings
default boolean requiresAnalysisSettings()Iftruethe analysis component created by this provider requires certain settings to be instantiated. it can't be created with defaults. The default isfalse.
-