Package org.elasticsearch.test
Class MockKeywordPlugin
- java.lang.Object
-
- org.elasticsearch.plugins.Plugin
-
- org.elasticsearch.test.MockKeywordPlugin
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,AnalysisPlugin
public class MockKeywordPlugin extends Plugin implements AnalysisPlugin
Some tests rely on the keyword tokenizer, but this tokenizer isn't part of lucene-core and therefor not available in some modules. What this test plugin does, is use the mock tokenizer and advertise that as the keyword tokenizer. Most tests that need this test plugin use normalizers. When normalizers are constructed they try to resolve the keyword tokenizer, but if the keyword tokenizer isn't available then constructing normalizers will fail.
-
-
Constructor Summary
Constructors Constructor Description MockKeywordPlugin()
-
Method Summary
Modifier and Type Method Description java.util.Map<java.lang.String,AnalysisModule.AnalysisProvider<TokenizerFactory>>
getTokenizers()
-
Methods inherited from class org.elasticsearch.plugins.Plugin
additionalSettings, close, createComponents, createGuiceModules, getBootstrapChecks, getExecutorBuilders, getFeature, getGuiceServiceClasses, getIndexTemplateMetaDataUpgrader, getNamedWriteables, getNamedXContent, getRoles, getSettings, getSettingsFilter, getSettingUpgraders, onIndexModule
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.plugins.AnalysisPlugin
getAnalyzers, getCharFilters, getHunspellDictionaries, getPreBuiltAnalyzerProviderFactories, getPreConfiguredCharFilters, getPreConfiguredTokenFilters, getPreConfiguredTokenizers, getTokenFilters
-
-
-
-
Method Detail
-
getTokenizers
public java.util.Map<java.lang.String,AnalysisModule.AnalysisProvider<TokenizerFactory>> getTokenizers()
- Specified by:
getTokenizers
in interfaceAnalysisPlugin
-
-