Checking if an index exists

A common pitfall error is to query for indices that don't exist. To prevent this issue, Elasticsearch gives the user the ability to check for an index's existence.

This check is often used during an application startup to create indices that are required for correct working.