title: Elastic search to find index existis or not using Java api
body: <p>Before am indexing the documents i want to check whether my index name is already existis in the ElasticSearcch or not.</p>
  
  <p>Please find the below piece of code which am using <code>RestLowLevelClient</code> to find my index existis.</p>
  
  <pre><code>public boolean checkIfIndexExists(String indexName) throws IOException {
          Response response = client.getLowLevelClient().performRequest("HEAD", "/" + indexName);
          int statusCode = response.getStatusLine().getStatusCode(); 
          return (statusCode != 404);
      }
  </code></pre>
  
  <p>But i want to using <code>RestHighLevelClient</code> and how i can modify the same code.</p>