Skip to content

Batch Delete Document

kendra_batch_delete_document R Documentation

Removes one or more documents from an index

Description

Removes one or more documents from an index. The documents must have been added with the batch_put_document API.

The documents are deleted asynchronously. You can see the progress of the deletion by using Amazon Web Services CloudWatch. Any error messages related to the processing of the batch are sent to your Amazon Web Services CloudWatch log. You can also use the batch_get_document_status API to monitor the progress of deleting your documents.

Deleting documents from an index using batch_delete_document could take up to an hour or more, depending on the number of documents you want to delete.

Usage

kendra_batch_delete_document(IndexId, DocumentIdList,
  DataSourceSyncJobMetricTarget)

Arguments

IndexId

[required] The identifier of the index that contains the documents to delete.

DocumentIdList

[required] One or more identifiers for documents to delete from the index.

DataSourceSyncJobMetricTarget

Value

A list with the following syntax:

list(
  FailedDocuments = list(
    list(
      Id = "string",
      ErrorCode = "InternalError"|"InvalidRequest",
      ErrorMessage = "string"
    )
  )
)

Request syntax

svc$batch_delete_document(
  IndexId = "string",
  DocumentIdList = list(
    "string"
  ),
  DataSourceSyncJobMetricTarget = list(
    DataSourceId = "string",
    DataSourceSyncJobId = "string"
  )
)