Delete by query


I would like to delete some data in the index older than a certain time...

I am trying to use the delete by query index...However, before trying to delete the data, I am trying to view the data older than the time frame..

POST ohsaccesslogsindex/_search { "query":{ "range":{ "@timestamp":{ "gt" : "2020-06-28T04:57:34.000Z"} } } }

By running the above, I get "No requests in range"

I tried checking the data by the GET API and could see that there is data present since April...

Could you please confirm what is it that I am doing wrong here ?

Few questions:

  • what is the version?
  • what does a document look like?
  • what is the mapping?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.