-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Elasticsearch 5.x Cookbook
By :

A common pitfall error is to query for indices and types that don't exist. To prevent this issue, Elasticsearch gives the user the ability to check the index and type existence.
This check is often used during an application startup to create indices and types that are required for correct working.
You need an up-and-running Elasticsearch installation, as used in the Downloading and installing Elasticsearch recipe in Chapter 2, Downloading and Setup.
To execute curl
via the command line, you need to install curl
for your operative system.
To correctly execute the following commands, use the index created in the Creating an index recipe.
The HTTP method to check existence is HEAD
. The URL format for checking an index is:
http://<server>/<index_name>/
The URL format for checking a type is:
http://<server>/<index_name>/<type>/
To check if an index exists, we will perform the steps given as follows:
If we consider...
Change the font size
Change margin width
Change background colour