# Not sorting by Date

**URL:** <https://discuss.elastic.co/t/not-sorting-by-date/2934>\
**Category:** Elasticsearch\
**Created:** [April 30, 2010, 1:29pm UTC](https://discuss.elastic.co/t/not-sorting-by-date/2934 "2010-04-30T13:29:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Walendo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/walendo/32/3348_2.png) [@Walendo](https://discuss.elastic.co/u/Walendo)\
**Post date:** [April 30, 2010, 1:29pm UTC](https://discuss.elastic.co/t/not-sorting-by-date/2934/1 "2010-04-30T13:29:07Z")

</div>

Hi,

I'm trying to sort some information by date (date desc) and it is not  
working, I tried the two mappings below for the field and it didn't  
work.

"dataNoticia" : {"type" : "date", "format" : "yyyy-MM-dd'T'HH:mm:ss",  
"store" :"yes", "index\_name" : "date", "index" : "not\_analyzed",  
"term\_vector" : "no", "boost" : 1.0, "omit\_norms" : true,  
"omit\_term\_freq\_and\_positions" : true, "precision\_step" : 4},

"dataNoticia" : {"type" : "date", "format" : "yyyy-MM-dd'T'HH:mm:ss",  
"store" :"yes"}

The query String is as follows:

[http://localhost:9200/indice/noticia\_transito\_cidade/\_search?callback=LM16206\_noticiasCidadeRetornadas&size=5&q=cidade%3D+558&sort=dataNoticia%3Areverse](http://localhost:9200/indice/noticia_transito_cidade/_search?callback=LM16206_noticiasCidadeRetornadas&size=5&q=cidade%3D+558&sort=dataNoticia%3Areverse)

Is there something I'm forgetting?

Thanks  
Jorge

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 30, 2010, 5:17pm UTC](https://discuss.elastic.co/t/not-sorting-by-date/2934/2 "2010-04-30T17:17:33Z")

</div>

No, this looks good. Can you open an issue and add some curls that recreate  
the problem?

cheers,  
shay.banon

On Fri, Apr 30, 2010 at 4:29 PM, Walendo [jorge.walendowsky@gmail.com](mailto:jorge.walendowsky@gmail.com)wrote:

> Hi,
> 
> I'm trying to sort some information by date (date desc) and it is not  
> working, I tried the two mappings below for the field and it didn't  
> work.
> 
> "dataNoticia" : {"type" : "date", "format" : "yyyy-MM-dd'T'HH:mm:ss",  
> "store" :"yes", "index\_name" : "date", "index" : "not\_analyzed",  
> "term\_vector" : "no", "boost" : 1.0, "omit\_norms" : true,  
> "omit\_term\_freq\_and\_positions" : true, "precision\_step" : 4},
> 
> "dataNoticia" : {"type" : "date", "format" : "yyyy-MM-dd'T'HH:mm:ss",  
> "store" :"yes"}
> 
> The query String is as follows:
> 
> [http://localhost:9200/indice/noticia\_transito\_cidade/\_search?callback=LM16206\_noticiasCidadeRetornadas&size=5&q=cidade%3D+558&sort=dataNoticia%3Areverse](http://localhost:9200/indice/noticia_transito_cidade/_search?callback=LM16206_noticiasCidadeRetornadas&size=5&q=cidade%3D+558&sort=dataNoticia%3Areverse)
> 
> Is there something I'm forgetting?
> 
> Thanks  
> Jorge

---

<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, 4:24am UTC](https://discuss.elastic.co/t/not-sorting-by-date/2934/3 "2017-07-06T04:24:20Z")

</div>


