# Deleting all the documents in java

**URL:** <https://discuss.elastic.co/t/deleting-all-the-documents-in-java/23081>\
**Category:** Elasticsearch\
**Created:** [April 3, 2015, 11:37am UTC](https://discuss.elastic.co/t/deleting-all-the-documents-in-java/23081 "2015-04-03T11:37:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sasi](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Sasi](https://discuss.elastic.co/u/Sasi)\
**Post date:** [April 3, 2015, 11:37am UTC](https://discuss.elastic.co/t/deleting-all-the-documents-in-java/23081/1 "2015-04-03T11:37:43Z")

</div>

Hi ,

I am new to elastic search.

Want to delete all the documents , where ownerId = 1, ownerId is a increasing number. Want to delete all the rows corresponding to that ownerId when the owner is deleted from the application.

These documents are part of multiple indexes. But all the indexes has same alias name.

I want to implement in java.

please let me if it is not clear.

Any Suggests ?

Thanks.

---

<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:** [July 6, 2017, 12:21am UTC](https://discuss.elastic.co/t/deleting-all-the-documents-in-java/23081/2 "2017-07-06T00:21:52Z")

</div>


