Delen via


AutocompleteParameters Constructors

Definition

Overloads

AutocompleteParameters()

Initializes a new instance of the AutocompleteParameters class.

AutocompleteParameters(AutocompleteMode, String, Nullable<Boolean>, String, String, Nullable<Double>, IList<String>, Nullable<Int32>)

Initializes a new instance of the AutocompleteParameters class.

AutocompleteParameters()

Source:
AutocompleteParameters.cs

Initializes a new instance of the AutocompleteParameters class.

public AutocompleteParameters ();
Public Sub New ()

Applies to

AutocompleteParameters(AutocompleteMode, String, Nullable<Boolean>, String, String, Nullable<Double>, IList<String>, Nullable<Int32>)

Source:
AutocompleteParameters.cs

Initializes a new instance of the AutocompleteParameters class.

public AutocompleteParameters (Microsoft.Azure.Search.Models.AutocompleteMode autocompleteMode = Microsoft.Azure.Search.Models.AutocompleteMode.OneTerm, string filter = default, bool? useFuzzyMatching = default, string highlightPostTag = default, string highlightPreTag = default, double? minimumCoverage = default, System.Collections.Generic.IList<string> searchFields = default, int? top = default);
new Microsoft.Azure.Search.Models.AutocompleteParameters : Microsoft.Azure.Search.Models.AutocompleteMode * string * Nullable<bool> * string * string * Nullable<double> * System.Collections.Generic.IList<string> * Nullable<int> -> Microsoft.Azure.Search.Models.AutocompleteParameters
Public Sub New (Optional autocompleteMode As AutocompleteMode = Microsoft.Azure.Search.Models.AutocompleteMode.OneTerm, Optional filter As String = Nothing, Optional useFuzzyMatching As Nullable(Of Boolean) = Nothing, Optional highlightPostTag As String = Nothing, Optional highlightPreTag As String = Nothing, Optional minimumCoverage As Nullable(Of Double) = Nothing, Optional searchFields As IList(Of String) = Nothing, Optional top As Nullable(Of Integer) = Nothing)

Parameters

autocompleteMode
AutocompleteMode

Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles and 'oneTermWithContext' to use the current context while producing auto-completed terms. Possible values include: 'oneTerm', 'twoTerms', 'oneTermWithContext'

filter
String

An OData expression that filters the documents used to produce completed terms for the Autocomplete result.

useFuzzyMatching
Nullable<Boolean>

A value indicating whether to use fuzzy matching for the autocomplete query. Default is false. When set to true, the query will find terms even if there's a substituted or missing character in the search text. While this provides a better experience in some scenarios, it comes at a performance cost as fuzzy autocomplete queries are slower and consume more resources.

highlightPostTag
String

A string tag that is appended to hit highlights. Must be set with highlightPreTag. If omitted, hit highlighting is disabled.

highlightPreTag
String

A string tag that is prepended to hit highlights. Must be set with highlightPostTag. If omitted, hit highlighting is disabled.

minimumCoverage
Nullable<Double>

A number between 0 and 100 indicating the percentage of the index that must be covered by an autocomplete query in order for the query to be reported as a success. This parameter can be useful for ensuring search availability even for services with only one replica. The default is 80.

searchFields
IList<String>

The list of field names to consider when querying for auto-completed terms. Target fields must be included in the specified suggester.

top
Nullable<Int32>

The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The default is 5.

Applies to