Cat indices API get 0 doc count index

Hi everyone,

Is it possible to have one ES call for retrieving indices with zero doc count?
Scenario is we want to delete all indices with zero doc count.
Is this possible in one go?

Thank you

In only one request, I don't think you can but it should be easy to automate this using the _cat/indices API.

The question to me is more: why do you create indices if you don't send documents? Could you just use index templates and when a first document is sent the index is automatically created. If no document is sent, no index will be created.

Thank you for this one David.

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