共用方式為


DocumentsOperationsExtensions.Search Method

Definition

Overloads

Search(IDocumentsOperations, String, SearchParameters, SearchRequestOptions)

Searches for documents in the search index. https://docs.microsoft.com/rest/api/searchservice/Search-Documents

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

Searches for documents in the search index. https://docs.microsoft.com/rest/api/searchservice/Search-Documents

Search(IDocumentsOperations, String, SearchParameters, SearchRequestOptions)

Source:
DocumentsOperationsExtensions.cs

Searches for documents in the search index. https://docs.microsoft.com/rest/api/searchservice/Search-Documents

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 = default, Microsoft.Azure.Search.Models.SearchRequestOptions searchRequestOptions = default);
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>
<Extension()>
Public Function Search (operations As IDocumentsOperations, searchText As String, Optional searchParameters As SearchParameters = Nothing, Optional searchRequestOptions As SearchRequestOptions = Nothing) As DocumentSearchResult(Of Document)

Parameters

operations
IDocumentsOperations

The operations group for this extension method.

searchText
String

A full-text search query expression; Use null or "*" to match all documents. See https://docs.microsoft.com/rest/api/searchservice/Simple-query-syntax-in-Azure-Search for more information about search query syntax.

searchParameters
SearchParameters

Parameters to further refine the search query.

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 Cognitive 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

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

Source:
DocumentsOperationsExtensions.cs

Searches for documents in the search index. https://docs.microsoft.com/rest/api/searchservice/Search-Documents

public static Microsoft.Azure.Search.Models.DocumentSearchResult<T> Search<T> (this Microsoft.Azure.Search.IDocumentsOperations operations, string searchText, Microsoft.Azure.Search.Models.SearchParameters searchParameters = default, Microsoft.Azure.Search.Models.SearchRequestOptions searchRequestOptions = default);
static member Search : Microsoft.Azure.Search.IDocumentsOperations * string * Microsoft.Azure.Search.Models.SearchParameters * Microsoft.Azure.Search.Models.SearchRequestOptions -> Microsoft.Azure.Search.Models.DocumentSearchResult<'T>
<Extension()>
Public Function Search(Of T) (operations As IDocumentsOperations, searchText As String, Optional searchParameters As SearchParameters = Nothing, Optional searchRequestOptions As SearchRequestOptions = Nothing) As DocumentSearchResult(Of 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

The operations group for this extension method.

searchText
String

A full-text search query expression; Use null or "*" to match all documents. See https://docs.microsoft.com/rest/api/searchservice/Simple-query-syntax-in-Azure-Search for more information about search query syntax.

searchParameters
SearchParameters

Parameters to further refine the search query.

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 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 Cognitive 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