Package org.elasticsearch.index.analysis
Class PreConfiguredCharFilter
java.lang.Object
org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent<CharFilterFactory>
org.elasticsearch.index.analysis.PreConfiguredCharFilter
- All Implemented Interfaces:
AnalysisModule.AnalysisProvider<CharFilterFactory>
Provides pre-configured, shared
CharFilter
s.-
Field Summary
Fields inherited from class org.elasticsearch.index.analysis.PreConfiguredAnalysisComponent
cache, name
-
Constructor Summary
ModifierConstructorDescriptionprotected
PreConfiguredCharFilter(String name, PreBuiltCacheFactory.CachingStrategy cache, boolean useFilterForMultitermQueries, BiFunction<Reader,Version,Reader> create)
-
Method Summary
Modifier and TypeMethodDescriptionprotected CharFilterFactory
static PreConfiguredCharFilter
elasticsearchVersion(String name, boolean useFilterForMultitermQueries, BiFunction<Reader,Version,Reader> create)
Create a pre-configured token filter that may vary based on the Elasticsearch version.static PreConfiguredCharFilter
luceneVersion(String name, boolean useFilterForMultitermQueries, BiFunction<Reader,org.apache.lucene.util.Version,Reader> 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 PreConfiguredCharFilter
Create a pre-configured char filter that may not vary at all.static PreConfiguredCharFilter
singletonWithVersion(String name, boolean useFilterForMultitermQueries, BiFunction<Reader,Version,Reader> create)
Create a pre-configured char filter that may not vary at all, provide access to the elasticsearch versionMethods 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
-
Constructor Details
-
PreConfiguredCharFilter
protected PreConfiguredCharFilter(String name, PreBuiltCacheFactory.CachingStrategy cache, boolean useFilterForMultitermQueries, BiFunction<Reader,Version,Reader> create)
-
-
Method Details
-
singleton
public static PreConfiguredCharFilter singleton(String name, boolean useFilterForMultitermQueries, Function<Reader,Reader> create)Create a pre-configured char filter that may not vary at all. -
singletonWithVersion
public static PreConfiguredCharFilter singletonWithVersion(String name, boolean useFilterForMultitermQueries, BiFunction<Reader,Version,Reader> create)Create a pre-configured char filter that may not vary at all, provide access to the elasticsearch version -
luceneVersion
public static PreConfiguredCharFilter luceneVersion(String name, boolean useFilterForMultitermQueries, BiFunction<Reader,org.apache.lucene.util.Version,Reader> create)Create a pre-configured token filter that may vary based on the Lucene version. -
elasticsearchVersion
public static PreConfiguredCharFilter elasticsearchVersion(String name, boolean useFilterForMultitermQueries, BiFunction<Reader,Version,Reader> 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<CharFilterFactory>
-