Error in query string


(Mohit Anchlia) #1

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" -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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Luiz Guilherme Santos) #2

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" -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.comwrote:

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" -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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Mohit Anchlia) #3

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

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> 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" -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.comwrote:

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" -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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Luiz Guilherme Santos) #4

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.comwrote:

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

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> 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" -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.comwrote:

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" -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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Mohit Anchlia) #5

I got the same issue

[ec2-user@ip-10-80-140-13 ~]$ curl -XPOST "
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> 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.comwrote:

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

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> 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" -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.comwrote:

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" -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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrepx2t4RUF3Cyjio0qZAEKsLkjYF0iQJk%2BXKi3ZhQYVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(David Pilato) #6

Missing end bracket } I think

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

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

I got the same issue

[ec2-user@ip-10-80-140-13 ~]$ curl -XPOST "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 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 wrote:
That doesn't work either. I am trying to execute this command from here:

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 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" -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 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" -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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.com.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.com.

For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.com.

For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.com.

For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrepx2t4RUF3Cyjio0qZAEKsLkjYF0iQJk%2BXKi3ZhQYVA%40mail.gmail.com.
For more options, visit 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.
To view this discussion on the web visit 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.


(Mohit Anchlia) #7

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 wrote:

Missing end bracket } I think

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

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

I got the same issue

[ec2-user@ip-10-80-140-13 ~]$ curl -XPOST "
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> 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.comwrote:

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

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> 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" -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.comwrote:

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" -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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAOT3TWqrnc3hb9bJZqhNJBTknvX1%3D64uKwW54sSdvT1HAMykoA%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZGnvYGrhyjyKjAroM57j7pmuUVFgviARE713xSVF_HezQ%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrUi061Oa50P6DFGSJHEKrM%2Bnfzj3DHUGefK-%3DXmbUDgQ%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAMdL%3DZE7W4YmiKudefssc%3D1EiLxjQ%3DLaSwZp0XJutrtAuceV4g%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAOT3TWrepx2t4RUF3Cyjio0qZAEKsLkjYF0iQJk%2BXKi3ZhQYVA%40mail.gmail.comhttps://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.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/etPan.533db195.24f6ab8e.16bdd%40MacBook-Air-de-David.localhttps://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.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAOT3TWod49eKnwe6WKWJDaVeu6wqc5DGc6F2N2wi2r3Tx2jFMg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Binh Ly-2) #8

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/03c5ea44-61fb-4f02-8329-e9fe4d17ef80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #9