Files
OpenSearch-Docs-Cn/_api-reference/document-apis/delete-document.md
T
7bb41fe4ce Make API reference top level (#1637)
* Make API reference top level

Signed-off-by: Naarcha-AWS <[email protected]>

* Fix typo on Drag and Drop page (#1633)

* Fix typo on Drag and Drop page

* Update _dashboards/drag-drop-wizard.md

Co-authored-by: Nate Bower <[email protected]>

* Update drag-drop-wizard.md

Co-authored-by: Nate Bower <[email protected]>

* Putting all the Docker install material on a single page (#1452)

* Putting all the Docker install material on a single page

Signed-off-by: JeffH-AWS <[email protected]>

* Making room for revamp

Signed-off-by: JeffH-AWS <[email protected]>

* Intro added

Signed-off-by: JeffH-AWS <[email protected]>

* Continuing to flesh out the intro section and overview

Signed-off-by: JeffH-AWS <[email protected]>

* Overview finalized

Signed-off-by: JeffH-AWS <[email protected]>

* Introducing docker compose

Signed-off-by: JeffH-AWS <[email protected]>

* Added link to compose

Signed-off-by: JeffH-AWS <[email protected]>

* Continuing docker image commentary

Signed-off-by: JeffH-AWS <[email protected]>

* Sometimes I wonder if anyone reads these

Signed-off-by: JeffH-AWS <[email protected]>

* Adding notes on installing compose with pip

Signed-off-by: JeffH-AWS <[email protected]>

* Adding prereqs

Signed-off-by: JeffH-AWS <[email protected]>

* Magnets - how do they work?

Signed-off-by: JeffH-AWS <[email protected]>

* Almonds and peaches are part of the same plant subgenus, Amygdalus

Signed-off-by: JeffH-AWS <[email protected]>

* There are 293 ways to make change for a dollar

Signed-off-by: JeffH-AWS <[email protected]>

* A shark is the only known fish that can blink with both eyes

Signed-off-by: JeffH-AWS <[email protected]>

* A crocodile cannot stick its tongue out

Signed-off-by: JeffH-AWS <[email protected]>

* wording

Signed-off-by: JeffH-AWS <[email protected]>

* Reorganizing a couple paragraphs to make it flow better

Signed-off-by: JeffH-AWS <[email protected]>

* Forgot a word

Signed-off-by: JeffH-AWS <[email protected]>

* Add tip about pruning stopped containers

Signed-off-by: JeffH-AWS <[email protected]>

* Cleaning up

Signed-off-by: JeffH-AWS <[email protected]>

* Add blurb about container ls

Signed-off-by: JeffH-AWS <[email protected]>

* Adding the Docker Compose stuff

Signed-off-by: JeffH-AWS <[email protected]>

* Working on compose

Signed-off-by: JeffH-AWS <[email protected]>

* Continuing work on the compose section - it's a lot of info

Signed-off-by: JeffH-AWS <[email protected]>

* Added important settings

Signed-off-by: JeffH-AWS <[email protected]>

* Updates to settings that need configured

Signed-off-by: JeffH-AWS <[email protected]>

* Still working through compose things

Signed-off-by: JeffH-AWS <[email protected]>

* Fixed wording

Signed-off-by: JeffH-AWS <[email protected]>

* Working through compose commands and guidance

Signed-off-by: JeffH-AWS <[email protected]>

* Reordering/rewording

Signed-off-by: JeffH-AWS <[email protected]>

* More phrasing

Signed-off-by: JeffH-AWS <[email protected]>

* More wording in steps

Signed-off-by: JeffH-AWS <[email protected]>

* More wording in steps

Signed-off-by: JeffH-AWS <[email protected]>

* Organizing

Signed-off-by: JeffH-AWS <[email protected]>

* Adding stuff and things

Signed-off-by: JeffH-AWS <[email protected]>

* Continuing to work through the configuration steps

Signed-off-by: JeffH-AWS <[email protected]>

* Fixes

Signed-off-by: JeffH-AWS <[email protected]>

* Fixes

Signed-off-by: JeffH-AWS <[email protected]>

* Still working on the configuration steps

Signed-off-by: JeffH-AWS <[email protected]>

* Changes

Signed-off-by: JeffH-AWS <[email protected]>

* More work

Signed-off-by: JeffH-AWS <[email protected]>

* Removed perf analyzer - refer to GH issue 1555

Signed-off-by: JeffH-AWS <[email protected]>

* Fixing things

Signed-off-by: JeffH-AWS <[email protected]>

* Adding guidance on passing settings in compose

Signed-off-by: JeffH-AWS <[email protected]>

* Working through dockerfile materials now

Signed-off-by: JeffH-AWS <[email protected]>

* wording

Signed-off-by: JeffH-AWS <[email protected]>

* Finalized the sample dev compose file

Signed-off-by: JeffH-AWS <[email protected]>

* Continuing work with configuration

Signed-off-by: JeffH-AWS <[email protected]>

* Finished - ready for reviews

Signed-off-by: JeffH-AWS <[email protected]>

* Fixed a link I forgot to change before

Signed-off-by: JeffH-AWS <[email protected]>

* Changes from first proofread

Signed-off-by: JeffH-AWS <[email protected]>

* Changed heading

Signed-off-by: JeffH-AWS <[email protected]>

* Addressed reviewer comments and made some changes

Signed-off-by: JeffH-AWS <[email protected]>

* Forgot to incorporate one change. Fixed.

Signed-off-by: JeffH-AWS <[email protected]>

* Final editorial changes

Signed-off-by: JeffH-AWS <[email protected]>

Signed-off-by: JeffH-AWS <[email protected]>

* fix#1584-custom_attr_allowlist (#1636)

Signed-off-by: cwillum <[email protected]>

Signed-off-by: cwillum <[email protected]>

* Update TERMS.md with definition for Setting (#1632)

* fix#1631-Terms-setting

Signed-off-by: cwillum <[email protected]>

* fix#1631-Terms-setting

Signed-off-by: cwillum <[email protected]>

Signed-off-by: cwillum <[email protected]>

* Add disclaimer about remote fs usage and an example of setting env var (#1644)

* Add disclaimer about remote fs usage and an example of setting env var

Signed-off-by: JeffH-AWS <[email protected]>

* Enhanced wording a little bit

Signed-off-by: JeffH-AWS <[email protected]>

Signed-off-by: JeffH-AWS <[email protected]>

* [DOC] New documentation: Self-host maps server (#1625)

* Add new page self-host maps server

Signed-off-by: vagimeli <[email protected]>

* Added new content

Signed-off-by: vagimeli <[email protected]>

* Copy edit

Signed-off-by: vagimeli <[email protected]>

* Tech review edits

Signed-off-by: vagimeli <[email protected]>

* Doc review edits

Signed-off-by: vagimeli <[email protected]>

* Editorial review changes

Signed-off-by: vagimeli <[email protected]>

* Final edits

Signed-off-by: vagimeli <[email protected]>

Signed-off-by: vagimeli <[email protected]>

* Add feedback.

Signed-off-by: Naarcha-AWS <[email protected]>

* Fix links

Signed-off-by: Naarcha-AWS <[email protected]>

Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: JeffH-AWS <[email protected]>
Signed-off-by: cwillum <[email protected]>
Signed-off-by: vagimeli <[email protected]>
Co-authored-by: Nate Bower <[email protected]>
Co-authored-by: Jeff Huss <[email protected]>
Co-authored-by: Chris Moore <[email protected]>
Co-authored-by: Melissa Vagi <[email protected]>
2022-10-27 11:50:39 -05:00

2.9 KiB

layout, title, parent, nav_order
layout title parent nav_order
default Delete document Document APIs 15

Delete document

Introduced 1.0 {: .label .label-purple }

If you no longer need a document in your index, you can use the delete document API operation to delete it.

Example

DELETE /sample-index1/_doc/1

Path and HTTP methods

DELETE /<index>/_doc/<_id>

URL parameters

Parameter Type Description Required
<index> String The index to delete from. Yes
<_id> String The ID of the document to delete. Yes
if_seq_no Integer Only perform the delete operation if the document's version number matches the specified number. No
if_primary_term Integer Only perform the delete operation if the document has the specified primary term. No
refresh Enum If true, OpenSearch refreshes shards to make the delete operation available to search results. Valid options are true, false, and wait_for, which tells OpenSearch to wait for a refresh before executing the operation. Default is false. No
routing String Value used to route the operation to a specific shard. No
timeout Time How long to wait for a response from the cluster. Default is 1m. No
version Integer The version of the document to delete, which must match the last updated version of the document. No
version_type Enum Retrieves a specifically typed document. Available options are external (retrieve the document if the specified version number is greater than the document's current version) and external_gte (retrieve the document if the specified version number is greater than or equal to the document's current version). For example, to delete version 3 of a document, use /_doc/1?version=3&version_type=external. No
wait_for_active_shards String The number of active shards that must be available before OpenSearch processes the delete request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. No

Response

{
  "_index": "sample-index1",
  "_id": "1",
  "_version": 2,
  "result": "deleted",
  "_shards": {
    "total": 2,
    "successful": 2,
    "failed": 0
  },
  "_seq_no": 1,
  "_primary_term": 15
}

Response body fields

Field Description
_index The name of the index.
_id The document's ID.
_version The document's version.
_result The result of the delete operation.
_shards Detailed information about the cluster's shards.
total The total number of shards.
successful The number of shards OpenSearch succssfully deleted the document from.
failed The number of shards OpenSearch failed to delete the document from.
_seq_no The sequence number assigned when the document was indexed.
_primary_term The primary term assigned when the document was indexed.