stanislav-web / Searcher

Database searcher for Phalcon Framework. This is the search service is designed to search multiple SQL tables. Convenient to use autocomplete, search documents, search the whole site.
http://reds.com
MIT License
25 stars 7 forks source link

Founded bugs #13

Open stanislav-web opened 9 years ago

stanislav-web commented 9 years ago

Please report here

giovani-sirbu commented 7 years ago

Hello, I don't know why, but I'm receiving this error: "Phalcon\Mvc\Model\Exception: A dependency injector container is required to obtain the services related to the ORM".

Example:

    $searcher = new Searcher();

    // Prepare models and fields to participate in search
    $searcher->setFields([
        'Site\Models\Projects'    =>    [
            'title'
        ],
        'Site\Models\Skills'    =>    [
            'name'
        ]
    ])
    ->setQuery('test');

    $result = $searcher->run('json'); // available array, serialize, json, Resultset as default

    // OR

    /**
     * @param $result 
     */
    $result = $searcher->run('array', function($result) {

        //... any modifiers 
        return $result;

    }); // available, array, serialize, json, Resultset as default