deleteByQuery #
Deletes documents matching the provided search query.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/<index>/<collection>/_query
Method: DELETE
Body:
{
"query": {
// ...
}
}
Other protocols #
{
"index": "<index>",
"collection": "<collection>",
"controller": "document",
"action": "deleteByQuery",
"body": {
"query": {
// ...
}
}
}
Arguments #
collection
: collection nameindex
: index name
Body properties #
query
: documents matching this search query will be deleted. Uses the ElasticSearch Query DSL syntax.
Response #
Returns a ids
array containing the list of deleted document identifiers.
{
"status": 200,
"error": null,
"index": "<index>",
"collection": "<collection>",
"controller": "document",
"action": "deleteByQuery",
"requestId": "<unique request identifier>",
"result": {
"ids": [
"id 1",
"id 2",
"id ...",
"id n"
]
}
}
Edit this page on Github(opens new window)