Cake\ElasticSearch\Query::_execute PHP Method

_execute() protected method

Executes the query.
protected _execute ( ) : ResultSet
return ResultSet The results of the query
    protected function _execute()
    {
        $connection = $this->_repository->connection();
        $name = $this->_repository->name();
        $type = $connection->getIndex()->getType($name);
        $query = $this->compileQuery();
        return new ResultSet($type->search($query, $this->_searchOptions), $this);
    }