# Delete documents with version 0 with query

**URL:** <https://discuss.elastic.co/t/delete-documents-with-version-0-with-query/99089>\
**Category:** Elasticsearch\
**Created:** [September 1, 2017, 6:12am UTC](https://discuss.elastic.co/t/delete-documents-with-version-0-with-query/99089 "2017-09-01T06:12:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elk\_user1](https://avatars.discourse-cdn.com/v4/letter/e/a698b9/32.png) [@elk\_user1](https://discuss.elastic.co/u/elk_user1)\
**Post date:** [September 1, 2017, 6:12am UTC](https://discuss.elastic.co/t/delete-documents-with-version-0-with-query/99089/1 "2017-09-01T06:12:20Z")

</div>

Hello There,

I am trying to use delete\_by\_query to delete some documents for a particular index. But it fails with illegal version value and I read that delete\_by\_query cannot be used to delete documents with index version zero. Is there any particular reason why is it so? And also is there any way to delete documents with index version zero as I can't delete the entire index. This is in production and high priority.

Error:  
Validation Failed: 1: illegal version value [0] for version type [INTERNAL];

Request to help. Thanks in advance.

---

<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:** [September 29, 2017, 6:12am UTC](https://discuss.elastic.co/t/delete-documents-with-version-0-with-query/99089/2 "2017-09-29T06:12:20Z")

</div>

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