I want to add a search function on Discussion/Topics. From forumModel.xml the fm:toopic type is a child type of cm:folder. The out-of-the-box implementation saves topic title to fm:topic type and saves topic content to fmost type. Here comes my question: How to find topics by searching on topic contents?
I tried to build new lucene query by following out-of-the-box findTopicByTags function, but I don't know how to build lucene query on fm:topic–fmost parent-child association. My Alfresco version is community 4.0.c. Any tips will be appreciated.
I solved this with a walk around. By adding a custom field postText with type d:text, I can update OOTB createTopic/updateTopic method to set the value. I built a new lucene query to search on fmostText field. Everything goes well.