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
ATokenFilterFactoryforKeepWordFilter. 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
-
Fields inherited from interface org.opensearch.index.analysis.TokenFilterFactory
IDENTITY_FILTER
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.analysis.TokenStreamcreate(org.apache.lucene.analysis.TokenStream tokenStream)-
Methods inherited from class org.opensearch.index.analysis.AbstractTokenFilterFactory
name
-
Methods inherited from class org.opensearch.index.AbstractIndexComponent
getIndexSettings, index
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensearch.index.analysis.TokenFilterFactory
breaksFastVectorHighlighter, getAnalysisMode, getChainAwareTokenFilterFactory, getSynonymFilter, normalize
-
-