Here is a curl recreation, hopefully that will be clearer: http://pastebin.com/DUhbpgze
JM On Sun, Mar 29, 2015 at 4:18 PM, Jean Marc Saffroy <j...@scality.com> wrote: > Of course I left a typo in my email: I do use the same field name across > mapping def, docs and queries, and it does not work. > > JM > > On Sun, Mar 29, 2015 at 4:17 PM, Jean Marc Saffroy <j...@scality.com> wrote: > >> Hi all, >> >> Not sure what I'm doing wrong, but I couldn't find a way to store my docs >> with timestamps as seconds since the Unix epoch and query them properly. I >> have my date/time field mapped like this: >> >> "start_time": {"type": "date" }, >> >> I store documents like this: >> >> { "start_time": 1427631731, ... } >> >> And get no result when I do a range query like this: >> >> "query": { >> "range": { "@timestamp": { "gte": "2015-03-29" }} >> } >> >> I have good results when I store timestamps as strings in ISO format. >> >> Is that supposed to work? Is there a specific date parser I should use? >> >> JM >> >> > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALZqptb5xZNgok4hiszEF9JP_KRuk6y%3DwdqfbjR0xxBesK4dBA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.