Package com.azure.search.documents
Class SearchIndexingBufferedAsyncSender<T>
java.lang.Object
com.azure.search.documents.SearchIndexingBufferedAsyncSender<T>
This class provides a buffered sender that contains operations for conveniently indexing documents to an Azure Search
index.
-
Method Summary
Modifier and TypeMethodDescriptionaddActions
(Collection<IndexAction<T>> actions) Adds document index actions to the batch.addDeleteActions
(Collection<T> documents) Adds delete document actions to the batch.addMergeActions
(Collection<T> documents) Adds merge document actions to the batch.addMergeOrUploadActions
(Collection<T> documents) Adds merge or upload document actions to the batch.addUploadActions
(Collection<T> documents) Adds upload document actions to the batch.close()
Closes the buffered sender, any documents remaining in the batch will be sent to the Search index for indexing.flush()
Sends the current batch of documents to be indexed.Gets theIndexActions
in the batch that are ready to be indexed.
-
Method Details
-
getActions
Gets theIndexActions
in the batch that are ready to be indexed.- Returns:
- The
IndexActions
in the batch that are ready to be indexed.
-
addUploadActions
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.
-
addDeleteActions
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
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
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.
-
addActions
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.
-
flush
Sends the current batch of documents to be indexed.- Returns:
- A reactive response that indicates if the flush operation has completed.
-
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.
-