title: Check if the index exists or not Elasticsearch
body: <p>I want to check in elasticsearch if the index exists or not. If it not exists it should create the index and do other functionality. I try to find out a solution for that, but did not find any perfect solution for that. Can anyone have any solution to solve this problem.</p>
  
  <p>I am using Elasticsearch library. </p>
  
  <pre><code>**$client = new Elasticsearch\Client();**
  </code></pre>