Problem with sort

It is a little bit weird, when I add sort to my query, I get a
SearchParserException (JsonParseException) "'{' (code 123)): was expecting
either valid name character (for unquoted name) or double-quote (for
quoted) to start field name"

{

"from" : 0,

"size" : 20,

"sort" : {

{ "_score" : {"order" : "desc"} }

},

"query":{

"query_string" : {

"query" : "myquery"

}

}

}

without the "sort" part it works fine. I am using ES 0.19.4, may it be a
version problem?

Thanks!!

--


http://www.xtivia.com http://www.Virtual-DBA.com http://www.Virtual-ASA.com
http://www.facebook.com/Xtivia http://twitter.com/#!/xtivia http://www.linkedin.com/company/xtivia
Xtivia Virtual-Services (DBA/ASA) Customer Support: (800) 205-7537

This e-mail may contain confidential or privileged information. If you
believe you have received this e-mail in error, please notify the sender by
reply e-mail and then delete this e-mail immediately.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Did you try:

{

"from" : 0,

"size" : 20,

"sort" : {
"_score" : {"order" : "desc"}

},

"query":{

"query_string" : {

"query" : "myquery"

}

}

}

On Tue, Feb 19, 2013 at 2:15 PM, elastray adelpozo@xtivia.com wrote:

It is a little bit weird, when I add sort to my query, I get a
SearchParserException (JsonParseException) "'{' (code 123)): was expecting
either valid name character (for unquoted name) or double-quote (for
quoted) to start field name"

{

"from" : 0,

"size" : 20,

"sort" : {

{ "_score" : {"order" : "desc"} }

},

"query":{

"query_string" : {

"query" : "myquery"

}

}

}

without the "sort" part it works fine. I am using ES 0.19.4, may it be a
version problem?

Thanks!!


http://www.xtivia.com http://www.Virtual-DBA.com http://www.Virtual-ASA.com
http://www.facebook.com/Xtivia http://twitter.com/#!/xtivia http://www.linkedin.com/company/xtivia
Xtivia Virtual-Services (DBA/ASA) Customer Support: (800) 205-7537

This e-mail may contain confidential or privileged information. If you
believe you have received this e-mail in error, please notify the sender by
reply e-mail and then delete this e-mail immediately.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.