DocumentsOperationsExtensions.Search DocumentsOperationsExtensions.Search Method

Definition

Overloads

Search(IDocumentsOperations, String, SearchParameters, SearchRequestOptions) Search(IDocumentsOperations, String, SearchParameters, SearchRequestOptions)

Searches for documents in the Azure Search index.

Search<T>(IDocumentsOperations, String, SearchParameters, SearchRequestOptions) Search<T>(IDocumentsOperations, String, SearchParameters, SearchRequestOptions)

Searches for documents in the Azure Search index.

Search(IDocumentsOperations, String, SearchParameters, SearchRequestOptions) Search(IDocumentsOperations, String, SearchParameters, SearchRequestOptions)

Searches for documents in the Azure Search index.

public static Microsoft.Azure.Search.Models.DocumentSearchResult<Microsoft.Azure.Search.Models.Document> Search (this Microsoft.Azure.Search.IDocumentsOperations operations, string searchText, Microsoft.Azure.Search.Models.SearchParameters searchParameters = null, Microsoft.Azure.Search.Models.SearchRequestOptions searchRequestOptions = null);
static member Search : Microsoft.Azure.Search.IDocumentsOperations * string * Microsoft.Azure.Search.Models.SearchParameters * Microsoft.Azure.Search.Models.SearchRequestOptions -> Microsoft.Azure.Search.Models.DocumentSearchResult<Microsoft.Azure.Search.Models.Document>

Parameters

operations
IDocumentsOperations IDocumentsOperations

The operations group for this extension method.

searchText
String String

A full-text search query expression; Use null or "*" to match all documents. See for more information about search query syntax.

searchParameters
SearchParameters SearchParameters

Parameters to further refine the search query.

searchRequestOptions
SearchRequestOptions SearchRequestOptions

Additional parameters for the operation

Returns

Response containing the documents matching the query.

Remarks

The non-generic overloads of the Search, SearchAsync, and SearchWithHttpMessagesAsync methods make a best-effort attempt to map JSON types in the response payload to .NET types. See GetWithHttpMessagesAsync(String, IEnumerable<String>, SearchRequestOptions, Dictionary<String,List<String>>, CancellationToken) for more information.

If Azure Search can't include all results in a single response, the response returned will include a continuation token that can be passed to ContinueSearch to retrieve more results. See DocumentSearchResult.ContinuationToken for more information.

Search<T>(IDocumentsOperations, String, SearchParameters, SearchRequestOptions) Search<T>(IDocumentsOperations, String, SearchParameters, SearchRequestOptions)

Searches for documents in the Azure Search index.

public static Microsoft.Azure.Search.Models.DocumentSearchResult<T> Search<T> (this Microsoft.Azure.Search.IDocumentsOperations operations, string searchText, Microsoft.Azure.Search.Models.SearchParameters searchParameters = null, Microsoft.Azure.Search.Models.SearchRequestOptions searchRequestOptions = null);
static member Search : Microsoft.Azure.Search.IDocumentsOperations * string * Microsoft.Azure.Search.Models.SearchParameters * Microsoft.Azure.Search.Models.SearchRequestOptions -> Microsoft.Azure.Search.Models.DocumentSearchResult<'T>

Type Parameters

T

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

Parameters

operations
IDocumentsOperations IDocumentsOperations

The operations group for this extension method.

searchText
String String

A full-text search query expression; Use null or "*" to match all documents. See for more information about search query syntax.

searchParameters
SearchParameters SearchParameters

Parameters to further refine the search query.

searchRequestOptions
SearchRequestOptions SearchRequestOptions

Additional parameters for the operation

Returns

Response containing the documents matching the query.

Remarks

The generic overloads of the Search, SearchAsync, and SearchWithHttpMessagesAsync methods support mapping of Azure Search field types to .NET types via the type parameter T. See GetWithHttpMessagesAsync<T>(String, IEnumerable<String>, SearchRequestOptions, Dictionary<String,List<String>>, CancellationToken) for more details on the type mapping.

If Azure Search can't include all results in a single response, the response returned will include a continuation token that can be passed to ContinueSearch to retrieve more results. See DocumentSearchResult.ContinuationToken for more information.

Applies to