In this example, we create an empty index (we index no documents in it) by defining its mapping.
First, we create an ElasticSearch instance and we then define the mapping of our choice. Next, we check if the index exists and if not, we create it by specifying the index and body parameters that cont...