SearchModelFactory.LimitTokenFilter Method

Definition

Limits the number of tokens while indexing. This token filter is implemented using Apache Lucene.

public static Azure.Search.Documents.Indexes.Models.LimitTokenFilter LimitTokenFilter(string name = default, int? maxTokenCount = default, bool? consumeAllTokens = default);
static member LimitTokenFilter : string * Nullable<int> * Nullable<bool> -> Azure.Search.Documents.Indexes.Models.LimitTokenFilter
Public Shared Function LimitTokenFilter (Optional name As String = Nothing, Optional maxTokenCount As Nullable(Of Integer) = Nothing, Optional consumeAllTokens As Nullable(Of Boolean) = Nothing) As LimitTokenFilter

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.

maxTokenCount
Nullable<Int32>

The maximum number of tokens to produce. Default is 1.

consumeAllTokens
Nullable<Boolean>

A value indicating whether all tokens from the input must be consumed even if maxTokenCount is reached. Default is false.

Returns

A new LimitTokenFilter instance for mocking.

Applies to