# Error in query string

**URL:** <https://discuss.elastic.co/t/error-in-query-string/16800>\
**Category:** Elasticsearch\
**Created:** [April 3, 2014, 6:26pm UTC](https://discuss.elastic.co/t/error-in-query-string/16800 "2014-04-03T18:26:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [April 3, 2014, 6:26pm UTC](https://discuss.elastic.co/t/error-in-query-string/16800/1 "2014-04-03T18:26:55Z")

</div>

I am just trying to execute a simple query string and I am getting this  
error:

[ec2-user@ip-10-80-140-13 ~]$ curl -XGET "  
[http://10.80.140.13:9200/users/\_search](http://10.80.140.13:9200/users/_search)" -d'

> {  
> "query\_string" : {  
> "query" : "this AND that OR thus"  
> }  
> }'  
> {"error":"SearchPhaseExecutionException[Failed to execute phase [query],  
> all shards failed; shardFailures {[5ay80g1HTAinyRZBzEZHTg][users][2]:  
> SearchParseException[[users][2]: from[-1],size[-1]: Parse Failure [Failed  
> to parse source [\n{\n "query\_string" : {\n "query" : "this  
> AND that OR thus"\n }\n}]]]; nested: SearchParseException[[users][2]:  
> from[-1],size[-1]: Parse Failure [No parser for element [query\_string]]];  
> }{[Eybinjt4Sl21p1AujiwiaA][users][3]:  
> RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> nested: SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> "this AND that OR thus"\n }\n}]]]; nested:  
> SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure [No  
> parser for element [query\_string]]]; }{[Eybinjt4Sl21p1AujiwiaA][users][0]:  
> RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> nested: SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> "this AND that OR thus"\n }\n}]]]; nested:  
> SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure [No  
> parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][1]:  
> RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> nested: SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> "this AND that OR thus"\n }\n}]]]; nested:  
> SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure [No  
> parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][4]:  
> RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> nested: SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure  
> [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> "this AND that OR thus"\n }\n}]]]; nested:  
> SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure [No  
> parser for element [query\_string]]];  
> }]","status":400}[ec2-user@ip-10-80-140-13 ~]$  
> [ec2-user@ip-10-80-140-13 ~]$  
> [ec2-user@ip-10-80-140-13 ~]$

--  
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/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![luizgpsantos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luizgpsantos/32/608_2.png) [@luizgpsantos](https://discuss.elastic.co/u/luizgpsantos)\
**Post date:** [April 3, 2014, 6:33pm UTC](https://discuss.elastic.co/t/error-in-query-string/16800/2 "2014-04-03T18:33:59Z")

</div>

Hi Mohit,

In the exception raised it says: No parser for element [query\_string] which  
means elasticsearch don't recognize "query\_string" as the root of JSON. In  
this case you must start with "query". Look:

curl -XPOST "[http://localhost:9200/users/\_search](http://localhost:9200/users/_search)" -d'  
{  
"query": {  
"query\_string": {  
"default\_field": "title",  
"query": "this AND that OR thus"  
}  
}  
}'

Cheers,  
Luiz Guilherme

On Thu, Apr 3, 2014 at 3:26 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:

> I am just trying to execute a simple query string and I am getting this  
> error:
> 
> [ec2-user@ip-10-80-140-13 ~]$ curl -XGET "  
> [http://10.80.140.13:9200/users/\_search](http://10.80.140.13:9200/users/_search)" -d'
> 
> > {  
> > "query\_string" : {  
> > "query" : "this AND that OR thus"  
> > }  
> > }'  
> > {"error":"SearchPhaseExecutionException[Failed to execute phase [query],  
> > all shards failed; shardFailures {[5ay80g1HTAinyRZBzEZHTg][users][2]:  
> > SearchParseException[[users][2]: from[-1],size[-1]: Parse Failure [Failed  
> > to parse source [\n{\n "query\_string" : {\n "query" : "this  
> > AND that OR thus"\n }\n}]]]; nested: SearchParseException[[users][2]:  
> > from[-1],size[-1]: Parse Failure [No parser for element [query\_string]]];  
> > }{[Eybinjt4Sl21p1AujiwiaA][users][3]:  
> > RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> > nested: SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > "this AND that OR thus"\n }\n}]]]; nested:  
> > SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure [No  
> > parser for element [query\_string]]]; }{[Eybinjt4Sl21p1AujiwiaA][users][0]:  
> > RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> > nested: SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > "this AND that OR thus"\n }\n}]]]; nested:  
> > SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure [No  
> > parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][1]:  
> > RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> > nested: SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > "this AND that OR thus"\n }\n}]]]; nested:  
> > SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure [No  
> > parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][4]:  
> > RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> > nested: SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure  
> > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > "this AND that OR thus"\n }\n}]]]; nested:  
> > SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure [No  
> > parser for element [query\_string]]];  
> > }]","status":400}[ec2-user@ip-10-80-140-13 ~]$  
> > [ec2-user@ip-10-80-140-13 ~]$  
> > [ec2-user@ip-10-80-140-13 ~]$
> 
> --  
> 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/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Luiz Guilherme P. Santos

