你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

IDocumentsOperations.SuggestWithHttpMessagesAsync 方法

定义

重载

SuggestWithHttpMessagesAsync(String, String, SuggestParameters, SearchRequestOptions, Dictionary<String,List<String>>, CancellationToken)

根据输入文本和搜索索引中的匹配文档建议查询词。 https://docs.microsoft.com/rest/api/searchservice/Suggestions

SuggestWithHttpMessagesAsync<T>(String, String, SuggestParameters, SearchRequestOptions, Dictionary<String,List<String>>, CancellationToken)

根据输入文本和搜索索引中的匹配文档建议查询词。 https://docs.microsoft.com/rest/api/searchservice/Suggestions

SuggestWithHttpMessagesAsync(String, String, SuggestParameters, SearchRequestOptions, Dictionary<String,List<String>>, CancellationToken)

根据输入文本和搜索索引中的匹配文档建议查询词。 https://docs.microsoft.com/rest/api/searchservice/Suggestions

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Search.Models.DocumentSuggestResult<Microsoft.Azure.Search.Models.Document>>> SuggestWithHttpMessagesAsync (string searchText, string suggesterName, Microsoft.Azure.Search.Models.SuggestParameters suggestParameters, Microsoft.Azure.Search.Models.SearchRequestOptions searchRequestOptions = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SuggestWithHttpMessagesAsync : string * string * Microsoft.Azure.Search.Models.SuggestParameters * Microsoft.Azure.Search.Models.SearchRequestOptions * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Search.Models.DocumentSuggestResult<Microsoft.Azure.Search.Models.Document>>>
Public Function SuggestWithHttpMessagesAsync (searchText As String, suggesterName As String, suggestParameters As SuggestParameters, Optional searchRequestOptions As SearchRequestOptions = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of DocumentSuggestResult(Of Document)))

参数

searchText
String

建议所基于的搜索文本。

suggesterName
String

作为索引定义的一部分的建议器集合中指定的建议器的名称。

suggestParameters
SuggestParameters

用于进一步优化建议查询的参数。

searchRequestOptions
SearchRequestOptions

操作的其他参数

customHeaders
Dictionary<String,List<String>>

将添加到请求的标头。

cancellationToken
CancellationToken

取消标记。

返回

包含与查询匹配的建议文本和文档的响应。

注解

Suggest、SuggestAsync 和 SuggestWithHttpMessagesAsync 方法的非泛型重载会尽力尝试将响应有效负载中的 JSON 类型映射到 .NET 类型。 有关详细信息,请参阅GetWithHttpMessagesAsync(String, IEnumerable<String>, SearchRequestOptions, Dictionary<String,List<String>>, CancellationToken)

适用于

SuggestWithHttpMessagesAsync<T>(String, String, SuggestParameters, SearchRequestOptions, Dictionary<String,List<String>>, CancellationToken)

根据输入文本和搜索索引中的匹配文档建议查询词。 https://docs.microsoft.com/rest/api/searchservice/Suggestions

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Search.Models.DocumentSuggestResult<T>>> SuggestWithHttpMessagesAsync<T> (string searchText, string suggesterName, Microsoft.Azure.Search.Models.SuggestParameters suggestParameters, Microsoft.Azure.Search.Models.SearchRequestOptions searchRequestOptions = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SuggestWithHttpMessagesAsync : string * string * Microsoft.Azure.Search.Models.SuggestParameters * Microsoft.Azure.Search.Models.SearchRequestOptions * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Search.Models.DocumentSuggestResult<'T>>>
Public Function SuggestWithHttpMessagesAsync(Of T) (searchText As String, suggesterName As String, suggestParameters As SuggestParameters, Optional searchRequestOptions As SearchRequestOptions = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse(Of DocumentSuggestResult(Of T)))

类型参数

T

映射到索引架构的 CLR 类型。 可以从索引中以文档的形式检索此类型的实例。

参数

searchText
String

建议所基于的搜索文本。

suggesterName
String

作为索引定义的一部分的建议器集合中指定的建议器的名称。

suggestParameters
SuggestParameters

用于进一步优化建议查询的参数。

searchRequestOptions
SearchRequestOptions

操作的其他参数

customHeaders
Dictionary<String,List<String>>

将添加到请求的标头。

cancellationToken
CancellationToken

取消标记。

返回

包含与查询匹配的建议文本和文档的响应。

注解

Suggest、SuggestAsync 和 SuggestWithHttpMessagesAsync 方法的泛型重载支持通过类型参数 T 将搜索字段类型映射到 .NET 类型。有关类型映射的更多详细信息,请参阅 GetWithHttpMessagesAsync<T>(String, IEnumerable<String>, SearchRequestOptions, Dictionary<String,List<String>>, CancellationToken)

适用于