It's trivial if you construct your query tree manually, which you'll probably have to do for your security purposes (as opposed to using one of the existing query parsers)...the first argument to TermQuery's constructor is which field to search.
On 11/4/07, Hongli Lai <[EMAIL PROTECTED]> wrote: > I'm currently writing a system that stores user-created documents. Each > user belongs to a specific group, and the system supports multiple > groups. The thing is, my users want to be able to hide pieces of a > document from other groups. So for example, lets say Joe of team A has > written this document: > "Hello all, our secret plan is finally complete! <private>We will > begin our mission of world domination at 12:00 PM tomorrow.</private>" > > If Jane of team B views this document, she'll only see the text: > "Hello all, our secret plan is finally complete!" > Only other people in team A will be able to see the original message. > > So each document essentially has two versions of contents: one without > private information, and one with private information. > > My users were very specific about this feature and want it no matter > what. But this poses a problem for searching. Is it possible to tell > Ferret the following? > - Search all documents with the given search terms, but: > * Search in the field content_without_private_information if the > document does not belong to team A. > * Search in the field content_with_private_information if the > document belongs to team A. > > I've taken a quick look at the tutorial, and I've purchased the Ferret > book by O'Reilly. But so far I can't seem to find anything that makes > this possible. Is it possible at all? Or are there other possible > alternatives? > _______________________________________________ > Ferret-talk mailing list > [email protected] > http://rubyforge.org/mailman/listinfo/ferret-talk > _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

