confuse of required and prohibited in BooleanQuery

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

confuse of required and prohibited in BooleanQuery

David-317
Hi all:
    I'm confused by the two argument "required" and "prohibited" in
BooleanQuery function
         public void add(Query query, boolean required, boolean prohibited)
   There are two statement in "Lucene in Action"
   1. Performing an OR query only requires setting the required and
prohibited flags both to false
   2.There are four logical combinations of these flags, but the case where
both are true is an illogical and invalid combination
   but I don't know why, Can anybody explain it to me?

Appreciate your help!
--
David
Reply | Threaded
Open this post in threaded view
|

Re: confuse of required and prohibited in BooleanQuery

Daniel Naber-5
On Wednesday 17 January 2007 11:30, David wrote:

>    2.There are four logical combinations of these flags, but the case
> where both are true is an illogical and invalid combination
>    but I don't know why, Can anybody explain it to me?

You're right. Because of this the API was changed in Lucene 2.0 so only
settings that make sense are possible now.

Regards
 Daniel

--
http://www.danielnaber.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]