# Partially delete using the prepareDelete() method

**URL:** <https://discuss.elastic.co/t/partially-delete-using-the-preparedelete-method/55554>\
**Category:** Elasticsearch\
**Created:** [July 14, 2016, 6:21pm UTC](https://discuss.elastic.co/t/partially-delete-using-the-preparedelete-method/55554 "2016-07-14T18:21:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashant\_patel](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@prashant\_patel](https://discuss.elastic.co/u/prashant_patel)\
**Post date:** [July 14, 2016, 6:21pm UTC](https://discuss.elastic.co/t/partially-delete-using-the-preparedelete-method/55554/1 "2016-07-14T18:21:21Z")

</div>

Hi All ,

We are having 5 nodes of ES .  
ES version 1.7  
Deleting data from masternode  
I am trying to delete one document using prepareDelete() method of DeleteRequestBuilder .  
Here is the case ,

1. We execute the delete query , and verify in browser using \_search , Result --\> data is deleted .
2. we again refresh the page same \_search url, Result --\> Data found (earlier we verify that data is deleted) and displayed in Our UI !!!! thats weird
3. We again refresh the page --\> Result--\> Data deleted verified !!!!!  
Now on we are not seeing the data hence completely deleted .

This is not intermittent . it is happening every time . Also We have stopped all Sync process to avoid reindexing of the same data .

i am assuming that one of the node is deleting data another is not  
Is there any way to sync all nodes with in cluster for deleting document and return success  
Can any one help with this ?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 14, 2016, 7:00pm UTC](https://discuss.elastic.co/t/partially-delete-using-the-preparedelete-method/55554/2 "2016-07-14T19:00:31Z")

</div>

How many nodes do you have? 2?

One thing you could do is to set replicas to 0 then increase again.

But first I'd check if you are not suffering a split brain issue.

---

<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 5, 2017, 10:35pm UTC](https://discuss.elastic.co/t/partially-delete-using-the-preparedelete-method/55554/3 "2017-07-05T22:35:27Z")

</div>


