Forum OpenACS Development: Restricting search...

Collapse
Posted by Robert Locke on
I would like to restrict search to a package instance/data type.
What would be the easiest way?

For example, I would like the news module to include a search box
which only searched through news items of that particular mounted news
package.  Another use might be to accompany a site-wide search box
with a drop-down menu which allowed you to restrict the search to a
particular package.

Thanks!

Collapse
Posted by Don Baccus on
Oracle or Postgres?  I ask because the Oracle tarball still uses the old site-wide search package.

But I know you're working on the PG port ... the idea with the new search package is to subtype content revisions then provide a contract implementation to make that visible to the search package.  The subtyping allows searching to be restricted to items of that subtype, then.

This isn't entirely sufficient, though, because as you're pointing out this allows one to restrict searching to news items from *all* mounted instances of the package.  Neophytos and I have spoken of the need to incorporate package-id information as well so the search can be further narrowed but AFAIK he's not had time to do this, yet.

I don't know myself if the old sws package's news-sws is "package instance aware" or not ...

Collapse
Posted by Neophytos Demetriou on
AFAIK he's not had time to do this, yet.
Right. This is the first thing on my todo list for the second release.