lib/Elastica/Type.php
public function deleteByQuery($query, array $options = [])
    {
        $query = Query::create($query);

        $endpoint = new DeleteByQuery();
        $endpoint->setBody($query->toArray());
        $endpoint->setParams($options);

        return $this->requestEndpoint($endpoint);
    }
public function deleteByQuery($query, array $options = [])
    {
        $query = Query::create($query);

        $endpoint = new DeleteByQuery();
        $endpoint->setBody($query->toArray());
        $endpoint->setParams($options);

        return $this->requestEndpoint($endpoint);
    }
public function deleteByQuery ( $ query , array $ options = [ ] ) { $ query = Query :: create ( $ query ) ; $ endpoint = new DeleteByQuery ( ) ; $ endpoint -> setBody ( $ query -> toArray ( ) ) ; $ endpoint -> setParams ( $ options ) ; return $ this -> requestEndpoint ( $ endpoint ) ; }
Deletes entries in the db based on a query.

@param \Elastica\Query|\Elastica\Query\AbstractQuery|string|array $query   Query object
@param array                                                      $options Optional params

@return \Elastica\Response

@see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
Deletes entries in the db based on a query .