We can also close an index using the close API endpoint. That comes back as acknowledged equal to true. Now whenever we look at all of our indices, using the CAT interface, we can see the Simpsons index is still there, but now it's in a closed state, as well as it doesn't have a health status, because it's closed. When an index is closed, it consumes almost no resources on the Elasticsearch cluster.
One useful application for closing indices is with logs. If you send all of your server logs to Elasticsearch, it can occupy quite a bit of resources, over time, that aren't necessary. You can have a rule where log indices remain open for seven days and are closed after that. This will improve the performance of your cluster, as logs from years ago aren't consuming resources.
If they're even needed, they can be accessed by simply opening the correct index. The way we would do that would be another post operation to the Simpsons index, and this time call the open endpoint, send that. Now if we take a look at all of our indices again, the Simpsons index is back open.