Question about date mapping and search queries

(yannis.rossetto) #1


In our project, we use elaticsearch to index files. For these files, we
want to store :

  1. Text data like title, description, ...
  2. Date data

Each document don't have necessary a date, and a document can have multiple
date data (it depends on user configuration).

I made some test regarding the date data in order to have a concrete
example and to know how we can build a query with a date parameter (I've
attached the CURL requests I did) .

I've added a date like "post_date" = '2014-06-12" (with a string) and I was
able to search with { "post_date" : {"gte": "now-1d" } }.

Is it the standard behaviour for date data (add it as string and be able to
search it with date selector) ?

Thanks a lot,


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
To view this discussion on the web visit
For more options, visit

(system) #2