Forum OpenACS Q&A: Restriction of Open FTS search

Collapse
Posted by Thomas Senn on
Hello everybody,

I need to be able to restrict the FTS search to some datatype and/or package instances. I already read the thread dated october 2001 about this issue in the OpenACS forum, but as I am quite new to FTS, I couldn't get much of it.

So I tried the easiest way : filter the result at the very end of the openfts_driver__search procedure, at the place where the returned array is constructed. Using the object_id to retrieve the object_type to rule out the unwanted results. But of course I needed to add an argument to this procedure, to tell it wether to filter or not the results. And then, problems began : first error saying that I was "calling ... FTSEngineDriver search with too many arguments". I searched for a while and thought everything would be alright to update the field operation_nargs corresponding to the modified proc in the table acs_sc_operations. But no, now when I restart the server, the whole openfts-driver-procs.tcl file is ignored and its procs are unvisible in the API.

So my questions are :
1. How can I add a parameter to openfts_driver__search?
2. Is there (I'm pretty sure there is) a more formal and clever way to restrict search using package instance id's for instance.

Thanks for answering