Hi,
We are using rollover with curator with max_age + max_size. In our automated index creation process we create multiple indices (think environments like like, dev, test, pre-prod etc ) BUT all of these indices are not always used so there can be 0 documents in them.
When an index is rolled over (creation_date > max_age) our index is not removed since we use field_stats filter and remove indices by timestamp.
I have not found a way to remove empty indices, can anyone help we out with this?
Field stats can’t do a document count on an empty index. You’ll have to figure out a different attribute to identity your indices. creation_date is still available, and index name.
You may also have to use your own scripting with the _cat API to identify empty indices and delete them with curl, or a similar tool.
There is no doc count filter, so you'd have to do some other clever work with filters to use other metrics if you wanted to use Curator. Either that, or script up some python using the Curator API.
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.