Package org.elasticsearch.index.analysis
Class PreConfiguredTokenFilter
java.lang.Object
org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent<TokenFilterFactory>
org.elasticsearch.index.analysis.PreConfiguredTokenFilter
- All Implemented Interfaces:
AnalysisModule.AnalysisProvider<TokenFilterFactory>
public final class PreConfiguredTokenFilter
extends PreConfiguredAnalysisComponent<TokenFilterFactory>
Provides pre-configured, shared
TokenFilter
s.-
Field Summary
Fields inherited from class org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent
cache, name
-
Method Summary
Modifier and TypeMethodDescriptionprotected TokenFilterFactory
static PreConfiguredTokenFilter
elasticsearchVersion(String name, boolean useFilterForMultitermQueries, boolean useFilterForParsingSynonyms, BiFunction<org.apache.lucene.analysis.TokenStream,Version,org.apache.lucene.analysis.TokenStream> create)
Create a pre-configured token filter that may vary based on the Elasticsearch version.static PreConfiguredTokenFilter
elasticsearchVersion(String name, boolean useFilterForMultitermQueries, BiFunction<org.apache.lucene.analysis.TokenStream,Version,org.apache.lucene.analysis.TokenStream> create)
Create a pre-configured token filter that may vary based on the Elasticsearch version.static PreConfiguredTokenFilter
luceneVersion(String name, boolean useFilterForMultitermQueries, BiFunction<org.apache.lucene.analysis.TokenStream,org.apache.lucene.util.Version,org.apache.lucene.analysis.TokenStream> create)
Create a pre-configured token filter that may vary based on the Lucene version.boolean
Can thisTokenFilter
be used in multi-term queries?static PreConfiguredTokenFilter
singleton(String name, boolean useFilterForMultitermQueries, boolean allowForSynonymParsing, Function<org.apache.lucene.analysis.TokenStream,org.apache.lucene.analysis.TokenStream> create)
Create a pre-configured token filter that may not vary at all.static PreConfiguredTokenFilter
singleton(String name, boolean useFilterForMultitermQueries, Function<org.apache.lucene.analysis.TokenStream,org.apache.lucene.analysis.TokenStream> create)
Create a pre-configured token filter 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 PreConfiguredTokenFilter singleton(String name, boolean useFilterForMultitermQueries, Function<org.apache.lucene.analysis.TokenStream,org.apache.lucene.analysis.TokenStream> create)Create a pre-configured token filter that may not vary at all. -
singleton
public static PreConfiguredTokenFilter singleton(String name, boolean useFilterForMultitermQueries, boolean allowForSynonymParsing, Function<org.apache.lucene.analysis.TokenStream,org.apache.lucene.analysis.TokenStream> create)Create a pre-configured token filter that may not vary at all. -
luceneVersion
public static PreConfiguredTokenFilter luceneVersion(String name, boolean useFilterForMultitermQueries, BiFunction<org.apache.lucene.analysis.TokenStream,org.apache.lucene.util.Version,org.apache.lucene.analysis.TokenStream> create)Create a pre-configured token filter that may vary based on the Lucene version. -
elasticsearchVersion
public static PreConfiguredTokenFilter elasticsearchVersion(String name, boolean useFilterForMultitermQueries, BiFunction<org.apache.lucene.analysis.TokenStream,Version,org.apache.lucene.analysis.TokenStream> create)Create a pre-configured token filter that may vary based on the Elasticsearch version. -
elasticsearchVersion
public static PreConfiguredTokenFilter elasticsearchVersion(String name, boolean useFilterForMultitermQueries, boolean useFilterForParsingSynonyms, BiFunction<org.apache.lucene.analysis.TokenStream,Version,org.apache.lucene.analysis.TokenStream> create)Create a pre-configured token filter that may vary based on the Elasticsearch version. -
shouldUseFilterForMultitermQueries
public boolean shouldUseFilterForMultitermQueries()Can thisTokenFilter
be used in multi-term queries? -
create
- Specified by:
create
in classPreConfiguredAnalysisComponent<TokenFilterFactory>
-