On Feb 27, 2006, at 4:06 AM, Thomas Papke wrote:

Thank you for all your good answers

The restriction i want to search with looks somethinks like this:

I want to do some searching for A in diffenerent Fields and i want to prohibite some user/usergroups specific field values. I am right to do it in this way:
BooleanQuery q1 = new BooleanQuery();
q1.add(new TermQuery(new Term("field", "B"), false, true);
q1.add(new TermQuery(new Term("field", "C"), false, true);
   ...
q2 = new BooleanQuery();
q2.add(new TermQuery(new Term("field", "A"), true, false);
q2.add(q1, false, true);

Or is there an better way to prohibite something? Filters maybe? Anyone a short example how to implement a lucene filter?

The code to Lucene in Action, available for free at http:// www.lucenebook.com, has Filter examples. One such example is a SecurityFilter that prohibits a user from seeing documents that he/ she does not "own" (a contrived example). Wouldn't hurt our feelings if you purchased the book too :))

        Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to