Mailing List Archive

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: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Rationale for having boolean operators as ALL CAPS [ In reply to ]
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" <carlson@bookandhammer.com>
To: "Lucene Users List" <lucene-user@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:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Rationale for having boolean operators as ALL CAPS [ In reply to ]
>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: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: Rationale for having boolean operators as ALL CAPS [ In reply to ]
Thanks Brian.


On 4/18/02 4:20 PM, "Brian Goetz" <brian@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: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
>
>


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