Hello,
How do I delete only last day's data in Elasticsearch ?
Thanks
Hello,
How do I delete only last day's data in Elasticsearch ?
Thanks
Are you using timeseries indexes, i.e. indexes named xxx-2016.01.12 or similar?
Hi,
Unfortunatly not.
If you don't have any timestamp in your data, then you can't.
If you have, you can add the delete-by-query plugin.
But you should prefer using time based indices.
In that case you can use the delete by query API, which is deprecated but available via a plugin in 2.0. If this is something you'll be doing often you should look into timeseries indexes.
© 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.