DocumentOperationsExtensions.Suggest Method (IDocumentOperations, String, String)

Suggests query terms based on input text and matching documents in the Azure Search index. (see https://msdn.microsoft.com/en-us/library/azure/dn798936.aspx for more information)

Namespace: Microsoft.Azure.Search
Assembly: Microsoft.Azure.Search (in Microsoft.Azure.Search.dll)

Usage

'Usage
Dim operations As IDocumentOperations
Dim searchText As String
Dim suggesterName As String
Dim returnValue As DocumentSuggestResponse

returnValue = DocumentOperationsExtensions.Suggest(operations, searchText, suggesterName)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Suggest ( _
    operations As IDocumentOperations, _
    searchText As String, _
    suggesterName As String _
) As DocumentSuggestResponse
[ExtensionAttribute] 
public static DocumentSuggestResponse Suggest (
    IDocumentOperations operations,
    string searchText,
    string suggesterName
)
[ExtensionAttribute] 
public:
static DocumentSuggestResponse^ Suggest (
    IDocumentOperations^ operations, 
    String^ searchText, 
    String^ suggesterName
)
/** @attribute ExtensionAttribute() */ 
public static DocumentSuggestResponse Suggest (
    IDocumentOperations operations, 
    String searchText, 
    String suggesterName
)
ExtensionAttribute 
public static function Suggest (
    operations : IDocumentOperations, 
    searchText : String, 
    suggesterName : String
) : DocumentSuggestResponse

Parameters

  • searchText
    The search text on which to base suggestions.
  • suggesterName
    The name of the suggester as specified in the suggesters collection that's part of the index definition.

Return Value

Response containing the suggested text and documents matching the query.

Remarks

The non-generic overloads of the Suggest and SuggestAsync methods make a best-effort attempt to map JSON types in the response payload to .NET types. See GetAsync(String,Generic IEnumerable,CancellationToken) for more information.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

See Also

Reference

DocumentOperationsExtensions Class
DocumentOperationsExtensions Members
Microsoft.Azure.Search Namespace