Class UniqueTokenFilter
- java.lang.Object
-
- com.azure.search.documents.indexes.models.TokenFilter
-
- com.azure.search.documents.indexes.models.UniqueTokenFilter
-
public final class UniqueTokenFilter extends TokenFilter
Filters out tokens with same text as the previous token. This token filter is implemented using Apache Lucene.
-
-
Constructor Summary
Constructors Constructor Description UniqueTokenFilter(String name)
Constructor ofUniqueTokenFilter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
isOnlyOnSamePosition()
Get the onlyOnSamePosition property: A value indicating whether to remove duplicates only at the same position.UniqueTokenFilter
setOnlyOnSamePosition(Boolean onlyOnSamePosition)
Set the onlyOnSamePosition property: A value indicating whether to remove duplicates only at the same position.-
Methods inherited from class com.azure.search.documents.indexes.models.TokenFilter
getName
-
-
-
-
Constructor Detail
-
UniqueTokenFilter
public UniqueTokenFilter(String name)
Constructor ofUniqueTokenFilter
.- 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
-
isOnlyOnSamePosition
public Boolean isOnlyOnSamePosition()
Get the onlyOnSamePosition property: A value indicating whether to remove duplicates only at the same position. Default is false.- Returns:
- the onlyOnSamePosition value.
-
setOnlyOnSamePosition
public UniqueTokenFilter setOnlyOnSamePosition(Boolean onlyOnSamePosition)
Set the onlyOnSamePosition property: A value indicating whether to remove duplicates only at the same position. Default is false.- Parameters:
onlyOnSamePosition
- the onlyOnSamePosition value to set.- Returns:
- the UniqueTokenFilter object itself.
-
-