다음을 통해 공유


SearchClient Class

Definition

Azure Cognitive Search client that can be used to query an index and upload, merge, or delete documents.

public class SearchClient
type SearchClient = class
Public Class SearchClient
Inheritance
SearchClient

Constructors

SearchClient()

Initializes a new instance of the SearchClient class for mocking.

SearchClient(Uri, String, AzureKeyCredential, SearchClientOptions)

Initializes a new instance of the SearchClient class for querying an index and uploading, merging, or deleting documents.

SearchClient(Uri, String, AzureKeyCredential)

Initializes a new instance of the SearchClient class for querying an index and uploading, merging, or deleting documents.

SearchClient(Uri, String, TokenCredential, SearchClientOptions)

Initializes a new instance of the SearchClient class for querying an index and uploading, merging, or deleting documents.

SearchClient(Uri, String, TokenCredential)

Initializes a new instance of the SearchClient class for querying an index and uploading, merging, or deleting documents.

Properties

Endpoint

Gets the URI endpoint of the Search Service. This is likely to be similar to "https://{search_service}.search.windows.net".

IndexName

Gets the name of the Search Index.

Pipeline

The HTTP pipeline for sending and receiving REST requests and responses.

ServiceName

Gets the name of the Search Service.

Methods

Autocomplete(String, String, AutocompleteOptions, CancellationToken)

Suggests query terms based on input text and matching documents in the search index. Autocomplete

AutocompleteAsync(String, String, AutocompleteOptions, CancellationToken)

Suggests query terms based on input text and matching documents in the search index. Autocomplete

DeleteDocuments(String, IEnumerable<String>, IndexDocumentsOptions, CancellationToken)

Delete documents from the index as a batch given only their keys.

DeleteDocuments<T>(IEnumerable<T>, IndexDocumentsOptions, CancellationToken)

Delete documents from the index as a batch.

DeleteDocumentsAsync(String, IEnumerable<String>, IndexDocumentsOptions, CancellationToken)

Delete documents from the index as a batch given only their keys.

DeleteDocumentsAsync<T>(IEnumerable<T>, IndexDocumentsOptions, CancellationToken)

Delete documents from the index as a batch.

GetDocument<T>(String, GetDocumentOptions, CancellationToken)

Retrieves a document from Azure Cognitive Search. This is useful when a user clicks on a specific search result, and you want to look up specific details about that document. You can only get one document at a time. Use Search to get multiple documents in a single request. Lookup Document

GetDocumentAsync<T>(String, GetDocumentOptions, CancellationToken)

Retrieves a document from Azure Cognitive Search. This is useful when a user clicks on a specific search result, and you want to look up specific details about that document. You can only get one document at a time. Use Search to get multiple documents in a single request. Lookup Document

GetDocumentCount(CancellationToken)

Retrieves a count of the number of documents in this search index.

GetDocumentCountAsync(CancellationToken)

Retrieves a count of the number of documents in this search index.

IndexDocuments<T>(IndexDocumentsBatch<T>, IndexDocumentsOptions, CancellationToken)

Sends a batch of upload, merge, and/or delete actions to the search index. Add, Update or Delete Documents

IndexDocumentsAsync<T>(IndexDocumentsBatch<T>, IndexDocumentsOptions, CancellationToken)

Sends a batch of upload, merge, and/or delete actions to the search index. Add, Update or Delete Documents

MergeDocuments<T>(IEnumerable<T>, IndexDocumentsOptions, CancellationToken)

Merge documents to the index as a batch.

MergeDocumentsAsync<T>(IEnumerable<T>, IndexDocumentsOptions, CancellationToken)

Merge documents to the index as a batch.

MergeOrUploadDocuments<T>(IEnumerable<T>, IndexDocumentsOptions, CancellationToken)

Merge or upload documents to the index as a batch.

MergeOrUploadDocumentsAsync<T>(IEnumerable<T>, IndexDocumentsOptions, CancellationToken)

Merge or upload documents to the index as a batch.

Search<T>(SearchOptions, CancellationToken)

Searches for documents in the search index. Search Documents

Search<T>(String, SearchOptions, CancellationToken)

Searches for documents in the search index. Search Documents

SearchAsync<T>(SearchOptions, CancellationToken)

Searches for documents in the search index. Search Documents

SearchAsync<T>(String, SearchOptions, CancellationToken)

Searches for documents in the search index. Search Documents

Suggest<T>(String, String, SuggestOptions, CancellationToken)

Executes a "search-as-you-type" query consisting of a partial text input (three character minimum). It returns matching text found in suggester-aware fields. Azure Cognitive Search looks for matching values in fields that are predefined in a Suggester. For example, if you enable suggestions on a city field, typing "sea" produces documents containing "Seattle", "Sea Tac", and "Seaside" (all actual city names) for that field. Suggestions

SuggestAsync<T>(String, String, SuggestOptions, CancellationToken)

Executes a "search-as-you-type" query consisting of a partial text input (three character minimum). It returns matching text found in suggester-aware fields. Azure Cognitive Search looks for matching values in fields that are predefined in a Suggester. For example, if you enable suggestions on a city field, typing "sea" produces documents containing "Seattle", "Sea Tac", and "Seaside" (all actual city names) for that field. Suggestions

UploadDocuments<T>(IEnumerable<T>, IndexDocumentsOptions, CancellationToken)

Upload documents to the index as a batch.

UploadDocumentsAsync<T>(IEnumerable<T>, IndexDocumentsOptions, CancellationToken)

Upload documents to the index as a batch.

Applies to