SearchModelFactory.SuggestOptions Method

Definition

The SuggestOptions.

public static Azure.Search.Documents.SuggestOptions SuggestOptions(string filter = default, bool? useFuzzyMatching = default, string highlightPostTag = default, string highlightPreTag = default, double? minimumCoverage = default, string orderByRaw = default, string searchText = default, string searchFieldsRaw = default, string selectRaw = default, string suggesterName = default, int? size = default);
static member SuggestOptions : string * Nullable<bool> * string * string * Nullable<double> * string * string * string * string * string * Nullable<int> -> Azure.Search.Documents.SuggestOptions
Public Shared Function SuggestOptions (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 orderByRaw As String = Nothing, Optional searchText As String = Nothing, Optional searchFieldsRaw As String = Nothing, Optional selectRaw As String = Nothing, Optional suggesterName As String = Nothing, Optional size As Nullable(Of Integer) = Nothing) As SuggestOptions

Parameters

filter
String

An OData expression that filters the documents considered for suggestions.

useFuzzyMatching
Nullable<Boolean>

A value indicating whether to use fuzzy matching for the suggestion query. Default is false. When set to true, the query will find suggestions 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 suggestion searches 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 of suggestions is disabled.

highlightPreTag
String

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

minimumCoverage
Nullable<Double>

A number between 0 and 100 indicating the percentage of the index that must be covered by a suggestion 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.

orderByRaw
String

The comma-separated list of OData $orderby expressions by which to sort the results. Each expression can be either a field name or a call to either the geo.distance() or the search.score() functions. Each expression can be followed by asc to indicate ascending, or desc to indicate descending. The default is ascending order. Ties will be broken by the match scores of documents. If no $orderby is specified, the default sort order is descending by document match score. There can be at most 32 $orderby clauses.

searchText
String

The search text to use to suggest documents. Must be at least 1 character, and no more than 100 characters.

searchFieldsRaw
String

The comma-separated list of field names to search for the specified search text. Target fields must be included in the specified suggester.

selectRaw
String

The comma-separated list of fields to retrieve. If unspecified, only the key field will be included in the results.

suggesterName
String

The name of the suggester as specified in the suggesters collection that's part of the index definition.

size
Nullable<Int32>

The number of suggestions to retrieve. This must be a value between 1 and 100. The default is 5.

Returns

A new SuggestOptions instance for mocking.

Applies to