Forum OpenACS Development: Search behavior

Collapse
Posted by Gilbert Wong on
Is the search package (OpenACS 4) supposed to give you different
search results if you are not logged in?  When I'm not logged in,
search will find certain items, but when I am logged in, it will find
all items.  Is this a configuration error on my part or was the
search package designed to do this?  Thanks!
Collapse
Posted by Don Baccus on
It's checking permissions ... have you checked to see that the "missing" items aren't restricted to the "registered users" party?
Collapse
Posted by Gilbert Wong on
Thanks Don.  I set the security_inherit_p flag to "f" (oops!).  Is there an easy way to make an object not searchable?  Do I just revoke read permission on that object or is there an easier way?  Thanks.
Collapse
Posted by Don Baccus on
You should be able to usethe granting and revoking of permissions and this would seem to be the correct way to do it (because it controls visibility in all contexts that honor permissions, which had better be *all* contexts).
Collapse
Posted by Neophytos Demetriou on
Hi Gilbert, sorry for taking me so long to reply. To turn it off set permission_check_enabled_p to 0 (it's an openfts-driver parameter). You will realize a considerable improvement in performance.

The current scheme for checking permissions of the search results is inadequate IMO. I am probably going to make some changes in the next few days in order to have some items marked as public and items marked as private. The items will be marked as public or private w.r.t the result of the datasource operation (to be modified). In that case, we will only need to check permissions for private items (if permissions checking is on -- using the same parameter as above). I'm also planning to add an "indexing_p" field in the datasource operation so that you can have items of a content type that are not being indexed eventhough the content type is. For example, this is going to be useful when you only want to index moderated bboard postings.

I am probably going to change the way the openfts-driver does the permission checks. Here's what I have in mind (probably marking some items as private and others as public.