Forum OpenACS Q&A: Response to OpenFTS search and Edit-This-Page

Collapse
Posted by Dave Bauer on
These are two seperate issues.
It looks like you are using a default service-contract for the content repository. You will need to write a search service-contract implementation for your ETP content-type.

When you define this contract, you specify a tcl proc to deliver the text of the content to be indexed, and another tcl proc to deliver the url of the item.

The second issue is the indexing of all revisions in the CR. I have tested two different approaches to solving this. The first, alters the search triggers to only index live_revisions. This would not require any changes to the applications.

The second adds a new field, searchable_p to the cr_revisions table and modified the search triggers for the CR to check for searchable_p = TRUE before adding or removing items from the index. To use this method, you would need to modify ETP to update the searchable_p flag.
I have submitted a patch for this second method here: https://openacs.org/sdm/one-patch.tcl?patch_id=289

The indexing of all content_revisions obviously affects all the packages that use the content repository.