public function testDeleteByQuery()
{
$options = array('refresh' => true);
$client = \ElasticSearch\Client::connection();
$word = $this->getTag();
$resp = $client->index(array('title' => $word), 1, $options);
$client->refresh();
$del = $client->deleteByQuery(array('query' => array('term' => array('title' => $word))));
$hits = $client->search(array('query' => array('term' => array('title' => $word))));
$this->assert->array($hits)->hasKey('hits')->array($hits['hits'])->hasKey('total')->integer($hits['hits']['total'])->isEqualTo(0);
}