# Deleted index docs coming back automatically

**URL:** <https://discuss.elastic.co/t/deleted-index-docs-coming-back-automatically/74941>\
**Category:** Elasticsearch\
**Created:** [February 13, 2017, 11:12pm UTC](https://discuss.elastic.co/t/deleted-index-docs-coming-back-automatically/74941 "2017-02-13T23:12:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![masud](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@masud](https://discuss.elastic.co/u/masud)\
**Post date:** [February 13, 2017, 11:12pm UTC](https://discuss.elastic.co/t/deleted-index-docs-coming-back-automatically/74941/1 "2017-02-13T23:12:54Z")

</div>

Hi,  
I'm using elasticsearch 1.3.  
I'm trying to delete older docs with delete by query java api.  
I'm able to delete, its showing deleted and I'm seeing no docs in kibana.  
But after few seconds its automatically coming back.  
can anyone help me to understand the cause?  
Do I need additional settings?

I'm using the followings:

```
QueryBuilder qb = QueryBuilders
                        .rangeQuery("@timestamp")
                        .lte("now-180d");

DeleteByQueryResponse response = client.prepareDeleteByQuery(index)
                        .setQuery(QueryBuilders.boolQuery().must(qb))
                        .setTypes("logs")
                        .setReplicationType(ReplicationType.ASYNC)
                        .execute()
                        .actionGet();

```

Thanks

---

<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:** [February 14, 2017, 7:01am UTC](https://discuss.elastic.co/t/deleted-index-docs-coming-back-automatically/74941/2 "2017-02-14T07:01:08Z")

</div>

Is it still the case if you wait for some minutes? I mean that may be it's caused by refresh?

Why did you set ASYNC?

And please upgrade. 1.x is EOL.

---

<div class="post-metadata">

**Author:** ![masud](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@masud](https://discuss.elastic.co/u/masud)\
**Post date:** [February 14, 2017, 5:14pm UTC](https://discuss.elastic.co/t/deleted-index-docs-coming-back-automatically/74941/3 "2017-02-14T17:14:06Z")

</div>

Thanks for your reply,  
But I figured out the problem, It was causing by logstash.  
Logstash was reading large amount of 1 file like 123GB of log data and was pushing to elasticsearch.  
After delete that log file from other server and restart that application my problem was resolved.

---

<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:** [March 14, 2017, 5:14pm UTC](https://discuss.elastic.co/t/deleted-index-docs-coming-back-automatically/74941/4 "2017-03-14T17:14:30Z")

</div>

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