SearchModelFactory.ShingleTokenFilter Method

Definition

Creates combinations of tokens as a single token. This token filter is implemented using Apache Lucene.

public static Azure.Search.Documents.Indexes.Models.ShingleTokenFilter ShingleTokenFilter(string name = default, int? maxShingleSize = default, int? minShingleSize = default, bool? outputUnigrams = default, bool? outputUnigramsIfNoShingles = default, string tokenSeparator = default, string filterToken = default);
static member ShingleTokenFilter : string * Nullable<int> * Nullable<int> * Nullable<bool> * Nullable<bool> * string * string -> Azure.Search.Documents.Indexes.Models.ShingleTokenFilter
Public Shared Function ShingleTokenFilter (Optional name As String = Nothing, Optional maxShingleSize As Nullable(Of Integer) = Nothing, Optional minShingleSize As Nullable(Of Integer) = Nothing, Optional outputUnigrams As Nullable(Of Boolean) = Nothing, Optional outputUnigramsIfNoShingles As Nullable(Of Boolean) = Nothing, Optional tokenSeparator As String = Nothing, Optional filterToken As String = Nothing) As ShingleTokenFilter

Parameters

name
String

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.

maxShingleSize
Nullable<Int32>

The maximum shingle size. Default and minimum value is 2.

minShingleSize
Nullable<Int32>

The minimum shingle size. Default and minimum value is 2. Must be less than the value of maxShingleSize.

outputUnigrams
Nullable<Boolean>

A value indicating whether the output stream will contain the input tokens (unigrams) as well as shingles. Default is true.

outputUnigramsIfNoShingles
Nullable<Boolean>

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.

tokenSeparator
String

The string to use when joining adjacent tokens to form a shingle. Default is a single space (" ").

filterToken
String

The string to insert for each position at which there is no token. Default is an underscore ("_").

Returns

A new ShingleTokenFilter instance for mocking.

Applies to