Skip to content

How to delete large number of docs from Opensearch Serverless index (search collection type)

0

Hello,

I want to delete a considerable number of docs within an Opensearch Serverless index (search collection type). Is there any recommendation you suggest to achieve that?

Options checked:

  • Deleting by document ID is not the best solution due to the volume of documents, but it seems that it is the only available
  • Delete_by_query is not supported (400 error when executing the command in dev tools)
  • Combining filtered aliases + ingestion pipeline doesn't work since filtered aliases are not supported (400 error in dev tools)
  • Ingestion pipelines don't seem to support a conditional filter when importing data from the source index, is this true?

Thank you

asked 2 years ago1.4K views

1 Answer
0

Hello ,

I understand that you wish to know an effective method for deleting documents since you have considerable amount of documents . Here I would like to inform you that currently below are the only APIs supported by OpenSearch Serverless collection .

  1. Delete data by document ID : DELETE <index>/_doc/<id>
  2. Delete the entire index : DELETE <target>

[+] Supported OpenSearch API operations and permissions : https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-genref.html#serverless-operations

Thank you

AWS
SUPPORT ENGINEER

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.