If you delete multiple documents by ID, with the payload:
{"index": "test", "id": [5, 6]}
The response again contains only ID of the first document and the result field contains deleted if at least one document was deleted or not found if none of the documents were found:
@markomilivojevic
This difference is basically caused by our wish to keep compatibility with Elasticsearch formats to make it familiar for the Elastic users.
@Nick-S-2018 it's great that you requested a docs update.
Now I noticed some inconsistency in the response while deleting multiple documents by ID.
If you delete a single document by ID, with the payload:
{"index": "test", "id": 5}
The response is:
{"_index": "test", "_id": 5, "found": true, "result": "deleted"}
If you delete multiple documents by ID, with the payload:
{"index": "test", "id": [5, 6]}
The response again contains only ID of the first document and the
result
field containsdeleted
if at least one document was deleted ornot found
if none of the documents were found:{"_index": "test", "_id": 5, "found": true, "result": "deleted"}
Shouldn't the response be compatible with the one that deletes multiple documents by query? I.e.:
{"_index": "test", "deleted": 1}
- wheredeleted
is the number of deleted documents.Reference: https://github.com/manticoresoftware/manticoresearch/issues/1582 @sanikolaev