Package org.opensearch.analysis.common
Class KeepWordFilterFactory
java.lang.Object
org.opensearch.index.AbstractIndexComponent
org.opensearch.index.analysis.AbstractTokenFilterFactory
org.opensearch.analysis.common.KeepWordFilterFactory
- All Implemented Interfaces:
TokenFilterFactory,IndexComponent
public class KeepWordFilterFactory extends AbstractTokenFilterFactory
A
TokenFilterFactory for KeepWordFilter. This filter only
keep tokens that are contained in the term set configured via
"keep_words" setting. This filter acts like an inverse stop
filter.
Configuration options:
- "keep_words" the array of words / tokens to keep.
- "keep_words_path" an reference to a file containing the words / tokens to keep. Note: this is an alternative to "keep_words" if both are set an exception will be thrown.
- "keep_words_case" to use case sensitive keep words. The
default is
falsewhich corresponds to case-sensitive.
- See Also:
StopTokenFilterFactory
-
Field Summary
Fields inherited from class org.opensearch.index.AbstractIndexComponent
deprecationLogger, indexSettings, logger -
Method Summary
Modifier and Type Method Description org.apache.lucene.analysis.TokenStreamcreate(org.apache.lucene.analysis.TokenStream tokenStream)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.index.analysis.TokenFilterFactory
breaksFastVectorHighlighter, getAnalysisMode, getChainAwareTokenFilterFactory, getSynonymFilter, normalize
-
Method Details
-
create
public org.apache.lucene.analysis.TokenStream create(org.apache.lucene.analysis.TokenStream tokenStream)
-