Dateformat usage in Elasticsearch index v1.7


(ashit pupu) #1

Hi

I am trying to store unixtimestamp as a value to a field in Elasticsearch Index. The version I am using is 1.7.3. While indexing the data mapping for the field is :-

         {"type":"date","format":"dateOptionalTime"}

the data is stored properly but when I try to query the particular field for date value I get parse exception. query used is :-

         {"query":{"term":{"contentPublishedTime":1447764265}}}

Error prompted :-

         IllegalArgumentException[Invalid format: "1447764265" is malformed at "5"]

I have tried using epoch_millis and epoch_second but it doesn't work.
The same query and the same date format is working fine with v1.3 and lower version. I have read the documentation of v1.7 but there is no mention as such of dateformat. Am I missing something in this. Please help.

Thanks


(system) #2