AnalysisModule.AnalysisProvider<TokenizerFactory>
public final class PreConfiguredTokenizer extends PreConfiguredAnalysisComponent<TokenizerFactory>
Tokenizer
s.Modifier and Type | Method | Description |
---|---|---|
protected TokenizerFactory |
create(Version version) |
|
static PreConfiguredTokenizer |
elasticsearchVersion(java.lang.String name,
java.util.function.Function<Version,org.apache.lucene.analysis.Tokenizer> create,
java.util.function.Function<Version,TokenFilterFactory> multiTermComponent) |
Create a pre-configured tokenizer that may vary based on the Elasticsearch version.
|
boolean |
hasMultiTermComponent() |
Does this tokenizer has an equivalent component for analyzing multi-term queries?
|
static PreConfiguredTokenizer |
luceneVersion(java.lang.String name,
java.util.function.Function<org.apache.lucene.util.Version,org.apache.lucene.analysis.Tokenizer> create,
java.util.function.Function<org.apache.lucene.util.Version,TokenFilterFactory> multiTermComponent) |
Create a pre-configured tokenizer that may vary based on the Lucene version.
|
static PreConfiguredTokenizer |
singleton(java.lang.String name,
java.util.function.Supplier<org.apache.lucene.analysis.Tokenizer> create,
java.util.function.Supplier<TokenFilterFactory> multiTermComponent) |
Create a pre-configured tokenizer that may not vary at all.
|
get, requiresAnalysisSettings
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getName
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)
name
- the name of the tokenizer in the apicreate
- builds the tokenizermultiTermComponent
- 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.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)
name
- the name of the tokenizer in the apicreate
- builds the tokenizermultiTermComponent
- 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.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)
name
- the name of the tokenizer in the apicreate
- builds the tokenizermultiTermComponent
- 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.public boolean hasMultiTermComponent()
protected TokenizerFactory create(Version version)
create
in class PreConfiguredAnalysisComponent<TokenizerFactory>