I've been creating modules for a little while now and I'd like to try and enhance them by integrating them into the cms search functionality. My questions is, is there documentation on the calls that need to be made to make the contents of my module available to the search system?
I thought the news module would be a good place to start and I've found the SearchReindex function, which seems reasonably understandable. Would that be all I need to add to my modules, is the correct application of that function enough to make all my module content searchable? It appears to me to handle reindexing all existing content, but what about a newly created item?
I can see that there's a function to handle removal of the words from the index:
Code: Select all
//Update search index
$module =& $this->GetModuleInstance('Search');
if ($module != FALSE)
{
$module->DeleteWords($this->GetName(), $articleid, 'article');
}
Are there any docs on this or could anyone suggest a good place to start learning about how to do this?
I'd really appreciate any pointers people can give me.
Thanks,
Mark.