elasticsearch delete-by-query
Delete documents that match the specific query
Description
Delete documents that match the specific query
Synopsis
elasticsearch delete-by-query
[--site <site>]
[--cluster <cluster>]
--query <query>
[<index>]
[--async]
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
query
- (string)
Query string you wish to parse and use for filtering. Defined using Lucene query string syntax.
Example: --query "(new york city) OR (big apple)"
Default: _None_
Attributes: required
index
- (string)
Indices to close
Example: "students"
Default: _all
Attributes: optional, multiple allowed
async
- (bool)
Create a task instead of waiting for completion
Example: --async
Default: _None_
Attributes: optional
Examples
Input:
Output:{
"took": 258,
"timed_out": false,
"total": 1,
"deleted": 1,
"batches": 1,
"version_conflicts": 0,
"noops": 0,
"retries": {
"bulk": 0,
"search": 0
},
"throttled_millis": 0,
"requests_per_second": -1.0,
"throttled_until_millis": 0,
"failures": []
}
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | |
Service Type | "elasticsearch" |
Service Instance | cluster |
Namespace | |
Object Type | |
Object ID |
Please see Access Control for details.