Package org.opensearch.analysis.common
Class ConcatenateGraphTokenFilterFactory
java.lang.Object
org.opensearch.index.AbstractIndexComponent
org.opensearch.index.analysis.AbstractTokenFilterFactory
org.opensearch.analysis.common.ConcatenateGraphTokenFilterFactory
- All Implemented Interfaces:
TokenFilterFactory,IndexComponent
Factory for
ConcatenateGraphFilter.
Adopted from ConcatenateGraphFilterFactory, with some changes to
default values: token_separator is a "space", preserve_position_increments is false to avoid duplicated separators,
max_graph_expansions is 100 as the default value of 10_000 seems to be unnecessarily large and preserve_separator is false.
- preserve_separator:
For LegacyESVersion lesser than
LegacyESVersion.V_7_6_0i.e. lucene versions lesser thanVersion.LUCENE_8_4_0WhetherConcatenateGraphFilter.SEP_LABELshould separate the input tokens in the concatenated token. - token_separator:
Separator to use for concatenation. Must be a String with a single character or empty.
If not present,
DEFAULT_TOKEN_SEPARATORwill be used. If empty i.e. "", tokens will be concatenated without any separators. - preserve_position_increments:
Whether to add an empty token for missing positions.
If not present,
DEFAULT_PRESERVE_POSITION_INCREMENTSwill be used. - max_graph_expansions:
If the tokenStream graph has more than this many possible paths through, then we'll throw
TooComplexToDeterminizeExceptionto preserve the stability and memory of the machine. If not present,DEFAULT_MAX_GRAPH_EXPANSIONSwill be used.
- See Also:
-
Field Summary
FieldsFields inherited from class org.opensearch.index.AbstractIndexComponent
deprecationLogger, indexSettings, loggerFields inherited from interface org.opensearch.index.analysis.TokenFilterFactory
IDENTITY_FILTER -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.analysis.TokenStreamcreate(org.apache.lucene.analysis.TokenStream tokenStream) Methods inherited from class org.opensearch.index.analysis.AbstractTokenFilterFactory
nameMethods inherited from class org.opensearch.index.AbstractIndexComponent
getIndexSettings, indexMethods 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
-
Field Details
-
DEFAULT_TOKEN_SEPARATOR
- See Also:
-
DEFAULT_MAX_GRAPH_EXPANSIONS
public static final int DEFAULT_MAX_GRAPH_EXPANSIONS- See Also:
-
DEFAULT_PRESERVE_POSITION_INCREMENTS
public static final boolean DEFAULT_PRESERVE_POSITION_INCREMENTS- See Also:
-
-
Method Details
-
create
public org.apache.lucene.analysis.TokenStream create(org.apache.lucene.analysis.TokenStream tokenStream)
-