Cake\ElasticSearch\Type::deleteAll PHP Method

deleteAll() public method

Deletes all records matching the provided conditions. This method will *not* trigger beforeDelete/afterDelete events. If you need those first load a collection of records and delete them.
See also: RepositoryInterface::delete()
public deleteAll ( array $conditions ) : boolean
$conditions array An array of conditions, similar to those used with find()
return boolean Success Returns true if one or more rows are effected.
    public function deleteAll($conditions)
    {
        $query = $this->query();
        $query->where($conditions);
        $type = $this->connection()->getIndex()->getType($this->name());
        $response = $type->deleteByQuery($query->compileQuery());
        return $response->isOk();
    }