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

DocumentsOperationsExtensions.Suggest 方法

定义

重载

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

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

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

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

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

Source:
DocumentsOperationsExtensions.cs

根据输入文本和搜索索引中的匹配文档建议查询词。 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)

参数

operations
IDocumentsOperations

此扩展方法的操作组。

searchText
String

要基于建议的搜索文本。

suggesterName
String

建议器集合中指定的建议器的名称,该集合是索引定义的一部分。

suggestParameters
SuggestParameters

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

searchRequestOptions
SearchRequestOptions

操作的其他参数

返回

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

注解

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

适用于

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

Source:
DocumentsOperationsExtensions.cs

根据输入文本和搜索索引中的匹配文档建议查询词。 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)

类型参数

T

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

参数

operations
IDocumentsOperations

此扩展方法的操作组。

searchText
String

要基于建议的搜索文本。

suggesterName
String

建议器集合中指定的建议器的名称,该集合是索引定义的一部分。

suggestParameters
SuggestParameters

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

searchRequestOptions
SearchRequestOptions

操作的其他参数

返回

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

注解

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

适用于