Package org.elasticsearch.index.analysis
Interface TokenFilterFactory
-
- All Known Implementing Classes:
AbstractTokenFilterFactory
,HunspellTokenFilterFactory
,ShingleTokenFilterFactory
,ShingleTokenFilterFactory.Factory
,StopTokenFilterFactory
,SynonymGraphTokenFilterFactory
,SynonymTokenFilterFactory
public interface TokenFilterFactory
-
-
Field Summary
Fields Modifier and Type Field Description static TokenFilterFactory
IDENTITY_FILTER
A TokenFilterFactory that does no filtering to its TokenStream
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
breaksFastVectorHighlighter()
Does this analyzer mess up theOffsetAttribute
s in such as way as to break theFastVectorHighlighter
? If this istrue
then the FastVectorHighlighter will attempt to work around the broken offsets.org.apache.lucene.analysis.TokenStream
create(org.apache.lucene.analysis.TokenStream tokenStream)
default TokenFilterFactory
getChainAwareTokenFilterFactory(TokenizerFactory tokenizer, java.util.List<CharFilterFactory> charFilters, java.util.List<TokenFilterFactory> previousTokenFilters, java.util.function.Function<java.lang.String,TokenFilterFactory> allFilters)
Rewrite the TokenFilterFactory to take into account the preceding analysis chain, or refer to other TokenFilterFactoriesdefault TokenFilterFactory
getSynonymFilter()
Return a version of this TokenFilterFactory appropriate for synonym parsing Filters that should not be applied to synonyms (for example, those that produce multiple tokens) should throw an exceptionjava.lang.String
name()
-
-
-
Field Detail
-
IDENTITY_FILTER
static final TokenFilterFactory IDENTITY_FILTER
A TokenFilterFactory that does no filtering to its TokenStream
-
-
Method Detail
-
name
java.lang.String name()
-
create
org.apache.lucene.analysis.TokenStream create(org.apache.lucene.analysis.TokenStream tokenStream)
-
breaksFastVectorHighlighter
default boolean breaksFastVectorHighlighter()
Does this analyzer mess up theOffsetAttribute
s in such as way as to break theFastVectorHighlighter
? If this istrue
then the FastVectorHighlighter will attempt to work around the broken offsets.
-
getChainAwareTokenFilterFactory
default TokenFilterFactory getChainAwareTokenFilterFactory(TokenizerFactory tokenizer, java.util.List<CharFilterFactory> charFilters, java.util.List<TokenFilterFactory> previousTokenFilters, java.util.function.Function<java.lang.String,TokenFilterFactory> allFilters)
Rewrite the TokenFilterFactory to take into account the preceding analysis chain, or refer to other TokenFilterFactories- Parameters:
tokenizer
- the TokenizerFactory for the preceding chaincharFilters
- any CharFilterFactories for the preceding chainpreviousTokenFilters
- a list of TokenFilterFactories in the preceding chainallFilters
- access to previously defined TokenFilterFactories
-
getSynonymFilter
default TokenFilterFactory getSynonymFilter()
Return a version of this TokenFilterFactory appropriate for synonym parsing Filters that should not be applied to synonyms (for example, those that produce multiple tokens) should throw an exception
-
-