# Delete by query string query is not working with 1.2.0

**URL:** <https://discuss.elastic.co/t/delete-by-query-string-query-is-not-working-with-1-2-0/17824>\
**Category:** Elasticsearch\
**Created:** [May 30, 2014, 3:31am UTC](https://discuss.elastic.co/t/delete-by-query-string-query-is-not-working-with-1-2-0/17824 "2014-05-30T03:31:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![happyprg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/happyprg/32/681_2.png) [@happyprg](https://discuss.elastic.co/u/happyprg)\
**Post date:** [May 30, 2014, 3:31am UTC](https://discuss.elastic.co/t/delete-by-query-string-query-is-not-working-with-1-2-0/17824/1 "2014-05-30T03:31:42Z")

</div>

i think do that wrote according to guideline.

> <https://github.com/elastic/elasticsearch/blob/master/CONTRIBUTING.md>

from elasticsearch version 0.90.7, was used delete-by-query-string query .  
at the one time. deleted approximately 250 doc.  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html)

and i did upgrade version to 1.2.0.  
after that, i did meet up error screen.  
please help me ..  
thanks you.

# create index

curl -XPOST '[http://10.99.196.141:22000/delete\_by\_query\_string\_query\_test1](http://10.99.196.141:22000/delete_by_query_string_query_test1)'

# create mapping

curl -XPUT '[http://10.99.196.141:22000/delete\_by\_query\_string\_query\_test1/1/\_mapping](http://10.99.196.141:22000/delete_by_query_string_query_test1/1/_mapping)' -d '{  
"properties":{  
"playId":{  
"type":"string",  
"index":"not\_analyzed",  
"store":"true"  
}  
}  
}'

# make doc

curl -XPOST '[http://10.99.196.141:22000/delete\_by\_query\_string\_query\_test1/1](http://10.99.196.141:22000/delete_by_query_string_query_test1/1)' -d '{  
"playId": "1395395f-1543-44f7-ba11-fd8eff137afe"  
}'

# delete by query string query

curl -XDELETE '[http://10.99.196.141:22000/delete\_by\_query\_string\_query\_test1/1/\_query?pretty=true](http://10.99.196.141:22000/delete_by_query_string_query_test1/1/_query?pretty=true)' -d '  
{  
"query\_string" : {  
"default\_field" : "playId",  
"query" : "1395395f-1543-44f7-ba11-fd8eff137afe"  
}  
}  
'

# response occured error -

{  
"\_indices" : {  
"delete\_by\_query\_string\_query\_test1" : {  
"\_shards" : {  
"total" : 2,  
"successful" : 0,  
"failed" : 2,  
"failures" : [ {  
"index" : "delete\_by\_query\_string\_query\_test1",  
"shard" : 1,  
"reason" : "RemoteTransportException[[10.99.196.141\_21001][inet[/10.99.196.141:21001]][deleteByQuery/shard]]; nested: QueryParsingException[[delete\_by\_query\_string\_query\_test1] request does not support [query\_string]]; "  
}, {  
"index" : "delete\_by\_query\_string\_query\_test1",  
"shard" : 0,  
"reason" : "RemoteTransportException[[10.101.63.182\_21000][inet[/10.101.63.182:21000]][deleteByQuery/shard]]; nested: QueryParsingException[[delete\_by\_query\_string\_query\_test1] request does not support [query\_string]]; "  
} ]  
}  
}  
}  
}

somebody help me please.

---

<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:** [May 30, 2014, 5:13am UTC](https://discuss.elastic.co/t/delete-by-query-string-query-is-not-working-with-1-2-0/17824/2 "2014-05-30T05:13:01Z")

</div>

I answered in github. API changed in 1.0.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 30 mai 2014 à 05:31, hongsgo [hongsgo@gmail.com](mailto:hongsgo@gmail.com) a écrit :

i think do that wrote according to guideline.

> <https://github.com/elastic/elasticsearch/blob/master/CONTRIBUTING.md>

from elasticsearch version 0.90.7, was used delete-by-query-string query .  
at the one time. deleted approximately 250 doc.  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html)

and i did upgrade version to 1.2.0.  
after that, i did meet up error screen.  
please help me ..  
thanks you.

# create index

curl -XPOST '[http://10.99.196.141:22000/delete\_by\_query\_string\_query\_test1](http://10.99.196.141:22000/delete_by_query_string_query_test1)'

# create mapping

curl -XPUT  
'[http://10.99.196.141:22000/delete\_by\_query\_string\_query\_test1/1/\_mapping](http://10.99.196.141:22000/delete_by_query_string_query_test1/1/_mapping)'  
-d '{  
"properties":{  
"playId":{  
"type":"string",  
"index":"not\_analyzed",  
"store":"true"  
}  
}  
}'

# make doc

curl -XPOST  
'[http://10.99.196.141:22000/delete\_by\_query\_string\_query\_test1/1](http://10.99.196.141:22000/delete_by_query_string_query_test1/1)' -d '{  
"playId": "1395395f-1543-44f7-ba11-fd8eff137afe"  
}'

# delete by query string query

