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>
public final class PreConfiguredTokenizer extends PreConfiguredAnalysisComponent<TokenizerFactory>
Provides pre-configured, sharedTokenizer
s.
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent
cache
-
-
Method Summary
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)
Create a pre-configured tokenizer that may vary based on the Elasticsearch version.static PreConfiguredTokenizer
luceneVersion(java.lang.String name, java.util.function.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
singleton(java.lang.String name, java.util.function.Supplier<org.apache.lucene.analysis.Tokenizer> create)
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 Detail
-
singleton
public static PreConfiguredTokenizer singleton(java.lang.String name, java.util.function.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(java.lang.String name, java.util.function.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(java.lang.String name, java.util.function.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
protected TokenizerFactory create(Version version)
- Specified by:
create
in classPreConfiguredAnalysisComponent<TokenizerFactory>
-
-