LengthTokenFilter Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. TokenFilter - com.
azure. search. documents. indexes. models. LengthTokenFilter
- com.
- com.
public final class LengthTokenFilter
extends TokenFilter
Removes words that are too long or too short. This token filter is implemented using Apache Lucene.
Constructor Summary
| Constructor | Description |
|---|---|
| LengthTokenFilter(String name) |
Creates an instance of Length |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Length |
fromJson(JsonReader jsonReader)
Reads an instance of Length |
| Integer |
getMaxLength()
Get the max |
| Integer |
getMinLength()
Get the min |
| String |
getOdataType()
Get the odata |
|
Length |
setMaxLength(Integer maxLength)
Set the max |
|
Length |
setMinLength(Integer minLength)
Set the min |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from TokenFilter
Methods inherited from java.lang.Object
Constructor Details
LengthTokenFilter
public LengthTokenFilter(String name)
Creates an instance of LengthTokenFilter class.
Parameters:
Method Details
fromJson
public static LengthTokenFilter fromJson(JsonReader jsonReader)
Reads an instance of LengthTokenFilter from the JsonReader.
Parameters:
Returns:
Throws:
getMaxLength
public Integer getMaxLength()
Get the maxLength property: The maximum length in characters. Default and maximum is 300.
Returns:
getMinLength
public Integer getMinLength()
Get the minLength property: The minimum length in characters. Default is 0. Maximum is 300. Must be less than the value of max.
Returns:
getOdataType
public String getOdataType()
Get the odataType property: A URI fragment specifying the type of token filter.
Overrides:
LengthTokenFilter.getOdataType()Returns:
setMaxLength
public LengthTokenFilter setMaxLength(Integer maxLength)
Set the maxLength property: The maximum length in characters. Default and maximum is 300.
Parameters:
Returns:
setMinLength
public LengthTokenFilter setMinLength(Integer minLength)
Set the minLength property: The minimum length in characters. Default is 0. Maximum is 300. Must be less than the value of max.
Parameters:
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
LengthTokenFilter.toJson(JsonWriter jsonWriter)Parameters:
Throws: