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 Peter Carlson <ca...@bookandhammer.com> on 2002/04/04 00:05:33 UTC

Rationale for having boolean operators as ALL CAPS

Hi,

Can someone tell me the rationale for having the boolean operator only work
if they are all caps?

Thanks

--Peter


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Rationale for having boolean operators as ALL CAPS

Posted by Brandon Jockman <br...@isogen.com>.
Hey Peter,

One possible rational is:

Most any english document will contain lowercase 'and's and 'or's it its
text content. Granted they may be poor choices for search query strings and
may be frequently filtered out at index-time, however they shouldn't
necessarily be forcefully denied as search text content. Uppercase 'AND' and
'OR' are much less likely to occur and are therefore much better candidates
for boolean operators.

(Sorry for the delayed response...perhaps better late than never...)

-Brandon Jockman

ISOGEN International, LLC
brandonj@isogen.com



----- Original Message -----
From: "Peter Carlson" <ca...@bookandhammer.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Wednesday, April 03, 2002 5:05 PM
Subject: Rationale for having boolean operators as ALL CAPS


> Hi,
>
> Can someone tell me the rationale for having the boolean operator only
work
> if they are all caps?
>
> Thanks
>
> --Peter
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Rationale for having boolean operators as ALL CAPS

Posted by Peter Carlson <ca...@bookandhammer.com>.
Thanks Brian.


On 4/18/02 4:20 PM, "Brian Goetz" <br...@quiotix.com> wrote:

> 
>> Can someone tell me the rationale for having the boolean operator only work
>> if they are all caps?
> 
> I can, since I was the one who made this decision.
> 
> Most queries are entered in lower or mixed case.  Treating 'and' as a
> boolean operator has two deleterious effects:
> - it removes 'and' from the spaces of tokens that can be part of a search
> string, and even though most users will probably include 'and' in their
> stop-list filter, not all will;
> - An overriding goal of the query parser syntax design was to not
> introduce features that are likely to catch unsophisticated users.  Using
> lower case 'and' and 'or' as search modifiers could confuse users who are
> not aware that one can specify anything but a series of words.  The other
> syntax (&&, [], ~) were deliberately chosen to be unlikely to occur in
> typical query texts.
> 
> In my mind, the only alternative was not supporting AND at all and forcing
> users to use the symbols.  So instead of thinking about it as "'and'
> doesn't work", think about it as "Isn't it nice that 'AND' is a convenient
> synonym for '&&'".
> 
> 
> 
> --
> Brian Goetz
> Quiotix Corporation
> brian@quiotix.com           Tel: 650-843-1300            Fax: 650-324-8032
> 
> http://www.quiotix.com
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Rationale for having boolean operators as ALL CAPS

Posted by Brian Goetz <br...@quiotix.com>.
>Can someone tell me the rationale for having the boolean operator only work
>if they are all caps?

I can, since I was the one who made this decision.

Most queries are entered in lower or mixed case.  Treating 'and' as a 
boolean operator has two deleterious effects:
  - it removes 'and' from the spaces of tokens that can be part of a search 
string, and even though most users will probably include 'and' in their 
stop-list filter, not all will;
  - An overriding goal of the query parser syntax design was to not 
introduce features that are likely to catch unsophisticated users.  Using 
lower case 'and' and 'or' as search modifiers could confuse users who are 
not aware that one can specify anything but a series of words.  The other 
syntax (&&, [], ~) were deliberately chosen to be unlikely to occur in 
typical query texts.

In my mind, the only alternative was not supporting AND at all and forcing 
users to use the symbols.  So instead of thinking about it as "'and' 
doesn't work", think about it as "Isn't it nice that 'AND' is a convenient 
synonym for '&&'".



--
Brian Goetz
Quiotix Corporation
brian@quiotix.com           Tel: 650-843-1300            Fax: 650-324-8032

http://www.quiotix.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>