You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Karl Koch <Th...@gmx.net> on 2004/01/16 13:12:51 UTC

BooleanQuery question

Hi all,

why does the boolean query have a "required" and a "prohited" field (boolean
value)? If something is required it cannot be forbidden and otherwise? How
does this match with the Boolean model we know from theory?

Are there differences between Lucene and the Boolean model in theory?

Kind Regards,
Karl

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: BooleanQuery question

Posted by Scott ganyo <sc...@ganyo.com>.
No, you don't need required or prohibited, but you can't have both.  
Here is a rundown:

* A required clause will allow a document to be selected if and only if 
it contains that clause and will exclude any documents that don't.

* A prohibited clause will exclude any documents that contain that 
clause.

* A clause that is neither prohibited nor required will select a 
document if it contains the clause, but the clause will not prevent 
non-matching documents from being selected by other clauses.

Hopefully that helps,

Scott

On Jan 16, 2004, at 7:32 AM, Thomas Scheffler wrote:

>
> Karl Koch sagte:
>> Hi all,
>>
>> why does the boolean query have a "required" and a "prohited" field
>> (boolean
>> value)? If something is required it cannot be forbidden and 
>> otherwise? How
>> does this match with the Boolean model we know from theory?
>
> What if required and prohibited are both off? That's somthing we need.
>
>>
>> Are there differences between Lucene and the Boolean model in theory?
>
> To save three conditions you have to take at least 2 bits. That's for 
> the
> theory.
>
>
> Kind regards
>
> Thomas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>

Re: BooleanQuery question

Posted by Thomas Scheffler <th...@uni-jena.de>.
Karl Koch sagte:
> Hi all,
>
> why does the boolean query have a "required" and a "prohited" field
> (boolean
> value)? If something is required it cannot be forbidden and otherwise? How
> does this match with the Boolean model we know from theory?

What if required and prohibited are both off? That's somthing we need.

>
> Are there differences between Lucene and the Boolean model in theory?

To save three conditions you have to take at least 2 bits. That's for the
theory.


Kind regards

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org