public function deleteByQuery($query, $type) { $result = $this->client->request('DELETE', "/{$this->indexName}/{$type}/_query", new Message(array('Content-Type' => 'application/json'), $query)); $this->flush(); }