Is there a way of specifying the format of times used in a query? In most of my indexes I convert times to ISO8601 but one data source had a totally non standard format and I decided that it was easier to simply specify a custom format in the mapping.
Now I am trying to extract data using the API and I find that I have to use the same data format as the _source.
query >>>> index dns_ds {:size=>10000, :sort=>[{:@timestamp=>{:order=>"asc"}}], :query=>{:bool=>{:must=>[{:range=>{:@timestamp=>{:gte=>"02-Mar-2022 00:00:00 +1300", :lte=>"04-Mar-2022 00:00:00 +1300"}}}]}}}
in rescue [400] {"error":{"root_cause":[{"type":"parse_exception","reason":"failed to parse date field [02-Mar-2022 00:00:00 +1300] with format [dd-MMM-yyyy HH:mm:ss.SSS Z]:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.