I would like to compare an elastic search date with a format YYY-MM-DD HH:MM:SS as to compare the results of the past 30 days. So if the given date is equal to NOW()-30D it should give me the result wanted. I have tried comparing it this way with a script but it doesn't work :
What version of elasticsearch? I recommend switching to elasticsearch 5+, as that has painless, which has the java 8 time api available, and is much easier to work with IMO.
@rjernst I'm limited to Elasticsearch 1.9 as the server of my company won't handle a higher version. There isn't a way to do it with groovy? As I suppose comparing an elasticsearch date with the date of the last 30 days should be doable.
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.