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 |
|---|---|
|
static
Limit |
fromJson(JsonReader jsonReader)
Reads an instance of Limit |
| Integer |
getMaxTokenCount()
Get the max |
| String |
getOdataType()
Get the odata |
| Boolean |
isConsumeAllTokens()
Get the consume |
|
Limit |
setConsumeAllTokens(Boolean consumeAllTokens)
Set the consume |
|
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
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: The discriminator for derived types.
Overrides:
LimitTokenFilter.getOdataType()Returns:
isConsumeAllTokens
public Boolean isConsumeAllTokens()
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:
setConsumeAllTokens
public LimitTokenFilter setConsumeAllTokens(Boolean consumeAllTokens)
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:
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: