I am using Elasticsearch version 7.11.2.
I would like to create a policy that deletes all documents that are older than two months (e.g., "dateTime": "2023-06-13T15:42:03.6633024+03:00") and contains the field scriptName that is equal to "TestScript" from the index pattern automation-*.
Most of the indices include the field dateTime, but some indices use the field startTime (e.g., "startTime": "2023-06-13T15:41:12.3944925+03:00").
Can you please help me with this?
Thank you