So Object::add_extension('HomePage',"FulltextSearchable('HomeCol1,HomeCol2')"); isn't adding the indexes? You should still be able to add the decorator manually. Fulltextsearchable::enable() is restricted to SiteTree and file but I don't think that limits the use of the extension on other records.
No, no indexes, that’s why I’m asking here: it seems that there is an error somewhere on the FullTextSearchable code… but I have not been able to debug it. I really need to extend the Search to custom fields for a current project, I don’t know what else to do, bu well I’ll keep trying!
I used the solution posted by Aram. Get the ZIP file, install the module custom_search and use the example provided in a folder sibling folder to understand how does it work. Don’t forget to provide your DataObjects with Link, Title and canView functions, or you’ll see nothing in the search results.
A side note: This didn’t worked for me with a has_many object, I couldn’t get Links and Titles for it in the search results, so I had to change it to a many_many. I don’t know if there is a problem with the code or, more probably, if I overlooked something in my code. I’m not a good programmer.
Ill try custom_search. But ive read on another posts that one could possibly have SS search thru customs textfields by populating $Metatags and $Description with its content. As those later two are looked over by the standard search engine, it supposely works.
Back to my AS3 days, it would like this.
var $Metatags.text = $Nom.text + $Prenom.text + $Entreprise.text