共用方式為


DocumentsOperationsExtensions.Suggest Method

Definition

Overloads

Suggest(IDocumentsOperations, String, String, SuggestParameters, SearchRequestOptions)

Suggests query terms based on input text and matching documents in the search index. https://docs.microsoft.com/rest/api/searchservice/Suggestions

Suggest<T>(IDocumentsOperations, String, String, SuggestParameters, SearchRequestOptions)

Suggests query terms based on input text and matching documents in the search index. https://docs.microsoft.com/rest/api/searchservice/Suggestions

Suggest(IDocumentsOperations, String, String, SuggestParameters, SearchRequestOptions)

Source:
DocumentsOperationsExtensions.cs

Suggests query terms based on input text and matching documents in the search index. https://docs.microsoft.com/rest/api/searchservice/Suggestions

public static Microsoft.Azure.Search.Models.DocumentSuggestResult<Microsoft.Azure.Search.Models.Document> Suggest (this Microsoft.Azure.Search.IDocumentsOperations operations, string searchText, string suggesterName, Microsoft.Azure.Search.Models.SuggestParameters suggestParameters = default, Microsoft.Azure.Search.Models.SearchRequestOptions searchRequestOptions = default);
static member Suggest : Microsoft.Azure.Search.IDocumentsOperations * string * string * Microsoft.Azure.Search.Models.SuggestParameters * Microsoft.Azure.Search.Models.SearchRequestOptions -> Microsoft.Azure.Search.Models.DocumentSuggestResult<Microsoft.Azure.Search.Models.Document>
<Extension()>
Public Function Suggest (operations As IDocumentsOperations, searchText As String, suggesterName As String, Optional suggestParameters As SuggestParameters = Nothing, Optional searchRequestOptions As SearchRequestOptions = Nothing) As DocumentSuggestResult(Of Document)

Parameters

operations
IDocumentsOperations

The operations group for this extension method.

searchText
String

The search text on which to base suggestions.

suggesterName
String

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

suggestParameters
SuggestParameters

Parameters to further refine the suggestion query.

searchRequestOptions
SearchRequestOptions

Additional parameters for the operation

Returns

Response containing the suggested text and documents matching the query.

Remarks

The non-generic overloads of the Suggest, SuggestAsync, and SuggestWithHttpMessagesAsync methods make a best-effort attempt to map JSON types in the response payload to .NET types. See GetWithHttpMessagesAsync(String, IEnumerable<String>, SearchRequestOptions, Dictionary<String,List<String>>, CancellationToken) for more information.

Applies to

Suggest<T>(IDocumentsOperations, String, String, SuggestParameters, SearchRequestOptions)

Source:
DocumentsOperationsExtensions.cs

Suggests query terms based on input text and matching documents in the search index. https://docs.microsoft.com/rest/api/searchservice/Suggestions

public static Microsoft.Azure.Search.Models.DocumentSuggestResult<T> Suggest<T> (this Microsoft.Azure.Search.IDocumentsOperations operations, string searchText, string suggesterName, Microsoft.Azure.Search.Models.SuggestParameters suggestParameters = default, Microsoft.Azure.Search.Models.SearchRequestOptions searchRequestOptions = default);
static member Suggest : Microsoft.Azure.Search.IDocumentsOperations * string * string * Microsoft.Azure.Search.Models.SuggestParameters * Microsoft.Azure.Search.Models.SearchRequestOptions -> Microsoft.Azure.Search.Models.DocumentSuggestResult<'T>
<Extension()>
Public Function Suggest(Of T) (operations As IDocumentsOperations, searchText As String, suggesterName As String, Optional suggestParameters As SuggestParameters = Nothing, Optional searchRequestOptions As SearchRequestOptions = Nothing) As DocumentSuggestResult(Of T)

Type Parameters

T

The CLR type that maps to the index schema. Instances of this type can be retrieved as documents from the index.

Parameters

operations
IDocumentsOperations

The operations group for this extension method.

searchText
String

The search text on which to base suggestions.

suggesterName
String

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

suggestParameters
SuggestParameters

Parameters to further refine the suggestion query.

searchRequestOptions
SearchRequestOptions

Additional parameters for the operation

Returns

Response containing the suggested text and documents matching the query.

Remarks

The generic overloads of the Suggest, SuggestAsync, and SuggestWithHttpMessagesAsync methods support mapping of search field types to .NET types via the type parameter T. See GetWithHttpMessagesAsync<T>(String, IEnumerable<String>, SearchRequestOptions, Dictionary<String,List<String>>, CancellationToken) for more details on the type mapping.

Applies to