SearchIndexingBufferedSender Class
A buffered sender for document indexing actions.
- Inheritance
-
azure.search.documents._search_indexing_buffered_sender_base.SearchIndexingBufferedSenderBaseSearchIndexingBufferedSenderazure.search.documents._headers_mixin.HeadersMixinSearchIndexingBufferedSender
Constructor
SearchIndexingBufferedSender(endpoint: str, index_name: str, credential: AzureKeyCredential, **kwargs: Any)
Parameters
- auto_flush_interval
- int
how many max seconds if between 2 flushes. This only takes effect when auto_flush is on. Default to 60 seconds.
- initial_batch_action_count
- int
The initial number of actions to group into a batch when tuning the behavior of the sender. The default value is 512.
- max_retries_per_action
- int
The number of times to retry a failed document. The default value is 3.
- on_new
- callable
If it is set, the client will call corresponding methods when there is a new IndexAction added. This may be called from main thread or a worker thread.
- on_progress
- callable
If it is set, the client will call corresponding methods when there is a IndexAction succeeds. This may be called from main thread or a worker thread.
- on_error
- callable
If it is set, the client will call corresponding methods when there is a IndexAction fails. This may be called from main thread or a worker thread.
- on_remove
- callable
If it is set, the client will call corresponding methods when there is a IndexAction removed from the queue (succeeds or fails). This may be called from main thread or a worker thread.
- api_version
- str
The Search API version to use for requests.
Methods
| close |
Close the SearchClient session. |
| delete_documents |
Queue delete documents actions |
| flush |
Flush the batch. |
| index_documents |
Specify a document operations to perform as a batch. :raises RequestEntityTooLargeError |
| merge_documents |
Queue merge documents actions |
| merge_or_upload_documents |
Queue merge documents or upload documents actions |
| upload_documents |
Queue upload documents actions. |
close
Close the SearchClient session.
close(**kwargs) -> None
delete_documents
Queue delete documents actions
delete_documents()
Parameters
flush
Flush the batch.
flush()
Parameters
Returns
True if there are errors. Else False
Return type
Exceptions
index_documents
Specify a document operations to perform as a batch.
:raises RequestEntityTooLargeError
index_documents(batch: IndexDocumentsBatch, **kwargs: Any) -> List[IndexingResult]
Parameters
Return type
merge_documents
Queue merge documents actions
merge_documents()
Parameters
merge_or_upload_documents
Queue merge documents or upload documents actions
merge_or_upload_documents()
Parameters
upload_documents
Queue upload documents actions.
upload_documents()
Parameters
Attributes
actions
Feedback
Submit and view feedback for