curl -XDELETE  
'[http://10.99.196.141:22000/delete\_by\_query\_string\_query\_test1/1/\_query?pretty=true](http://10.99.196.141:22000/delete_by_query_string_query_test1/1/_query?pretty=true)'  
-d '  
{  
"query\_string" : {  
"default\_field" : "playId",  
"query" : "1395395f-1543-44f7-ba11-fd8eff137afe"  
}  
}  
'

# response occured error -

{  
"\_indices" : {  
"delete\_by\_query\_string\_query\_test1" : {  
"\_shards" : {  
"total" : 2,  
"successful" : 0,  
"failed" : 2,  
"failures" : [ {  
"index" : "delete\_by\_query\_string\_query\_test1",  
"shard" : 1,  
"reason" :  
"RemoteTransportException[[10.99.196.141\_21001][inet[/10.99.196.141:21001]][deleteByQuery/shard]];  
nested: QueryParsingException[[delete\_by\_query\_string\_query\_test1] request  
does not support [query\_string]]; "  
}, {  
"index" : "delete\_by\_query\_string\_query\_test1",  
"shard" : 0,  
"reason" :  
"RemoteTransportException[[10.101.63.182\_21000][inet[/10.101.63.182:21000]][deleteByQuery/shard]];  
nested: QueryParsingException[[delete\_by\_query\_string\_query\_test1] request  
does not support [query\_string]]; "  
} ]  
}  
}  
}  
}

somebody help me please.

--  
View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/delete-by-query-string-query-is-not-working-with-1-2-0-tp4056754.html](http://elasticsearch-users.115913.n3.nabble.com/delete-by-query-string-query-is-not-working-with-1-2-0-tp4056754.html)  
Sent from the ElasticSearch Users mailing list archive at [Nabble.com](http://Nabble.com).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1401420702674-4056754.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1401420702674-4056754.post%40n3.nabble.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/67DE9A5A-750A-41D3-B11E-70557AC58F6B%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/67DE9A5A-750A-41D3-B11E-70557AC58F6B%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![happyprg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/happyprg/32/681_2.png) [@happyprg](https://discuss.elastic.co/u/happyprg)\
**Post date:** [May 30, 2014, 5:52am UTC](https://discuss.elastic.co/t/delete-by-query-string-query-is-not-working-with-1-2-0/17824/3 "2014-05-30T05:52:05Z")

</div>

thanks you.  
is it right?

# delete by query string query

curl -XDELETE '[http://10.99.196.141:22000/delete\_by\_query\_string\_query\_test1/1/\_query?pretty=true](http://10.99.196.141:22000/delete_by_query_string_query_test1/1/_query?pretty=true)' -d '  
{  
"query" : { //added  
"query\_string" : {  
"default\_field" : "playId",  
"query" : "1395395f-1543-44f7-ba11-fd8eff137af2 OR 1395395f-1543-44f7-ba11-fd8eff137af1"  
}  
}  
}  
'

---

<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:** [May 30, 2014, 6:03am UTC](https://discuss.elastic.co/t/delete-by-query-string-query-is-not-working-with-1-2-0/17824/4 "2014-05-30T06:03:02Z")

</div>

It sounds good. Does it work?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 30 mai 2014 à 07:52, hongsgo [hongsgo@gmail.com](mailto:hongsgo@gmail.com) a écrit :

thanks you.  
is it right?

# delete by query string query

curl -XDELETE  
'[http://10.99.196.141:22000/delete\_by\_query\_string\_query\_test1/1/\_query?pretty=true](http://10.99.196.141:22000/delete_by_query_string_query_test1/1/_query?pretty=true)'  
-d '  
{  
"query" : { //added  
"query\_string" : {  
"default\_field" : "playId",  
"query" : "1395395f-1543-44f7-ba11-fd8eff137af2 OR  
1395395f-1543-44f7-ba11-fd8eff137af1"  
}  
}  
}  
'

--  
View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/delete-by-query-string-query-is-not-working-with-1-2-0-tp4056754p4056764.html](http://elasticsearch-users.115913.n3.nabble.com/delete-by-query-string-query-is-not-working-with-1-2-0-tp4056754p4056764.html)  
Sent from the ElasticSearch Users mailing list archive at [Nabble.com](http://Nabble.com).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1401429125740-4056764.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1401429125740-4056764.post%40n3.nabble.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CA423A07-26A0-4C69-A284-AC6335931CAB%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/CA423A07-26A0-4C69-A284-AC6335931CAB%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![happyprg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/happyprg/32/681_2.png) [@happyprg](https://discuss.elastic.co/u/happyprg)\
**Post date:** [May 30, 2014, 6:47am UTC](https://discuss.elastic.co/t/delete-by-query-string-query-is-not-working-with-1-2-0/17824/5 "2014-05-30T06:47:26Z")

</div>

Yes. it is works.  
I learned a lot of things of you  
Thank you.^^

---

<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, 1:25am UTC](https://discuss.elastic.co/t/delete-by-query-string-query-is-not-working-with-1-2-0/17824/6 "2017-07-06T01:25:55Z")

</div>


