I am trying to show only those documents where published_at date is less than now-7d/d.
#It seems ES is not working correctly here. I tried with an example of showing documents which are having published_at filed greater than current datetime. Even though the published_at field is not greater than now but i still see one document in results. I am not sure what is happening here.
Please also note that then i am using "2021-03-30 20:20:49" instead of "now" then it is working. Something is wrong with now.
I think my Kibana is using default timezone of IST and when querying then it is resolving published_at timestamp to +5:30, because when i specify time_zone in query then the document doesn't match against 2021-03-31 13:57:52 even as it is adding 5:30 hours to published_at.
Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.
Instead, paste the text and format it with </> icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.
It would be great if you could update your post to solve this.
As far as I can see you are not specifying a timezone in your dates in the document. That's why you have incorrect results I think.
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.