Elasticsearch OpenSearch DELETE

By Opster Team

Updated: Mar 29, 2023

| 1 min read

In addition to reading this guide, we recommend you run the Elasticsearch Health Check-Up. It will detect issues and improve your Elasticsearch performance by analyzing your shard sizes, threadpools, memory, snapshots, disk watermarks and more.

The Elasticsearch Check-Up is free and requires no installation.

In addition to reading about Elasticsearch DELETE API, we recommend you try running the OpenSearch Error Check-Up which analyzes 2 JSON files to detect many configuration errors.

To easily resolve issues in your deployment and locate their root cause, try AutoOps for OpenSearch. It diagnoses problems by analyzing hundreds of metrics collected by a lightweight agent and offers guidance for resolving them.

Overview

What is OpenSearch DELETE?

DELETE is an OpenSearch API which removes a document from a specific index. This API requires an index name and _id document to delete the document. 

Delete a document

DELETE /my_index/_doc/1

Notes

  • A delete request throws 404 error code if the document does not already exist in the index.
  • If you want to delete a set of documents that matches a query, you need to use delete by query API.

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?


Analyze your cluster & get personalized recommendations

Skip to content