# Basic sort crashing in the search

**URL:** <https://discuss.elastic.co/t/basic-sort-crashing-in-the-search/6534>\
**Category:** Elasticsearch\
**Created:** [January 30, 2012, 6:58am UTC](https://discuss.elastic.co/t/basic-sort-crashing-in-the-search/6534 "2012-01-30T06:58:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![narinder\_izap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/narinder_izap/32/803_2.png) [@narinder\_izap](https://discuss.elastic.co/u/narinder_izap)\
**Post date:** [January 30, 2012, 6:58am UTC](https://discuss.elastic.co/t/basic-sort-crashing-in-the-search/6534/1 "2012-01-30T06:58:55Z")

</div>

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??

---

<div class="post-metadata">

**Author:** ![Nick\_Hoffman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nick_hoffman/32/1872_2.png) [@Nick\_Hoffman](https://discuss.elastic.co/u/Nick_Hoffman)\
**Post date:** [January 31, 2012, 12:54am UTC](https://discuss.elastic.co/t/basic-sort-crashing-in-the-search/6534/2 "2012-01-31T00:54:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rudygt](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@rudygt](https://discuss.elastic.co/u/rudygt)\
**Post date:** [January 31, 2012, 4:15am UTC](https://discuss.elastic.co/t/basic-sort-crashing-in-the-search/6534/3 "2012-01-31T04:15:52Z")

</div>

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"  
}  
}  
}

> **[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 Jan 30, 12:58 am, Narinder Kaur [narinder.k...@izap.in](mailto: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??

---

<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, 3:41am UTC](https://discuss.elastic.co/t/basic-sort-crashing-in-the-search/6534/4 "2017-07-06T03:41:01Z")

</div>


