DocumentOperationsExtensions.SuggestAsync Method

 

Applies To: Microsoft Azure

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

Overload List

Name Description
System_CAPS_pubmethodSystem_CAPS_static SuggestAsync(IDocumentOperations, String, String)

Suggests query terms based on input text and matching documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798936.aspx

System_CAPS_pubmethodSystem_CAPS_static SuggestAsync(IDocumentOperations, String, String, SuggestParameters)

Suggests query terms based on input text and matching documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798936.aspx

System_CAPS_pubmethodSystem_CAPS_static SuggestAsync<T>(IDocumentOperations, String, String)

Suggests query terms based on input text and matching documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798936.aspx

System_CAPS_pubmethodSystem_CAPS_static SuggestAsync<T>(IDocumentOperations, String, String, SuggestParameters)

Suggests query terms based on input text and matching documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798936.aspx

See Also

DocumentOperationsExtensions Class
Microsoft.Azure.Search Namespace

Return to top

DocumentOperationsExtensions.SuggestAsync Method (IDocumentOperations, String, String)

Suggests query terms based on input text and matching documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798936.aspx

Syntax

public static Task<DocumentSuggestResponse> SuggestAsync(
    this IDocumentOperations operations,
    string searchText,
    string suggesterName
)
public:
[ExtensionAttribute]
static Task<DocumentSuggestResponse^>^ SuggestAsync(
    IDocumentOperations^ operations,
    String^ searchText,
    String^ suggesterName
)
static member SuggestAsync : 
        operations:IDocumentOperations *
        searchText:string *
        suggesterName:string -> Task<DocumentSuggestResponse>
<ExtensionAttribute>
Public Shared Function SuggestAsync (
    operations As IDocumentOperations,
    searchText As String,
    suggesterName As String
) As Task(Of DocumentSuggestResponse)

Parameters

  • searchText
    Type: System.String

    The search text on which to base suggestions.

  • suggesterName
    Type: System.String

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

Return Value

Type: System.Threading.Tasks.Task<DocumentSuggestResponse>

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 for more information.

Return to top

DocumentOperationsExtensions.SuggestAsync Method (IDocumentOperations, String, String, SuggestParameters)

Suggests query terms based on input text and matching documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798936.aspx

Syntax

public static Task<DocumentSuggestResponse> SuggestAsync(
    this IDocumentOperations operations,
    string searchText,
    string suggesterName,
    SuggestParameters suggestParameters
)
public:
[ExtensionAttribute]
static Task<DocumentSuggestResponse^>^ SuggestAsync(
    IDocumentOperations^ operations,
    String^ searchText,
    String^ suggesterName,
    SuggestParameters^ suggestParameters
)
static member SuggestAsync : 
        operations:IDocumentOperations *
        searchText:string *
        suggesterName:string *
        suggestParameters:SuggestParameters -> Task<DocumentSuggestResponse>
<ExtensionAttribute>
Public Shared Function SuggestAsync (
    operations As IDocumentOperations,
    searchText As String,
    suggesterName As String,
    suggestParameters As SuggestParameters
) As Task(Of DocumentSuggestResponse)

Parameters

  • searchText
    Type: System.String

    The search text on which to base suggestions.

  • suggesterName
    Type: System.String

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

Return Value

Type: System.Threading.Tasks.Task<DocumentSuggestResponse>

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 for more information.

Return to top

DocumentOperationsExtensions.SuggestAsync<T> Method (IDocumentOperations, String, String)

Suggests query terms based on input text and matching documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798936.aspx

Syntax

public static Task<DocumentSuggestResponse<T>> SuggestAsync<T>(
    this IDocumentOperations operations,
    string searchText,
    string suggesterName
)
where T : class
public:
generic<typename T>
where T : ref class
[ExtensionAttribute]
static Task<DocumentSuggestResponse<T>^>^ SuggestAsync(
    IDocumentOperations^ operations,
    String^ searchText,
    String^ suggesterName
)
static member SuggestAsync<'T when 'T : not struct> : 
        operations:IDocumentOperations *
        searchText:string *
        suggesterName:string -> Task<DocumentSuggestResponse<'T>>
<ExtensionAttribute>
Public Shared Function SuggestAsync(Of T As Class) (
    operations As IDocumentOperations,
    searchText As String,
    suggesterName As String
) As Task(Of DocumentSuggestResponse(Of T))

Parameters

  • searchText
    Type: System.String

    The search text on which to base suggestions.

  • suggesterName
    Type: System.String

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

Return Value

Type: System.Threading.Tasks.Task<DocumentSuggestResponse<T>>

Response containing the suggested text and documents matching the query.

Type Parameters

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

Remarks

The generic overloads of the Suggest and SuggestAsync methods support mapping of Azure Search field types to .NET types via the type parameter T. See GetAsync<T> for more details on the type mapping.

Return to top

DocumentOperationsExtensions.SuggestAsync<T> Method (IDocumentOperations, String, String, SuggestParameters)

Suggests query terms based on input text and matching documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798936.aspx

Syntax

public static Task<DocumentSuggestResponse<T>> SuggestAsync<T>(
    this IDocumentOperations operations,
    string searchText,
    string suggesterName,
    SuggestParameters suggestParameters
)
where T : class
public:
generic<typename T>
where T : ref class
[ExtensionAttribute]
static Task<DocumentSuggestResponse<T>^>^ SuggestAsync(
    IDocumentOperations^ operations,
    String^ searchText,
    String^ suggesterName,
    SuggestParameters^ suggestParameters
)
static member SuggestAsync<'T when 'T : not struct> : 
        operations:IDocumentOperations *
        searchText:string *
        suggesterName:string *
        suggestParameters:SuggestParameters -> Task<DocumentSuggestResponse<'T>>
<ExtensionAttribute>
Public Shared Function SuggestAsync(Of T As Class) (
    operations As IDocumentOperations,
    searchText As String,
    suggesterName As String,
    suggestParameters As SuggestParameters
) As Task(Of DocumentSuggestResponse(Of T))

Parameters

  • searchText
    Type: System.String

    The search text on which to base suggestions.

  • suggesterName
    Type: System.String

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

Return Value

Type: System.Threading.Tasks.Task<DocumentSuggestResponse<T>>

Response containing the suggested text and documents matching the query.

Type Parameters

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

Remarks

The generic overloads of the Suggest and SuggestAsync methods support mapping of Azure Search field types to .NET types via the type parameter T. See GetAsync<T> for more details on the type mapping.

Return to top