protected function createInClient($index)
    {
        $param = $this->load($index);

        if (!$param) {
            throw new \InvalidArgumentException(sprintf("'%s' index definition does not exist", $index));
        }

        $namespace      = $this->client->indices();
        $indexRealname  = $this->getIndexRealname($index);

        if (!$namespace->exists(['index' => $indexRealname])) {
            $namespace->create([
                'index' => $indexRealname,
                'body'  => $param,
            ]);
        }
    }