Core
API v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

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 name
  • index: index name

Body properties #


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"
    ]
  }
}