Class ShingleTokenFilter
java.lang.Object
com.azure.search.documents.indexes.models.TokenFilter
com.azure.search.documents.indexes.models.ShingleTokenFilter
Creates combinations of tokens as a single token. This token filter is
implemented using Apache Lucene.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the outputUnigrams property: A value indicating whether the output stream will contain the input tokens (unigrams) as well as shingles.Get the outputUnigramsIfNoShingles property: A value indicating whether to output unigrams for those times when no shingles are available.Get the filterToken property: The string to insert for each position at which there is no token.Get the maxShingleSize property: The maximum shingle size.Get the minShingleSize property: The minimum shingle size.Get the tokenSeparator property: The string to use when joining adjacent tokens to form a shingle.setFilterToken
(String filterToken) Set the filterToken property: The string to insert for each position at which there is no token.setMaxShingleSize
(Integer maxShingleSize) Set the maxShingleSize property: The maximum shingle size.setMinShingleSize
(Integer minShingleSize) Set the minShingleSize property: The minimum shingle size.setOutputUnigrams
(Boolean outputUnigrams) Set the outputUnigrams property: A value indicating whether the output stream will contain the input tokens (unigrams) as well as shingles.setOutputUnigramsIfNoShingles
(Boolean outputUnigramsIfNoShingles) Set the outputUnigramsIfNoShingles property: A value indicating whether to output unigrams for those times when no shingles are available.setTokenSeparator
(String tokenSeparator) Set the tokenSeparator property: The string to use when joining adjacent tokens to form a shingle.Methods inherited from class com.azure.search.documents.indexes.models.TokenFilter
getName
-
Constructor Details
-
ShingleTokenFilter
Constructor ofShingleTokenFilter
.- 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 Details
-
getMaxShingleSize
Get the maxShingleSize property: The maximum shingle size. Default and minimum value is 2.- Returns:
- the maxShingleSize value.
-
setMaxShingleSize
Set the maxShingleSize property: The maximum shingle size. Default and minimum value is 2.- Parameters:
maxShingleSize
- the maxShingleSize value to set.- Returns:
- the ShingleTokenFilter object itself.
-
getMinShingleSize
Get the minShingleSize property: The minimum shingle size. Default and minimum value is 2. Must be less than the value of maxShingleSize.- Returns:
- the minShingleSize value.
-
setMinShingleSize
Set the minShingleSize property: The minimum shingle size. Default and minimum value is 2. Must be less than the value of maxShingleSize.- Parameters:
minShingleSize
- the minShingleSize value to set.- Returns:
- the ShingleTokenFilter object itself.
-
areOutputUnigrams
Get the outputUnigrams property: A value indicating whether the output stream will contain the input tokens (unigrams) as well as shingles. Default is true.- Returns:
- the outputUnigrams value.
-
setOutputUnigrams
Set the outputUnigrams property: A value indicating whether the output stream will contain the input tokens (unigrams) as well as shingles. Default is true.- Parameters:
outputUnigrams
- the outputUnigrams value to set.- Returns:
- the ShingleTokenFilter object itself.
-
areOutputUnigramsIfNoShingles
Get the outputUnigramsIfNoShingles property: A value indicating whether to output unigrams for those times when no shingles are available. This property takes precedence when outputUnigrams is set to false. Default is false.- Returns:
- the outputUnigramsIfNoShingles value.
-
setOutputUnigramsIfNoShingles
Set the outputUnigramsIfNoShingles property: A value indicating whether to output unigrams for those times when no shingles are available. This property takes precedence when outputUnigrams is set to false. Default is false.- Parameters:
outputUnigramsIfNoShingles
- the outputUnigramsIfNoShingles value to set.- Returns:
- the ShingleTokenFilter object itself.
-
getTokenSeparator
Get the tokenSeparator property: The string to use when joining adjacent tokens to form a shingle. Default is a single space (" ").- Returns:
- the tokenSeparator value.
-
setTokenSeparator
Set the tokenSeparator property: The string to use when joining adjacent tokens to form a shingle. Default is a single space (" ").- Parameters:
tokenSeparator
- the tokenSeparator value to set.- Returns:
- the ShingleTokenFilter object itself.
-
getFilterToken
Get the filterToken property: The string to insert for each position at which there is no token. Default is an underscore ("_").- Returns:
- the filterToken value.
-
setFilterToken
Set the filterToken property: The string to insert for each position at which there is no token. Default is an underscore ("_").- Parameters:
filterToken
- the filterToken value to set.- Returns:
- the ShingleTokenFilter object itself.
-