public function purgeIndex($type)
{
$result = $this->client->request('DELETE', "/{$this->indexName}/{$type}/_query?q=id:*");
$this->flush();
if ($result->headers['status'] !== 200) {
//throw new RuntimeException(
// "Wrong HTTP status received from Elasticsearch: " . $result->headers["status"]
//);
}
}