I want to delete documents from my index ''index_name" which are older than 7 days.
The field I want to use is not @timestamp and is another field "date" in that index.
I am not sure of the DELETE QUERY.
Please help
I want to delete documents from my index ''index_name" which are older than 7 days.
The field I want to use is not @timestamp and is another field "date" in that index.
I am not sure of the DELETE QUERY.
Please help
you can use the delete query along with time range
make it now-6d and try to run
or moreover you can use it also
"range": {
"date": {
"gte": "2015-11-01",
"lte": "2015-11-30"
}
}
© 2020. All Rights Reserved - Elasticsearch
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.