Search In All Models (Db) ?!


I searched google and Yii site, but could not find an answer for my question … how to search the whole site for content … the site has multiple models (article, news, ads, special file, reports) how to search in all of this models ??


Create an aggregate table view from all your tables and then do the search against the table view.

If its a big site I strong suggest you to look into one of the full text search solutions, I personally use Elasticsearch

There is over 100K record (different content type) aggregating it in one table will slow down the search, unless it based on indexing.


do you tutorial for that ?

@marvix do a google lookup or go to the website the docs is pretty good and they have awesome screencasts