Not sorting by Date

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Not sorting by Date

Walendo
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

Is there something I'm forgetting?

Thanks
Jorge
Reply | Threaded
Open this post in threaded view
|

Re: Not sorting by Date

kimchy
Administrator
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 <[hidden email]> 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

Is there something I'm forgetting?

Thanks
Jorge