- Elasticsearch 7.0 Cookbook(Fourth Edition)
- Alberto Paro
- 83字
- 2021-06-24 14:52:25
How it works...
This is a typical HEAD REST call to check for something's existence. It doesn't return a body response, only the status code, which is the result status of the operation.
The most common status codes are:
- 20X family, if everything is okay
- 404, if the resource is not available
- 50X family, if there are server errors
Before every action involved in indexing, generally on an application's startup, it's good practice to check if an index exists to prevent future failures.