# Delete by query running by itself

**URL:** <https://discuss.elastic.co/t/delete-by-query-running-by-itself/13142>\
**Category:** Elasticsearch\
**Created:** [August 9, 2013, 7:10am UTC](https://discuss.elastic.co/t/delete-by-query-running-by-itself/13142 "2013-08-09T07:10:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![narinder\_izap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/narinder_izap/32/803_2.png) [@narinder\_izap](https://discuss.elastic.co/u/narinder_izap)\
**Post date:** [August 9, 2013, 7:10am UTC](https://discuss.elastic.co/t/delete-by-query-running-by-itself/13142/1 "2013-08-09T07:10:16Z")

</div>

Hi All,

I noticed a strange behave with Elasticsearch. I deleted some doc by using  
delete by query and query used for this was a range query over the index  
level(es\_15). Then I shut down my cluster. when I restarted it, I am seeing  
this in log, and its continuously running.

_[2013-08-09 12:34:23,371][DEBUG][action.deletebyquery] [Araki]  
[es\_15][14], node[w2SDnmJ3QB-6LmYDAbFTMw], [P], s[STARTED]: Failed to  
execute [delete\_by\_query {[es\_15][REL\_YsUpdateOs], query  
[{"term":"\_parent"}]}]_  
_org.elasticsearch.index.query.QueryParsingException: [es\_15] [\_na] query  
malformed, no field after start\_object_

- at  
org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:195)
- 
- at  
org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:276)
- 
- at  
org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:224)
- 
- at  
org.elasticsearch.index.shard.service.InternalIndexShard.prepareDeleteByQuery(InternalIndexShard.java:381)
- 
- at  
org.elasticsearch.action.deletebyquery.TransportShardDeleteByQueryAction.shardOperationOnPrimary(TransportShardDeleteByQueryAction.java:95)
- 
- at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:521)
- 
- at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419)
- 
- at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
- 
- at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
- 
- at java.lang.Thread.run(Thread.java:679)\*  
_[2013-08-09 12:34:23,359][DEBUG][action.deletebyquery] [Araki]  
[es\_15][8], node[w2SDnmJ3QB-6LmYDAbFTMw], [P], s[STARTED]: Failed to  
execute [delete\_by\_query {[es\_15][REL\_YsUpdateOs], query  
[{"term":"\_parent"}]}]_  
_org.elasticsearch.index.query.QueryParsingException: [es\_15] [\_na] query  
malformed, no field after start\_object_
- at  
org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:195)
- 
- at  
org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:276)
- 
- at  
org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:224)
- 
- at  
org.elasticsearch.index.shard.service.InternalIndexShard.prepareDeleteByQuery(InternalIndexShard.java:381)
- 
- at  
org.elasticsearch.action.deletebyquery.TransportShardDeleteByQueryAction.shardOperationOnPrimary(TransportShardDeleteByQueryAction.java:95)
- 
- at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:521)
- 
- at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419)
- 
- at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
- 
- at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
- 
- at java.lang.Thread.run(Thread.java:679)\*

Here "_REL\_YsUpdateOs_" is child type but this type does not have any  
document in it. What is exactly happening over here. I am confused. Is it  
trying to delete something regarding parent child in context to the delete  
by query that I executed before shutting down elasticsearch. And if I  
closed the cluster, it is still remebering the last log, although I tried  
by deleting the log too, but still got the same error. Please explain me  
this behave.

Thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:21am UTC](https://discuss.elastic.co/t/delete-by-query-running-by-itself/13142/2 "2017-07-06T02:21:55Z")

</div>


