Basic sort crashing in the search


(narinder.izap) #1

Hi there, sorting was working fine in my system, but now its not crashing
the query.

The query is as following:

{
"query": {
"match_all": ""
},
"sort": {
"time_created": {
"order": "desc"
}
}
}

and here time_created is a string datatype numeric value as it is *
timestamp*, so it ensures the field will not be multivalued and its single
for a single document. and the sorting was working fine, but not anymore.

can you tell me where is the problem??


(Nick Hoffman) #2

Hey there, Narinder. It'd be a lot easier to help you if you post full curl
commands for your settings, mapping, and a document.


(rudygt) #3

Hi,

I think that you have a mistake in the match_all, try this, let me
know if works for you!, regards.

{
"query": {
"match_all": { }
},
"sort": {
"time_created": {
"order": "desc"
}
}
}

http://www.elasticsearch.org/guide/reference/query-dsl/match-all-query.html

On Jan 30, 12:58 am, Narinder Kaur narinder.k...@izap.in wrote:

Hi there, sorting was working fine in my system, but now its not crashing
the query.

The query is as following:

{
"query": {
"match_all": ""
},
"sort": {
"time_created": {
"order": "desc"
}
}

}

and here time_created is a string datatype numeric value as it is *
timestamp*, so it ensures the field will not be multivalued and its single
for a single document. and the sorting was working fine, but not anymore.

can you tell me where is the problem??


(system) #4