public function search($criteria, Query $query = null, array $options = [])
    {
        if ($query === null) {
            $query = $this->_table->find();
        }

        return $this->searchEngine()->search($criteria, $query, $options);
    }
public function search($criteria, Query $query = null, array $options = [])
    {
        if ($query === null) {
            $query = $this->_table->find();
        }

        return $this->searchEngine()->search($criteria, $query, $options);
    }
public function search ( $ criteria , Query $ query = null , array $ options = [ ] ) { if ( $ query === null ) { $ query = $ this -> _table -> find ( ) ; } return $ this -> searchEngine ( ) -> search ( $ criteria , $ query , $ options ) ; }
Gets entities matching the given search criteria.

@param mixed $criteria A search-criteria compatible with the Search Engine being used
@param \Cake\ORM\Query|null $query The query to scope, or null to create one
@param array $options Additional parameter used to control the search process provided by attached Engine
@return \Cake\ORM\Query Scoped query
@throws Cake\Error\FatalErrorException When query gets corrupted while processing tokens
Gets entities matching the given search criteria .