# Elasticsearch.js client bulk delete api

**URL:** <https://discuss.elastic.co/t/elasticsearch-js-client-bulk-delete-api/123978>\
**Category:** Elasticsearch\
**Created:** [March 14, 2018, 6:41pm UTC](https://discuss.elastic.co/t/elasticsearch-js-client-bulk-delete-api/123978 "2018-03-14T18:41:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fali/32/28788_2.png) [@fali](https://discuss.elastic.co/u/fali)\
**Post date:** [March 14, 2018, 6:41pm UTC](https://discuss.elastic.co/t/elasticsearch-js-client-bulk-delete-api/123978/1 "2018-03-14T18:41:44Z")

</div>

Hi,

I'm trying to use the elasticsearch.js client to bulk delete documents from elasticsearch using the bulk api. The documents get deleted successfully.

However, when I run the same delete request using the same set of elastic ids, I expect to get a 404 response for each of the documents (because my assumption is they were just deleted). But instead, more documents are deleted (I can't really tell which ones). From the response of the callback, I can see that the version number has incremented to 2.

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 11, 2018, 6:41pm UTC](https://discuss.elastic.co/t/elasticsearch-js-client-bulk-delete-api/123978/2 "2018-04-11T18:41:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
