Class MockKeywordPlugin

java.lang.Object
org.elasticsearch.plugins.Plugin
org.elasticsearch.test.MockKeywordPlugin
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable, org.elasticsearch.plugins.AnalysisPlugin

public class MockKeywordPlugin
extends org.elasticsearch.plugins.Plugin
implements org.elasticsearch.plugins.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,​org.elasticsearch.indices.analysis.AnalysisModule.AnalysisProvider<org.elasticsearch.index.analysis.TokenizerFactory>> getTokenizers()  

    Methods inherited from class org.elasticsearch.plugins.Plugin

    additionalSettings, close, createComponents, createGuiceModules, getAdditionalIndexSettingProviders, 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
  • Constructor Details

    • MockKeywordPlugin

      public MockKeywordPlugin()
  • Method Details

    • getTokenizers

      public java.util.Map<java.lang.String,​org.elasticsearch.indices.analysis.AnalysisModule.AnalysisProvider<org.elasticsearch.index.analysis.TokenizerFactory>> getTokenizers()
      Specified by:
      getTokenizers in interface org.elasticsearch.plugins.AnalysisPlugin