DocumentOperationsExtensions.SearchAsync 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 SearchAsync(IDocumentOperations, String)

Searches for documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798927.aspx

System_CAPS_pubmethodSystem_CAPS_static SearchAsync(IDocumentOperations, String, SearchParameters)

Searches for documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798927.aspx

System_CAPS_pubmethodSystem_CAPS_static SearchAsync<T>(IDocumentOperations, String)

Searches for documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798927.aspx

System_CAPS_pubmethodSystem_CAPS_static SearchAsync<T>(IDocumentOperations, String, SearchParameters)

Searches for documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798927.aspx

See Also

DocumentOperationsExtensions Class
Microsoft.Azure.Search Namespace

Return to top

DocumentOperationsExtensions.SearchAsync Method (IDocumentOperations, String)

Searches for documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798927.aspx

Syntax

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

Parameters

Return Value

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

Response containing the documents matching the query.

Remarks

The non-generic overloads of the Search and SearchAsync 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.SearchAsync Method (IDocumentOperations, String, SearchParameters)

Searches for documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798927.aspx

Syntax

public static Task<DocumentSearchResponse> SearchAsync(
    this IDocumentOperations operations,
    string searchText,
    SearchParameters searchParameters
)
public:
[ExtensionAttribute]
static Task<DocumentSearchResponse^>^ SearchAsync(
    IDocumentOperations^ operations,
    String^ searchText,
    SearchParameters^ searchParameters
)
static member SearchAsync : 
        operations:IDocumentOperations *
        searchText:string *
        searchParameters:SearchParameters -> Task<DocumentSearchResponse>
<ExtensionAttribute>
Public Shared Function SearchAsync (
    operations As IDocumentOperations,
    searchText As String,
    searchParameters As SearchParameters
) As Task(Of DocumentSearchResponse)

Parameters

Return Value

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

Response containing the documents matching the query.

Remarks

The non-generic overloads of the Search and SearchAsync 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.SearchAsync<T> Method (IDocumentOperations, String)

Searches for documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798927.aspx

Syntax

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

Parameters

Return Value

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

Response containing the 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 Search and SearchAsync 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.SearchAsync<T> Method (IDocumentOperations, String, SearchParameters)

Searches for documents in the Azure Search index. https://msdn.microsoft.com/library/azure/dn798927.aspx

Syntax

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

Parameters

Return Value

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

Response containing the 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 Search and SearchAsync 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