--  
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/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF\_HezQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [April 3, 2014, 6:37pm UTC](https://discuss.elastic.co/t/error-in-query-string/16800/3 "2014-04-03T18:37:26Z")

</div>

That doesn't work either. I am trying to execute this command from here:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

On Thu, Apr 3, 2014 at 11:33 AM, Luiz Guilherme Pais dos Santos \<  
[luizgpsantos@gmail.com](mailto:luizgpsantos@gmail.com)\> wrote:

> Hi Mohit,
> 
> In the exception raised it says: No parser for element [query\_string]  
> which means elasticsearch don't recognize "query\_string" as the root of  
> JSON. In this case you must start with "query". Look:
> 
> curl -XPOST "[http://localhost:9200/users/\_search](http://localhost:9200/users/_search)" -d'  
> {  
> "query": {  
> "query\_string": {  
> "default\_field": "title",  
> "query": "this AND that OR thus"  
> }  
> }  
> }'
> 
> Cheers,  
> Luiz Guilherme
> 
> On Thu, Apr 3, 2014 at 3:26 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> 
> > I am just trying to execute a simple query string and I am getting this  
> > error:
> > 
> > [ec2-user@ip-10-80-140-13 ~]$ curl -XGET "  
> > [http://10.80.140.13:9200/users/\_search](http://10.80.140.13:9200/users/_search)" -d'
> > 
> > > {  
> > > "query\_string" : {  
> > > "query" : "this AND that OR thus"  
> > > }  
> > > }'  
> > > {"error":"SearchPhaseExecutionException[Failed to execute phase [query],  
> > > all shards failed; shardFailures {[5ay80g1HTAinyRZBzEZHTg][users][2]:  
> > > SearchParseException[[users][2]: from[-1],size[-1]: Parse Failure [Failed  
> > > to parse source [\n{\n "query\_string" : {\n "query" : "this  
> > > AND that OR thus"\n }\n}]]]; nested: SearchParseException[[users][2]:  
> > > from[-1],size[-1]: Parse Failure [No parser for element [query\_string]]];  
> > > }{[Eybinjt4Sl21p1AujiwiaA][users][3]:  
> > > RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> > > nested: SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure  
> > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure [No  
> > > parser for element [query\_string]]]; }{[Eybinjt4Sl21p1AujiwiaA][users][0]:  
> > > RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> > > nested: SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure  
> > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure [No  
> > > parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][1]:  
> > > RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> > > nested: SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure  
> > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure [No  
> > > parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][4]:  
> > > RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> > > nested: SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure  
> > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure [No  
> > > parser for element [query\_string]]];  
> > > }]","status":400}[ec2-user@ip-10-80-140-13 ~]$  
> > > [ec2-user@ip-10-80-140-13 ~]$  
> > > [ec2-user@ip-10-80-140-13 ~]$
> > 
> > --  
> > 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/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Luiz Guilherme P. Santos
> 
> --  
> 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/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF\_HezQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF\_HezQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> 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/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![luizgpsantos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luizgpsantos/32/608_2.png) [@luizgpsantos](https://discuss.elastic.co/u/luizgpsantos)\
**Post date:** [April 3, 2014, 6:43pm UTC](https://discuss.elastic.co/t/error-in-query-string/16800/4 "2014-04-03T18:43:53Z")

</div>

What happened when you executed the command, an exception? Which? No  
results? Is there any documents indexed in elasticsearch? Please be more  
clear about the problem.

On Thu, Apr 3, 2014 at 3:37 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:

> That doesn't work either. I am trying to execute this command from here:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html)
> 
> On Thu, Apr 3, 2014 at 11:33 AM, Luiz Guilherme Pais dos Santos \<  
> [luizgpsantos@gmail.com](mailto:luizgpsantos@gmail.com)\> wrote:
> 
> > Hi Mohit,
> > 
> > In the exception raised it says: No parser for element [query\_string]  
> > which means elasticsearch don't recognize "query\_string" as the root of  
> > JSON. In this case you must start with "query". Look:
> > 
> > curl -XPOST "[http://localhost:9200/users/\_search](http://localhost:9200/users/_search)" -d'  
> > {  
> > "query": {  
> > "query\_string": {  
> > "default\_field": "title",  
> > "query": "this AND that OR thus"  
> > }  
> > }  
> > }'
> > 
> > Cheers,  
> > Luiz Guilherme
> > 
> > On Thu, Apr 3, 2014 at 3:26 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> > 
> > > I am just trying to execute a simple query string and I am getting this  
> > > error:
> > > 
> > > [ec2-user@ip-10-80-140-13 ~]$ curl -XGET "  
> > > [http://10.80.140.13:9200/users/\_search](http://10.80.140.13:9200/users/_search)" -d'
> > > 
> > > > {  
> > > > "query\_string" : {  
> > > > "query" : "this AND that OR thus"  
> > > > }  
> > > > }'  
> > > > {"error":"SearchPhaseExecutionException[Failed to execute phase [query],  
> > > > all shards failed; shardFailures {[5ay80g1HTAinyRZBzEZHTg][users][2]:  
> > > > SearchParseException[[users][2]: from[-1],size[-1]: Parse Failure [Failed  
> > > > to parse source [\n{\n "query\_string" : {\n "query" : "this  
> > > > AND that OR thus"\n }\n}]]]; nested: SearchParseException[[users][2]:  
> > > > from[-1],size[-1]: Parse Failure [No parser for element [query\_string]]];  
> > > > }{[Eybinjt4Sl21p1AujiwiaA][users][3]:  
> > > > RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> > > > nested: SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure  
> > > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > > SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure [No  
> > > > parser for element [query\_string]]]; }{[Eybinjt4Sl21p1AujiwiaA][users][0]:  
> > > > RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> > > > nested: SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure  
> > > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > > SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure [No  
> > > > parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][1]:  
> > > > RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> > > > nested: SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure  
> > > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > > SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure [No  
> > > > parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][4]:  
> > > > RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> > > > nested: SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure  
> > > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > > SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure [No  
> > > > parser for element [query\_string]]];  
> > > > }]","status":400}[ec2-user@ip-10-80-140-13 ~]$  
> > > > [ec2-user@ip-10-80-140-13 ~]$  
> > > > [ec2-user@ip-10-80-140-13 ~]$
> > > 
> > > --  
> > > 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/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > Luiz Guilherme P. Santos
> > 
> > --  
> > 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/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF\_HezQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF\_HezQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > 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/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Luiz Guilherme P. Santos

--  
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/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [April 3, 2014, 6:46pm UTC](https://discuss.elastic.co/t/error-in-query-string/16800/5 "2014-04-03T18:46:12Z")

</div>

I got the same issue

[ec2-user@ip-10-80-140-13 ~]$ curl -XPOST "  
[http://localhost:9200/users/\_search](http://localhost:9200/users/_search)" -d'

> 

> {

> 

> "query": {

> 

> "query\_string": {

> 

> "default\_field": "title",

> 

> 

> "query": "this AND that OR thus"

> 

> }

> 

> }

> 

> '

{"error":"SearchPhaseExecutionException[Failed to execute phase [query],  
all shards failed; shardFailures {[LrIIW8-MTr6-qoWXk-Xl6A][users][2]:  
RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
nested: SearchParseException[[users][2]: query[+title:this +title:that  
title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source  
[\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field":  
"title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]];  
nested: JsonParseException[Unexpected end-of-input: expected close marker  
for OBJECT (from [Source: [B@15b0b65c; line: 3, column: 0])\n at [Source:  
UNKNOWN; line: 18, column: 202]]; }{[Eybinjt4Sl21p1AujiwiaA][users][3]:  
RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
nested: SearchParseException[[users][3]: query[+title:this +title:that  
title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source  
[\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field":  
"title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]];  
nested: JsonParseException[Unexpected end-of-input: expected close marker  
for OBJECT (from [Source: [B@75d811e7; line: 3, column: 0])\n at [Source:  
UNKNOWN; line: 18, column: 202]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][0]:  
RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
nested: SearchParseException[[users][0]: query[+title:this +title:that  
title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source  
[\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field":  
"title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]];  
nested: JsonParseException[Unexpected end-of-input: expected close marker  
for OBJECT (from [Source: [B@443ab608; line: 3, column: 0])\n at [Source:  
UNKNOWN; line: 18, column: 202]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][1]:  
RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
nested: SearchParseException[[users][1]: query[+title:this +title:that  
title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source  
[\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field":  
"title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]];  
nested: JsonParseException[Unexpected end-of-input: expected close marker  
for OBJECT (from [Source: [B@749bddb5; line: 3, column: 0])\n at [Source:  
UNKNOWN; line: 18, column: 202]]; }{[5ay80g1HTAinyRZBzEZHTg][users][4]:  
SearchParseException[[users][4]: query[+title:this +title:that  
title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source  
[\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field":  
"title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]];  
nested: JsonParseException[Unexpected end-of-input: expected close marker  
for OBJECT (from [Source: [B@65dc3111; line: 3, column: 0])\n at [Source:  
[B@65dc3111; line: 18, column: 151]];  
}]","status":400}[ec2-user@ip-10-80-140-13 ~]$

[ec2-user@ip-10-80-140-13 ~]$ Connection to 10.80.140.13 closed by remote  
host.

Connection to 10.80.140.13 closed.

On Thu, Apr 3, 2014 at 11:43 AM, Luiz Guilherme Pais dos Santos \<  
[luizgpsantos@gmail.com](mailto:luizgpsantos@gmail.com)\> wrote:

> What happened when you executed the command, an exception? Which? No  
> results? Is there any documents indexed in elasticsearch? Please be more  
> clear about the problem.
> 
> On Thu, Apr 3, 2014 at 3:37 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> 
> > That doesn't work either. I am trying to execute this command from here:
> > 
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html)
> > 
> > On Thu, Apr 3, 2014 at 11:33 AM, Luiz Guilherme Pais dos Santos \<  
> > [luizgpsantos@gmail.com](mailto:luizgpsantos@gmail.com)\> wrote:
> > 
> > > Hi Mohit,
> > > 
> > > In the exception raised it says: No parser for element [query\_string]  
> > > which means elasticsearch don't recognize "query\_string" as the root of  
> > > JSON. In this case you must start with "query". Look:
> > > 
> > > curl -XPOST "[http://localhost:9200/users/\_search](http://localhost:9200/users/_search)" -d'  
> > > {  
> > > "query": {  
> > > "query\_string": {  
> > > "default\_field": "title",  
> > > "query": "this AND that OR thus"  
> > > }  
> > > }  
> > > }'
> > > 
> > > Cheers,  
> > > Luiz Guilherme
> > > 
> > > On Thu, Apr 3, 2014 at 3:26 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> > > 
> > > > I am just trying to execute a simple query string and I am getting this  
> > > > error:
> > > > 
> > > > [ec2-user@ip-10-80-140-13 ~]$ curl -XGET "  
> > > > [http://10.80.140.13:9200/users/\_search](http://10.80.140.13:9200/users/_search)" -d'
> > > > 
> > > > > {  
> > > > > "query\_string" : {  
> > > > > "query" : "this AND that OR thus"  
> > > > > }  
> > > > > }'  
> > > > > {"error":"SearchPhaseExecutionException[Failed to execute phase  
> > > > > [query], all shards failed; shardFailures  
> > > > > {[5ay80g1HTAinyRZBzEZHTg][users][2]: SearchParseException[[users][2]:  
> > > > > from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n  
> > > > > "query\_string" : {\n "query" : "this AND that OR thus"\n  
> > > > > }\n}]]]; nested: SearchParseException[[users][2]: from[-1],size[-1]: Parse  
> > > > > Failure [No parser for element [query\_string]]];  
> > > > > }{[Eybinjt4Sl21p1AujiwiaA][users][3]:  
> > > > > RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> > > > > nested: SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure  
> > > > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > > > SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure [No  
> > > > > parser for element [query\_string]]]; }{[Eybinjt4Sl21p1AujiwiaA][users][0]:  
> > > > > RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> > > > > nested: SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure  
> > > > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > > > SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure [No  
> > > > > parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][1]:  
> > > > > RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> > > > > nested: SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure  
> > > > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > > > SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure [No  
> > > > > parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][4]:  
> > > > > RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> > > > > nested: SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure  
> > > > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > > > SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure [No  
> > > > > parser for element [query\_string]]];  
> > > > > }]","status":400}[ec2-user@ip-10-80-140-13 ~]$  
> > > > > [ec2-user@ip-10-80-140-13 ~]$  
> > > > > [ec2-user@ip-10-80-140-13 ~]$
> > > > 
> > > > --  
> > > > 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/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > Luiz Guilherme P. Santos
> > > 
> > > --  
> > > 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/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF\_HezQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF\_HezQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > .
> > > 
> > > 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/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Luiz Guilherme P. Santos
> 
> --  
> 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/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> 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/CAOT3TWrepx2t4RUF3Cyjio0qZAEKsLkjYF0iQJk%2BXKi3ZhQYVA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrepx2t4RUF3Cyjio0qZAEKsLkjYF0iQJk%2BXKi3ZhQYVA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [April 3, 2014, 7:08pm UTC](https://discuss.elastic.co/t/error-in-query-string/16800/6 "2014-04-03T19:08:05Z")

</div>

Missing end bracket } I think

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 3 avril 2014 à 20:46:17, Mohit Anchlia ([mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)) a écrit:

I got the same issue

[ec2-user@ip-10-80-140-13 ~]$ curl -XPOST "[http://localhost:9200/users/\_search](http://localhost:9200/users/_search)" -d'

> 

> {

> 

> "query": {

> 

> "query\_string": {

> 

> "default\_field": "title",

> 

> 

> "query": "this AND that OR thus"

> 

> }

> 

> }

> 

> '

{"error":"SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[LrIIW8-MTr6-qoWXk-Xl6A][users][2]: RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]]; nested: SearchParseException[[users][2]: query[+title:this +title:that title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source [\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field": "title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]]; nested: JsonParseException[Unexpected end-of-input: expected close marker for OBJECT (from [Source: [B@15b0b65c; line: 3, column: 0])\n at [Source: UNKNOWN; line: 18, column: 202]]; }{[Eybinjt4Sl21p1AujiwiaA][users][3]: RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]]; nested: SearchParseException[[users][3]: query[+title:this +title:that title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source [\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field": "title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]]; nested: JsonParseException[Unexpected end-of-input: expected close marker for OBJECT (from [Source: [B@75d811e7; line: 3, column: 0])\n at [Source: UNKNOWN; line: 18, column: 202]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][0]: RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]]; nested: SearchParseException[[users][0]: query[+title:this +title:that title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source [\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field": "title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]]; nested: JsonParseException[Unexpected end-of-input: expected close marker for OBJECT (from [Source: [B@443ab608; line: 3, column: 0])\n at [Source: UNKNOWN; line: 18, column: 202]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][1]: RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]]; nested: SearchParseException[[users][1]: query[+title:this +title:that title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source [\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field": "title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]]; nested: JsonParseException[Unexpected end-of-input: expected close marker for OBJECT (from [Source: [B@749bddb5; line: 3, column: 0])\n at [Source: UNKNOWN; line: 18, column: 202]]; }{[5ay80g1HTAinyRZBzEZHTg][users][4]: SearchParseException[[users][4]: query[+title:this +title:that title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source [\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field": "title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]]; nested: JsonParseException[Unexpected end-of-input: expected close marker for OBJECT (from [Source: [B@65dc3111; line: 3, column: 0])\n at [Source: [B@65dc3111; line: 18, column: 151]]; }]","status":400}[ec2-user@ip-10-80-140-13 ~]$

[ec2-user@ip-10-80-140-13 ~]$ Connection to 10.80.140.13 closed by remote host.

Connection to 10.80.140.13 closed.

On Thu, Apr 3, 2014 at 11:43 AM, Luiz Guilherme Pais dos Santos [luizgpsantos@gmail.com](mailto:luizgpsantos@gmail.com) wrote:  
What happened when you executed the command, an exception? Which? No results? Is there any documents indexed in elasticsearch? Please be more clear about the problem.

On Thu, Apr 3, 2014 at 3:37 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) wrote:  
That doesn't work either. I am trying to execute this command from here:

> **[Elastic — The Search AI Company](https://www.elastic.co)**
>
> Power insights and outcomes with The Elastic Search AI Platform. See into your data and find answers that matter with enterprise solutions designed to help you accelerate time to insight. Try Elastic ...

On Thu, Apr 3, 2014 at 11:33 AM, Luiz Guilherme Pais dos Santos [luizgpsantos@gmail.com](mailto:luizgpsantos@gmail.com) wrote:  
Hi Mohit,

In the exception raised it says: No parser for element [query\_string] which means elasticsearch don't recognize "query\_string" as the root of JSON. In this case you must start with "query". Look:

curl -XPOST "[http://localhost:9200/users/\_search](http://localhost:9200/users/_search)" -d'  
{  
"query": {  
"query\_string": {  
"default\_field": "title",  
"query": "this AND that OR thus"  
}  
}  
}'

Cheers,  
Luiz Guilherme

On Thu, Apr 3, 2014 at 3:26 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) wrote:  
I am just trying to execute a simple query string and I am getting this error:

[ec2-user@ip-10-80-140-13 ~]$ curl -XGET "[http://10.80.140.13:9200/users/\_search](http://10.80.140.13:9200/users/_search)" -d'

> {  
> "query\_string" : {  
> "query" : "this AND that OR thus"  
> }  
> }'  
> {"error":"SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[5ay80g1HTAinyRZBzEZHTg][users][2]: SearchParseException[[users][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n "query\_string" : {\n "query" : "this AND that OR thus"\n }\n}]]]; nested: SearchParseException[[users][2]: from[-1],size[-1]: Parse Failure [No parser for element [query\_string]]]; }{[Eybinjt4Sl21p1AujiwiaA][users][3]: RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]]; nested: SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n "query\_string" : {\n "query" : "this AND that OR thus"\n }\n}]]]; nested: SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure [No parser for element [query\_string]]]; }{[Eybinjt4Sl21p1AujiwiaA][users][0]: RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]]; nested: SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n "query\_string" : {\n "query" : "this AND that OR thus"\n }\n}]]]; nested: SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure [No parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][1]: RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]]; nested: SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n "query\_string" : {\n "query" : "this AND that OR thus"\n }\n}]]]; nested: SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure [No parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][4]: RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]]; nested: SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n "query\_string" : {\n "query" : "this AND that OR thus"\n }\n}]]]; nested: SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure [No parser for element [query\_string]]]; }]","status":400}[ec2-user@ip-10-80-140-13 ~]$  
> [ec2-user@ip-10-80-140-13 ~]$  
> [ec2-user@ip-10-80-140-13 ~]$

--  
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/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## -- Luiz Guilherme P. Santos

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/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF\_HezQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.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/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com).

For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## -- Luiz Guilherme P. Santos

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/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.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/CAOT3TWrepx2t4RUF3Cyjio0qZAEKsLkjYF0iQJk%2BXKi3ZhQYVA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrepx2t4RUF3Cyjio0qZAEKsLkjYF0iQJk%2BXKi3ZhQYVA%40mail.gmail.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/etPan.533db195.24f6ab8e.16bdd%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.533db195.24f6ab8e.16bdd%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [April 3, 2014, 7:36pm UTC](https://discuss.elastic.co/t/error-in-query-string/16800/7 "2014-04-03T19:36:08Z")

</div>

Yes that seem to be the reason.

Does it mean the documentation is incomplete or is there a certain way I  
should read query dsl documentation?

On Thu, Apr 3, 2014 at 12:08 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Missing end bracket } I think
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 3 avril 2014 à 20:46:17, Mohit Anchlia ([mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)) a  
> écrit:
> 
> I got the same issue
> 
> [ec2-user@ip-10-80-140-13 ~]$ curl -XPOST "  
> [http://localhost:9200/users/\_search](http://localhost:9200/users/_search)" -d'
> 
> > 
> 
> > {
> 
> > 
> 
> > "query": {
> 
> > 
> 
> > "query\_string": {
> 
> > 
> 
> > "default\_field": "title",
> 
> > 
> 
> > 
> 
> > "query": "this AND that OR thus"
> 
> > 
> 
> > }
> 
> > 
> 
> > }
> 
> > 
> 
> > '
> 
> {"error":"SearchPhaseExecutionException[Failed to execute phase [query],  
> all shards failed; shardFailures {[LrIIW8-MTr6-qoWXk-Xl6A][users][2]:  
> RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> nested: SearchParseException[[users][2]: query[+title:this +title:that  
> title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source  
> [\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field":  
> "title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]];  
> nested: JsonParseException[Unexpected end-of-input: expected close marker  
> for OBJECT (from [Source: [B@15b0b65c; line: 3, column: 0])\n at [Source:  
> UNKNOWN; line: 18, column: 202]]; }{[Eybinjt4Sl21p1AujiwiaA][users][3]:  
> RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> nested: SearchParseException[[users][3]: query[+title:this +title:that  
> title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source  
> [\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field":  
> "title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]];  
> nested: JsonParseException[Unexpected end-of-input: expected close marker  
> for OBJECT (from [Source: [B@75d811e7; line: 3, column: 0])\n at [Source:  
> UNKNOWN; line: 18, column: 202]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][0]:  
> RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> nested: SearchParseException[[users][0]: query[+title:this +title:that  
> title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source  
> [\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field":  
> "title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]];  
> nested: JsonParseException[Unexpected end-of-input: expected close marker  
> for OBJECT (from [Source: [B@443ab608; line: 3, column: 0])\n at [Source:  
> UNKNOWN; line: 18, column: 202]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][1]:  
> RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> nested: SearchParseException[[users][1]: query[+title:this +title:that  
> title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source  
> [\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field":  
> "title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]];  
> nested: JsonParseException[Unexpected end-of-input: expected close marker  
> for OBJECT (from [Source: [B@749bddb5; line: 3, column: 0])\n at [Source:  
> UNKNOWN; line: 18, column: 202]]; }{[5ay80g1HTAinyRZBzEZHTg][users][4]:  
> SearchParseException[[users][4]: query[+title:this +title:that  
> title:thus],from[-1],size[-1]: Parse Failure [Failed to parse source  
> [\n\n{\n\n "query": {\n\n "query\_string": {\n\n "default\_field":  
> "title",\n\n\n "query": "this AND that OR thus"\n\n }\n\n }\n\n]]];  
> nested: JsonParseException[Unexpected end-of-input: expected close marker  
> for OBJECT (from [Source: [B@65dc3111; line: 3, column: 0])\n at [Source:  
> [B@65dc3111; line: 18, column: 151]];  
> }]","status":400}[ec2-user@ip-10-80-140-13 ~]$
> 
> [ec2-user@ip-10-80-140-13 ~]$ Connection to 10.80.140.13 closed by remote  
> host.
> 
> Connection to 10.80.140.13 closed.
> 
> On Thu, Apr 3, 2014 at 11:43 AM, Luiz Guilherme Pais dos Santos \<  
> [luizgpsantos@gmail.com](mailto:luizgpsantos@gmail.com)\> wrote:
> 
> > What happened when you executed the command, an exception? Which? No  
> > results? Is there any documents indexed in elasticsearch? Please be more  
> > clear about the problem.
> > 
> > On Thu, Apr 3, 2014 at 3:37 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> > 
> > > That doesn't work either. I am trying to execute this command from  
> > > here:
> > > 
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html)
> > > 
> > > On Thu, Apr 3, 2014 at 11:33 AM, Luiz Guilherme Pais dos Santos \<  
> > > [luizgpsantos@gmail.com](mailto:luizgpsantos@gmail.com)\> wrote:
> > > 
> > > > Hi Mohit,
> > > > 
> > > > In the exception raised it says: No parser for element [query\_string]  
> > > > which means elasticsearch don't recognize "query\_string" as the root of  
> > > > JSON. In this case you must start with "query". Look:
> > > > 
> > > > curl -XPOST "[http://localhost:9200/users/\_search](http://localhost:9200/users/_search)" -d'  
> > > > {  
> > > > "query": {  
> > > > "query\_string": {  
> > > > "default\_field": "title",  
> > > > "query": "this AND that OR thus"  
> > > > }  
> > > > }  
> > > > }'
> > > > 
> > > > Cheers,  
> > > > Luiz Guilherme
> > > > 
> > > > On Thu, Apr 3, 2014 at 3:26 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> > > > 
> > > > > I am just trying to execute a simple query string and I am getting  
> > > > > this error:
> > > > > 
> > > > > [ec2-user@ip-10-80-140-13 ~]$ curl -XGET "  
> > > > > [http://10.80.140.13:9200/users/\_search](http://10.80.140.13:9200/users/_search)" -d'
> > > > > 
> > > > > > {  
> > > > > > "query\_string" : {  
> > > > > > "query" : "this AND that OR thus"  
> > > > > > }  
> > > > > > }'  
> > > > > > {"error":"SearchPhaseExecutionException[Failed to execute phase  
> > > > > > [query], all shards failed; shardFailures  
> > > > > > {[5ay80g1HTAinyRZBzEZHTg][users][2]: SearchParseException[[users][2]:  
> > > > > > from[-1],size[-1]: Parse Failure [Failed to parse source [\n{\n  
> > > > > > "query\_string" : {\n "query" : "this AND that OR thus"\n  
> > > > > > }\n}]]]; nested: SearchParseException[[users][2]: from[-1],size[-1]: Parse  
> > > > > > Failure [No parser for element [query\_string]]];  
> > > > > > }{[Eybinjt4Sl21p1AujiwiaA][users][3]:  
> > > > > > RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> > > > > > nested: SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure  
> > > > > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > > > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > > > > SearchParseException[[users][3]: from[-1],size[-1]: Parse Failure [No  
> > > > > > parser for element [query\_string]]]; }{[Eybinjt4Sl21p1AujiwiaA][users][0]:  
> > > > > > RemoteTransportException[[10.80.140.58][inet[/10.80.140.58:9300]][search/phase/query]];  
> > > > > > nested: SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure  
> > > > > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > > > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > > > > SearchParseException[[users][0]: from[-1],size[-1]: Parse Failure [No  
> > > > > > parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][1]:  
> > > > > > RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> > > > > > nested: SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure  
> > > > > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > > > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > > > > SearchParseException[[users][1]: from[-1],size[-1]: Parse Failure [No  
> > > > > > parser for element [query\_string]]]; }{[LrIIW8-MTr6-qoWXk-Xl6A][users][4]:  
> > > > > > RemoteTransportException[[10.80.140.14][inet[/10.80.140.14:9300]][search/phase/query]];  
> > > > > > nested: SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure  
> > > > > > [Failed to parse source [\n{\n "query\_string" : {\n "query" :  
> > > > > > "this AND that OR thus"\n }\n}]]]; nested:  
> > > > > > SearchParseException[[users][4]: from[-1],size[-1]: Parse Failure [No  
> > > > > > parser for element [query\_string]]];  
> > > > > > }]","status":400}[ec2-user@ip-10-80-140-13 ~]$  
> > > > > > [ec2-user@ip-10-80-140-13 ~]$  
> > > > > > [ec2-user@ip-10-80-140-13 ~]$
> > > > > 
> > > > > --  
> > > > > 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/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > > > .  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > ## -- Luiz Guilherme P. Santos
> > > > 
> > > > 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/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF\_HezQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF\_HezQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > > .
> > > > 
> > > > 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/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com?utm_medium=email&utm_source=footer).
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > ## -- Luiz Guilherme P. Santos
> > 
> > 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/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com?utm_medium=email&utm_source=footer).
> > 
> > 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/CAOT3TWrepx2t4RUF3Cyjio0qZAEKsLkjYF0iQJk%2BXKi3ZhQYVA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrepx2t4RUF3Cyjio0qZAEKsLkjYF0iQJk%2BXKi3ZhQYVA%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrepx2t4RUF3Cyjio0qZAEKsLkjYF0iQJk%2BXKi3ZhQYVA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrepx2t4RUF3Cyjio0qZAEKsLkjYF0iQJk%2BXKi3ZhQYVA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> 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/etPan.533db195.24f6ab8e.16bdd%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.533db195.24f6ab8e.16bdd%40MacBook-Air-de-David.local)[https://groups.google.com/d/msgid/elasticsearch/etPan.533db195.24f6ab8e.16bdd%40MacBook-Air-de-David.local?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/etPan.533db195.24f6ab8e.16bdd%40MacBook-Air-de-David.local?utm_medium=email&utm_source=footer)  
> .
> 
> 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/CAOT3TWod49eKnwe6WKWJDaVeu6wqc5DGc6F2N2wi2r3Tx2jFMg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWod49eKnwe6WKWJDaVeu6wqc5DGc6F2N2wi2r3Tx2jFMg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)\
**Post date:** [April 3, 2014, 9:41pm UTC](https://discuss.elastic.co/t/error-in-query-string/16800/8 "2014-04-03T21:41:17Z")

</div>

In general, a query has the following structure:

{ "query": blahblah }

In the reference docs when referring to queries, the above structure is  
omitted and implied. So in your case, you just take the query\_string query  
syntax from the docs and plug it in to the part in my above  
example.

--  
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/03c5ea44-61fb-4f02-8329-e9fe4d17ef80%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/03c5ea44-61fb-4f02-8329-e9fe4d17ef80%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:38am UTC](https://discuss.elastic.co/t/error-in-query-string/16800/9 "2017-07-06T01:38:21Z")

</div>


