I am making a little progress here. I realized $actsAs needs to go in the model, not the controller. That took care of the SQL error. I am still not getting any results, clearly because my search_index table is empty.
I assume that Model::save will take care of the index on inserts and updates, is that correct? But how do I retroactively index the data that already exists in my tables? RyOnLife wrote: > > > I am trying a simple search with the searchable behavior from > http://code.google.com/p/searchable-behaviour-for-cakephp/. > > I've created the table and put the search_index.php file in the models > folder and the searchable.php behavior in the behaviors folder. > > I've got $actsAs in my controller: > > var $actsAs = array('Searchable'); > > And my search() method: > > function search() { > $this->set('results', $this->ModelName->search('test')); > } > > When I run this, I am getting an SQL error because Cake is trying to > execute this query: > > search > > Obviously that's not going to get the job done. > > Any tips for me? Or resources to point me at? > > So far I've referred to the Google Code page and also > http://bakery.cakephp.org/articles/view/search-feature-to-cakephp-blog-example/. > > Thanks! > > > > -- View this message in context: http://www.nabble.com/SQL-errors-with-the-searchable-behavior-tp19958018p19959831.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
