eZ\Publish\Core\Search\Elasticsearch\Content\Gateway\Native::deleteByQuery PHP Method

deleteByQuery() public method

Deletes a document(s) of the given $type by given $query string.
public deleteByQuery ( string $query, string $type )
$query string
$type string
    public function deleteByQuery($query, $type)
    {
        $result = $this->client->request('DELETE', "/{$this->indexName}/{$type}/_query", new Message(array('Content-Type' => 'application/json'), $query));
        $this->flush();
    }