SearchModelFactory.CustomAnalyzer Method

Definition

Allows you to take control over the process of converting text into indexable/searchable tokens. It's a user-defined configuration consisting of a single predefined tokenizer and one or more filters. The tokenizer is responsible for breaking text into tokens, and the filters for modifying tokens emitted by the tokenizer.

public static Azure.Search.Documents.Indexes.Models.CustomAnalyzer CustomAnalyzer(string name = default, Azure.Search.Documents.Indexes.Models.LexicalTokenizerName tokenizerName = default, System.Collections.Generic.IEnumerable<Azure.Search.Documents.Indexes.Models.TokenFilterName> tokenFilters = default, System.Collections.Generic.IEnumerable<string> charFilters = default);
static member CustomAnalyzer : string * Azure.Search.Documents.Indexes.Models.LexicalTokenizerName * seq<Azure.Search.Documents.Indexes.Models.TokenFilterName> * seq<string> -> Azure.Search.Documents.Indexes.Models.CustomAnalyzer
Public Shared Function CustomAnalyzer (Optional name As String = Nothing, Optional tokenizerName As LexicalTokenizerName = Nothing, Optional tokenFilters As IEnumerable(Of TokenFilterName) = Nothing, Optional charFilters As IEnumerable(Of String) = Nothing) As CustomAnalyzer

Parameters

name
String

The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.

tokenizerName
LexicalTokenizerName

The name of the tokenizer to use to divide continuous text into a sequence of tokens, such as breaking a sentence into words.

tokenFilters
IEnumerable<TokenFilterName>

A list of token filters used to filter out or modify the tokens generated by a tokenizer. For example, you can specify a lowercase filter that converts all characters to lowercase. The filters are run in the order in which they are listed.

charFilters
IEnumerable<String>

A list of character filters used to prepare input text before it is processed by the tokenizer. For instance, they can replace certain characters or symbols. The filters are run in the order in which they are listed.

Returns

A new CustomAnalyzer instance for mocking.

Applies to