Udostępnij za pośrednictwem


SearchIndexingBufferedSender<T> Class

Definition

Index search documents with intelligent batching, automatic flushing, and retries for failed indexing actions.

public class SearchIndexingBufferedSender<T> : IAsyncDisposable, IDisposable
type SearchIndexingBufferedSender<'T> = class
    interface IDisposable
    interface IAsyncDisposable
Public Class SearchIndexingBufferedSender(Of T)
Implements IAsyncDisposable, IDisposable

Type Parameters

T

The .NET type that maps to the index schema. Instances of this type can be retrieved as documents from the index. You can use SearchDocument for dynamic documents.

Inheritance
SearchIndexingBufferedSender<T>
Implements

Constructors

SearchIndexingBufferedSender<T>()

Protected constructor for mocking.

SearchIndexingBufferedSender<T>(SearchClient, SearchIndexingBufferedSenderOptions<T>)

Creates a new instance of SearchIndexingBufferedSender<T> that can be used to index search documents with intelligent batching, automatic flushing, and retries for failed indexing actions.

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.

ServiceName

Gets the name of the Search Service.

Methods

DeleteDocuments(IEnumerable<T>, CancellationToken)

Adds a batch of delete actions to eventually send to the search index.

DeleteDocumentsAsync(IEnumerable<T>, CancellationToken)

Adds a batch of delete actions to eventually send to the search index.

Finalize()

Ensure the sender was properly disposed.

Flush(CancellationToken)

Flush any pending indexing actions. This will wait until everything has been sent before returning.

FlushAsync(CancellationToken)

Flush any pending indexing actions. This will wait until everything has been sent before returning.

IndexDocuments(IndexDocumentsBatch<T>, CancellationToken)

Adds a batch of upload, merge, and/or delete actions to eventually send to the search index.

IndexDocumentsAsync(IndexDocumentsBatch<T>, CancellationToken)

Adds a batch of upload, merge, and/or delete actions to eventually send to the search index.

MergeDocuments(IEnumerable<T>, CancellationToken)

Adds a batch of merge actions to eventually send to the search index.

MergeDocumentsAsync(IEnumerable<T>, CancellationToken)

Adds a batch of merge actions to eventually send to the search index.

MergeOrUploadDocuments(IEnumerable<T>, CancellationToken)

Adds a batch of merge or upload actions to eventually send to the search index.

MergeOrUploadDocumentsAsync(IEnumerable<T>, CancellationToken)

Adds a batch of merge or upload actions to eventually send to the search index.

OnActionAddedAsync(IndexDocumentsAction<T>, CancellationToken)

Raise the ActionAdded event.

OnActionCompletedAsync(IndexDocumentsAction<T>, IndexingResult, CancellationToken)

Raise the ActionCompleted event.

OnActionFailedAsync(IndexDocumentsAction<T>, IndexingResult, Exception, CancellationToken)

Raise the ActionFailed event.

OnActionSentAsync(IndexDocumentsAction<T>, CancellationToken)

Raise the ActionSent event.

UploadDocuments(IEnumerable<T>, CancellationToken)

Adds a batch of upload actions to eventually send to the search index.

UploadDocumentsAsync(IEnumerable<T>, CancellationToken)

Adds a batch of upload actions to eventually send to the search index.

Events

ActionAdded

Event raised whenever an indexing action is added to the sender.

ActionCompleted

Event raised whenever an indexing action was submitted successfully.

ActionFailed

Event raised whenever an indexing action failed.

ActionSent

Event raised whenever an indexing action is sent by the sender.

Explicit Interface Implementations

IAsyncDisposable.DisposeAsync()

Flush any remaining work and clean up resources.

IDisposable.Dispose()

Flush any remaining work and clean up resources.

Applies to