ShingleTokenFilter Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. TokenFilter - com.
azure. search. documents. indexes. models. ShingleTokenFilter
- com.
- com.
public final class ShingleTokenFilter
extends TokenFilter
Creates combinations of tokens as a single token. This token filter is implemented using Apache Lucene.
Constructor | Description |
---|---|
Shingle |
Creates an instance of Shingle |
Modifier and Type | Method and Description |
---|---|
Boolean |
are Get the output |
Boolean |
are Get the output |
static
Shingle |
from Reads an instance of Shingle |
String |
get Get the filter |
Integer |
get Get the max |
Integer |
get Get the min |
String |
get Get the odata |
String |
get Get the token |
Shingle |
set Set the filter |
Shingle |
set Set the max |
Shingle |
set Set the min |
Shingle |
set Set the output |
Shingle |
set Set the output |
Shingle |
set Set the token |
Json |
to |
Methods inherited from TokenFilter
Methods inherited from java.lang.Object
ShingleTokenFilter
public ShingleTokenFilter(String name)
Creates an instance of ShingleTokenFilter class.
Parameters:
areOutputUnigrams
public Boolean 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:
areOutputUnigramsIfNoShingles
public Boolean 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:
fromJson
public static ShingleTokenFilter fromJson(JsonReader jsonReader)
Reads an instance of ShingleTokenFilter from the JsonReader.
Parameters:
Returns:
Throws:
getFilterToken
public String getFilterToken()
Get the filterToken property: The string to insert for each position at which there is no token. Default is an underscore ("_").
Returns:
getMaxShingleSize
public Integer getMaxShingleSize()
Get the maxShingleSize property: The maximum shingle size. Default and minimum value is 2.
Returns:
getMinShingleSize
public Integer getMinShingleSize()
Get the minShingleSize property: The minimum shingle size. Default and minimum value is 2. Must be less than the value of maxShingleSize.
Returns:
getOdataType
public String getOdataType()
Get the odataType property: A URI fragment specifying the type of token filter.
Overrides:
ShingleTokenFilter.getOdataType()Returns:
getTokenSeparator
public String getTokenSeparator()
Get the tokenSeparator property: The string to use when joining adjacent tokens to form a shingle. Default is a single space (" ").
Returns:
setFilterToken
public ShingleTokenFilter setFilterToken(String filterToken)
Set the filterToken property: The string to insert for each position at which there is no token. Default is an underscore ("_").
Parameters:
Returns:
setMaxShingleSize
public ShingleTokenFilter setMaxShingleSize(Integer maxShingleSize)
Set the maxShingleSize property: The maximum shingle size. Default and minimum value is 2.
Parameters:
Returns:
setMinShingleSize
public ShingleTokenFilter setMinShingleSize(Integer minShingleSize)
Set the minShingleSize property: The minimum shingle size. Default and minimum value is 2. Must be less than the value of maxShingleSize.
Parameters:
Returns:
setOutputUnigrams
public ShingleTokenFilter setOutputUnigrams(Boolean outputUnigrams)
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:
Returns:
setOutputUnigramsIfNoShingles
public ShingleTokenFilter setOutputUnigramsIfNoShingles(Boolean outputUnigramsIfNoShingles)
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:
Returns:
setTokenSeparator
public ShingleTokenFilter setTokenSeparator(String tokenSeparator)
Set the tokenSeparator property: The string to use when joining adjacent tokens to form a shingle. Default is a single space (" ").
Parameters:
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
ShingleTokenFilter.toJson(JsonWriter jsonWriter)Parameters:
Throws:
Azure SDK for Java-feedback
Azure SDK for Java is een open source project. Selecteer een koppeling om feedback te geven: