LimitTokenFilter Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. TokenFilter - com.
azure. search. documents. indexes. models. LimitTokenFilter
- com.
- com.
public final class LimitTokenFilter
extends TokenFilter
Limits the number of tokens while indexing. This token filter is implemented using Apache Lucene.
Constructor Summary
| Constructor | Description |
|---|---|
| LimitTokenFilter(String name) |
Creates an instance of Limit |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| Boolean |
areAllTokensConsumed()
Get the all |
|
static
Limit |
fromJson(JsonReader jsonReader)
Reads an instance of Limit |
| Integer |
getMaxTokenCount()
Get the max |
| String |
getOdataType()
Get the odata |
|
Limit |
setAllTokensConsumed(Boolean allTokensConsumed)
Set the all |
|
Limit |
setMaxTokenCount(Integer maxTokenCount)
Set the max |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from TokenFilter
Methods inherited from java.lang.Object
Constructor Details
LimitTokenFilter
public LimitTokenFilter(String name)
Creates an instance of LimitTokenFilter class.
Parameters:
Method Details
areAllTokensConsumed
public Boolean areAllTokensConsumed()
Get the allTokensConsumed property: A value indicating whether all tokens from the input must be consumed even if maxTokenCount is reached. Default is false.
Returns:
fromJson
public static LimitTokenFilter fromJson(JsonReader jsonReader)
Reads an instance of LimitTokenFilter from the JsonReader.
Parameters:
Returns:
Throws:
getMaxTokenCount
public Integer getMaxTokenCount()
Get the maxTokenCount property: The maximum number of tokens to produce. Default is 1.
Returns:
getOdataType
public String getOdataType()
Get the odataType property: A URI fragment specifying the type of token filter.
Overrides:
LimitTokenFilter.getOdataType()Returns:
setAllTokensConsumed
public LimitTokenFilter setAllTokensConsumed(Boolean allTokensConsumed)
Set the allTokensConsumed property: A value indicating whether all tokens from the input must be consumed even if maxTokenCount is reached. Default is false.
Parameters:
Returns:
setMaxTokenCount
public LimitTokenFilter setMaxTokenCount(Integer maxTokenCount)
Set the maxTokenCount property: The maximum number of tokens to produce. Default is 1.
Parameters:
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
LimitTokenFilter.toJson(JsonWriter jsonWriter)Parameters:
Throws: