Command.php
public function createIndex($index, $configuration = null)
    {
        $body = $configuration !== null ? Json::encode($configuration) : null;

        return $this->db->put([$index], [], $body);
    }
public function createIndex($index, $configuration = null)
    {
        $body = $configuration !== null ? Json::encode($configuration) : null;

        return $this->db->put([$index], [], $body);
    }
public function createIndex ( $ index , $ configuration = null ) { $ body = $ configuration !== null ? Json :: encode ( $ configuration ) : null ; return $ this -> db -> put ( [ $ index ] , [ ] , $ body ) ; }
creates an index
@param $index
@param array $configuration
@return mixed
@see http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html
creates an index