elasticsearch delete-document
delete document from index
Description
Removes a JSON document from the specified index.
Synopsis
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
cluster
- (string)
Name of elastic search cluster
Example: --cluster "elastic-default"
Default: elastic-default
Attributes: optional
index
- (string)
Name of the index that contains the document.
Example: --index "students"
Default: _None_
Attributes: required
id
- (int)
Unique identifier of the document.
Example: 1
Default: _None_
Attributes: required
Examples
Input:
Output:{
"_index": "my-index-000001",
"_type": "_doc",
"_id": "1",
"_version": 3,
"result": "deleted",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"_seq_no": 2,
"_primary_term": 1
}
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "update" |
Service Type | "elasticsearch" |
Service Instance | cluster |
Namespace | |
Object Type | "index" |
Object ID | index |
Please see Access Control for details.