Package org.elasticsearch.index.analysis
Class PreConfiguredTokenizer
java.lang.Object
org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent<TokenizerFactory>
org.elasticsearch.index.analysis.PreConfiguredTokenizer
- All Implemented Interfaces:
AnalysisModule.AnalysisProvider<TokenizerFactory>
Provides pre-configured, shared
Tokenizer
s.-
Field Summary
Fields inherited from class org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent
cache, name
-
Method Summary
Modifier and TypeMethodDescriptionprotected TokenizerFactory
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.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.static PreConfiguredTokenizer
Create a pre-configured tokenizer that may not vary at all.Methods inherited from class org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent
get, getName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.indices.analysis.AnalysisModule.AnalysisProvider
get, requiresAnalysisSettings
-
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 apicreate
- 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 apicreate
- 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 apicreate
- builds the tokenizer
-
create
- Specified by:
create
in classPreConfiguredAnalysisComponent<TokenizerFactory>
-