connrs/Searchable-Behaviour-for-CakePHP — pull request #1 by jlis (2013-03-14 10:54:58+00:00)
Title: Added support for search fields, stopwords and a shell to rebuild the index

Hi Paul,

as you see I did some update for the searchable behaviour. I missed some easy option to set the fields which should be indexed so I added, in addition to the indexData method, an option for the actsAs part in the model where you can specify the fields you would like to be index.

Also, I added support for stopwords to improve the search results. Currently I only added german stopwords, but there is a config file and an option to easily add more languages and stopwords.

And as the last part, I added a shell task to rebuild the indices for all/given models. You can read about that in the readme.

One more thing: I had some troubles with the table name for the search index. Cake always did some inflection and transformed search_index to search_indices, even if I added the $useTable = 'search_index' option to the SearchIndex model. Because of that I updated the mysql query in the readme to create a search_indices table instead of search_index.

So far, I hope you approve the changes :)
Greetings from Munich,
Julius