Class PreConfiguredTokenizer

    • Method Detail

      • singleton

        public static PreConfiguredTokenizer singleton​(java.lang.String name,
                                                       java.util.function.Supplier<org.apache.lucene.analysis.Tokenizer> create,
                                                       @Nullable
                                                       java.util.function.Supplier<TokenFilterFactory> multiTermComponent)
        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
        multiTermComponent - null if this tokenizer shouldn't be used for multi-term queries, otherwise a supplier for the TokenFilterFactory that stands in for this tokenizer in multi-term queries.
      • luceneVersion

        public static PreConfiguredTokenizer luceneVersion​(java.lang.String name,
                                                           java.util.function.Function<org.apache.lucene.util.Version,​org.apache.lucene.analysis.Tokenizer> create,
                                                           @Nullable
                                                           java.util.function.Function<org.apache.lucene.util.Version,​TokenFilterFactory> multiTermComponent)
        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
        multiTermComponent - null if this tokenizer shouldn't be used for multi-term queries, otherwise a supplier for the TokenFilterFactory that stands in for this tokenizer in multi-term queries.
      • elasticsearchVersion

        public static PreConfiguredTokenizer elasticsearchVersion​(java.lang.String name,
                                                                  java.util.function.Function<Version,​org.apache.lucene.analysis.Tokenizer> create,
                                                                  @Nullable
                                                                  java.util.function.Function<Version,​TokenFilterFactory> multiTermComponent)
        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
        multiTermComponent - null if this tokenizer shouldn't be used for multi-term queries, otherwise a supplier for the TokenFilterFactory that stands in for this tokenizer in multi-term queries.
      • hasMultiTermComponent

        public boolean hasMultiTermComponent()
        Does this tokenizer has an equivalent component for analyzing multi-term queries?