title: Unable to create index in Elasticsearch
body: <p>I am new to Elasticsearch so I know I'm forgetting something but I don't know what.</p>
  
  <p>I ran this code:</p>
  
  <pre class="lang-php prettyprint-override"><code>error_reporting(E_ALL);
  ini_set('display_errors', 1);
  
  require 'vendor/autoload.php';
  
  use Elasticsearch\ClientBuilder;
  
  $client = ClientBuilder::create()-&gt;build();
  $params = [
    'index' =&gt; 'my_index'
  ];
  
  // Create the index
  $response = $client-&gt;indices()-&gt;create($params);
  </code></pre>
  
  <p>But got this error:</p>
  
  <pre><code>{
    "error": {
      "root_cause": [
        {
          "type":"index_not_found_exception",
          "reason":"no such index",
          "resource.type":"index_or_alias",
          "resource.id":"elasticsearch-i.php",
          "index_uuid":"_na_",
          "index":"elasticsearch-i.php"
        }
      ],
      "type":"index_not_found_exception",
      "reason":"no such index",
      "resource.type":"index_or_alias",
      "resource.id":"elasticsearch-i.php",
      "index_uuid":"_na_",
      "index":"elasticsearch-i.php"
    },
    "status":404
  }
  </code></pre>