Class PreConfiguredTokenizer

All Implemented Interfaces:
AnalysisModule.AnalysisProvider<TokenizerFactory>

public final class PreConfiguredTokenizer extends PreConfiguredAnalysisComponent<TokenizerFactory>
Provides pre-configured, shared Tokenizers.
  • Method Details

    • singleton

      public static PreConfiguredTokenizer singleton(String name, Supplier<org.apache.lucene.analysis.Tokenizer> create)
      Create a pre-configured tokenizer that may not vary at all.
      Parameters:
      name - the name of the tokenizer in the api
      create - builds the tokenizer
    • luceneVersion

      public static PreConfiguredTokenizer luceneVersion(String name, Function<org.apache.lucene.util.Version,org.apache.lucene.analysis.Tokenizer> create)
      Create a pre-configured tokenizer that may vary based on the Lucene version.
      Parameters:
      name - the name of the tokenizer in the api
      create - builds the tokenizer
    • elasticsearchVersion

      public static PreConfiguredTokenizer elasticsearchVersion(String name, Function<Version,org.apache.lucene.analysis.Tokenizer> create)
      Create a pre-configured tokenizer that may vary based on the Elasticsearch version.
      Parameters:
      name - the name of the tokenizer in the api
      create - builds the tokenizer
    • create

      protected TokenizerFactory create(Version version)
      Specified by:
      create in class PreConfiguredAnalysisComponent<TokenizerFactory>