你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

SearchIndexingBufferedAsyncSender<T> Class

  • java.lang.Object
    • com.azure.search.documents.SearchIndexingBufferedAsyncSender<T>

Type Parameters

T

The type of the document handled by this buffered indexing sender.

public final class SearchIndexingBufferedAsyncSender

This class provides a buffered sender that contains operations for conveniently indexing documents to an Azure Search index.

Method Summary

Modifier and Type Method and Description
Mono<Void> addActions(Collection<IndexAction<T>> actions)

Adds document index actions to the batch.

Mono<Void> addDeleteActions(Collection<T> documents)

Adds delete document actions to the batch.

Mono<Void> addMergeActions(Collection<T> documents)

Adds merge document actions to the batch.

Mono<Void> addMergeOrUploadActions(Collection<T> documents)

Adds merge or upload document actions to the batch.

Mono<Void> addUploadActions(Collection<T> documents)

Adds upload document actions to the batch.

Mono<Void> close()

Closes the buffered sender, any documents remaining in the batch will be sent to the Search index for indexing.

Mono<Void> flush()

Sends the current batch of documents to be indexed.

Collection<IndexAction<T>> getActions()

Gets the IndexAction<T> in the batch that are ready to be indexed.

Methods inherited from java.lang.Object

Method Details

addActions

public Mono addActions(Collection> actions)

Adds document index actions to the batch.

If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.

Parameters:

actions - Index actions.

Returns:

A reactive response indicating that the documents have been added to the batch.

addDeleteActions

public Mono addDeleteActions(Collection documents)

Adds delete document actions to the batch.

If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.

Parameters:

documents - Documents to be deleted.

Returns:

A reactive response indicating that the documents have been added to the batch.

addMergeActions

public Mono addMergeActions(Collection documents)

Adds merge document actions to the batch.

If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.

Parameters:

documents - Documents to be merged.

Returns:

A reactive response indicating that the documents have been added to the batch.

addMergeOrUploadActions

public Mono addMergeOrUploadActions(Collection documents)

Adds merge or upload document actions to the batch.

If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.

Parameters:

documents - Documents to be merged or uploaded.

Returns:

A reactive response indicating that the documents have been added to the batch.

addUploadActions

public Mono addUploadActions(Collection documents)

Adds upload document actions to the batch.

If the client is enabled for automatic batch sending, adding documents may trigger the batch to be sent for indexing.

Parameters:

documents - Documents to be uploaded.

Returns:

A reactive response indicating that the documents have been added to the batch.

close

public Mono close()

Closes the buffered sender, any documents remaining in the batch will be sent to the Search index for indexing.

Once the buffered sender has been closed any attempts to add documents or flush it will cause an IllegalStateException to be thrown.

Returns:

A reactive response indicating that the buffered sender has been closed.

flush

public Mono flush()

Sends the current batch of documents to be indexed.

Returns:

A reactive response that indicates if the flush operation has completed.

getActions

public Collection> getActions()

Gets the IndexAction<T> in the batch that are ready to be indexed.

Returns:

The IndexAction<T> in the batch that are ready to be indexed.

Applies to