IDocumentOperations.SearchAsync Method (String, SearchParameters, CancellationToken)

Searches for documents in the Azure Search index. (see https://msdn.microsoft.com/en-us/library/azure/dn798927.aspx for more information)

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

Usage

'Usage
Dim instance As IDocumentOperations
Dim searchText As String
Dim searchParameters As SearchParameters
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of DocumentSearchResponse(Of T))

returnValue = instance.SearchAsync(searchText, searchParameters, cancellationToken)

Syntax

'Declaration
Function SearchAsync(Of T) ( _
    searchText As String, _
    searchParameters As SearchParameters, _
    cancellationToken As CancellationToken _
) As Task(Of DocumentSearchResponse(Of T))
Task<DocumentSearchResponse<T>> SearchAsync<T> (
    string searchText,
    SearchParameters searchParameters,
    CancellationToken cancellationToken
)
generic<typename T>
Task<DocumentSearchResponse<T>^>^ SearchAsync (
    String^ searchText, 
    SearchParameters^ searchParameters, 
    CancellationToken cancellationToken
)

GenericParameters

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

Parameters

  • searchParameters
    Parameters to further refine the search query.
  • cancellationToken
    Cancellation token.

Return Value

Response containing the documents matching the query.

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(String,Generic IEnumerable,CancellationToken) for more details on the type mapping.

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

IDocumentOperations Interface
IDocumentOperations Members
Microsoft.Azure.Search Namespace