Add Orm_Behaviour_Searchable::init_relations() to delay the creation of relations
Add Orm_Behaviour_Searchable::init_relations() to delay the creation of relations

For example, in bootstrap.php:

\JayPS\Search\Orm_Behaviour_Searchable::init();
\Event::register_function('front.start', function() {
    // add models you want to use in your search and that are used in your template before your search enhancer
    // for exemple: noviusos_page::model/page

    \JayPS\Search\Orm_Behaviour_Searchable::init_relations('noviusos_page::model/page');
});

And then later, juste before using find() on a model:
\JayPS\Search\Orm_Behaviour_Searchable::init_relations(); // for all model
\JayPS\Search\Orm_Behaviour_Searchable::init_relations('noviusos_monkey::model/monkey'); // for a specific model

jay3/jayps_search,novius/jayps_search