Class LimitTokenFilter
- java.lang.Object
-
- com.azure.search.documents.indexes.models.TokenFilter
-
- com.azure.search.documents.indexes.models.LimitTokenFilter
-
public final class LimitTokenFilter extends TokenFilter
Limits the number of tokens while indexing. This token filter is implemented using Apache Lucene.
-
-
Constructor Summary
Constructors Constructor Description LimitTokenFilter(String name)
Constructor ofTokenFilter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
areAllTokensConsumed()
Get the consumeAllTokens property: A value indicating whether all tokens from the input must be consumed even if maxTokenCount is reached.Integer
getMaxTokenCount()
Get the maxTokenCount property: The maximum number of tokens to produce.LimitTokenFilter
setAllTokensConsumed(Boolean allTokensConsumed)
Set the consumeAllTokens property: A value indicating whether all tokens from the input must be consumed even if maxTokenCount is reached.LimitTokenFilter
setMaxTokenCount(Integer maxTokenCount)
Set the maxTokenCount property: The maximum number of tokens to produce.-
Methods inherited from class com.azure.search.documents.indexes.models.TokenFilter
getName
-
-
-
-
Constructor Detail
-
LimitTokenFilter
public LimitTokenFilter(String name)
Constructor ofTokenFilter
.- Parameters:
name
- The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.
-
-
Method Detail
-
getMaxTokenCount
public Integer getMaxTokenCount()
Get the maxTokenCount property: The maximum number of tokens to produce. Default is 1.- Returns:
- the maxTokenCount value.
-
setMaxTokenCount
public LimitTokenFilter setMaxTokenCount(Integer maxTokenCount)
Set the maxTokenCount property: The maximum number of tokens to produce. Default is 1.- Parameters:
maxTokenCount
- the maxTokenCount value to set.- Returns:
- the LimitTokenFilter object itself.
-
areAllTokensConsumed
public Boolean areAllTokensConsumed()
Get the consumeAllTokens property: A value indicating whether all tokens from the input must be consumed even if maxTokenCount is reached. Default is false.- Returns:
- the consumeAllTokens value.
-
setAllTokensConsumed
public LimitTokenFilter setAllTokensConsumed(Boolean allTokensConsumed)
Set the consumeAllTokens property: A value indicating whether all tokens from the input must be consumed even if maxTokenCount is reached. Default is false.- Parameters:
allTokensConsumed
- the consumeAllTokens value to set.- Returns:
- the LimitTokenFilter object itself.
-
-