Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"or" operator (|) works for mail quick search

0 views
Skip to first unread message

Seth Spitzer

unread,
Nov 8, 2002, 4:51:31 AM11/8/02
to
as of tomorrow's builds, the "or" operator (|) works for mail quick
search.

So you can now do "foo|bar|cheese" and you'd get all messages with foo,
bar, or cheese in the sender or subject.

Before you'd only get messages addressed to "foo|bar|cheese" or with a
subject containing "foo|bar|cheese"

Note, if you really want a subject with "foo|bar|cheese", you'll still
get it, but you'll more false positives along with it.

See http://bugzilla.mozilla.org/show_bug.cgi?id=177034 for details.

For those who want a screen shot:
http://bugzilla.mozilla.org/attachment.cgi?id=105554&action=view

Note, | support will come to address book QS eventually, too.

-Seth

Seth Spitzer

unread,
Nov 8, 2002, 12:38:52 PM11/8/02
to
Thanks to work that mscott did for mailviews, we could also support the
& operator, which would be very useful.

I've updated the bug to include that.

I'm not sure if we could easily do that for AB QS, though.

-Seth

Gordon Airport

unread,
Nov 8, 2002, 9:02:23 PM11/8/02
to
Why stop there? What about not, "!"?
..."^" might be excessive though.

Seth Spitzer

unread,
Nov 9, 2002, 1:33:58 AM11/9/02
to Gordon Airport
Gordon Airport wrote:
> Why stop there? What about not, "!"?
> ..."^" might be excessive though.

It's doable, since we can just make the term op nsMsgSearchOp.DoesntContain

feel free to log a RFE bug on me about this, but my current plan is to
implement & and the move on to other bugs.

-Seth

Seth Spitzer

unread,
Nov 9, 2002, 1:31:22 AM11/9/02
to
Seth Spitzer wrote:

> Thanks to work that mscott did for mailviews, we could also support the
> & operator, which would be very useful.

Hmm, this might not be as easy as I thought.

How does this sound?

"or" is easy, because we've already got an "or" search.

If you QS on foo, you are doing:

(subject contains foo) or (sender contains foo)

The "|" operator is easy. If you QS on foo|bar, you are doing:

(subject contains foo) or (sender contains foo)
or
(subject contains bar) or (sender contains bar)

But what does foo&bar mean?

I think this would make sense:

(subject contains foo) and (sender contains bar)
or
(subject contains bar) and (sender contains foo)
or
(subject contains "foo&bar") and (sender contains "foo&bar")

The third line there gets around the "Tom & Jerry" problem.

If you QS on "Tom & Jerry", you don't mean mail from Tom about Jerry,
or mail from Jerry about Tom, you probably mean mail about "Tom & Jerry"

Bugzilla is down, when it's back up I'll add this to the bug.
http://bugzilla.mozilla.org/show_bug.cgi?id=177034

-Seth

Mike Lee

unread,
Nov 9, 2002, 7:28:01 AM11/9/02
to
Seth Spitzer wrote:
> Seth Spitzer wrote:

[snip]

> But what does foo&bar mean?
>
> I think this would make sense:
>
> (subject contains foo) and (sender contains bar)
> or
> (subject contains bar) and (sender contains foo)
> or
> (subject contains "foo&bar") and (sender contains "foo&bar")
>
> The third line there gets around the "Tom & Jerry" problem.
>
> If you QS on "Tom & Jerry", you don't mean mail from Tom about Jerry,
> or mail from Jerry about Tom, you probably mean mail about "Tom & Jerry"
>
> Bugzilla is down, when it's back up I'll add this to the bug.
> http://bugzilla.mozilla.org/show_bug.cgi?id=177034
>
> -Seth

Shouldn't


(subject contains "foo&bar") and (sender contains "foo&bar")

be
(subject contains "foo&bar") or (sender contains "foo&bar") then?

It'll be pretty hard to have both the sender and subject to contain the
same thing.

Regards

--
Mike Lee
Website: http://www.exitspace.net/mike

David Fraser

unread,
Nov 9, 2002, 8:29:32 AM11/9/02
to

Hmmm ... what about foo&bar translating to

((subject contains foo) or (sender contains foo))
and ((subject contains bar) or (sender contains bar))

and seems more logical to me. If I want something mentioning two
words both in the subject, this would then find it, whereas your
example above wouldn't.

I don't think people really searching for "Tom & Jerry" would mind
bringing up something like a "Tom and also Jerry" subject

Maybe there could be a rule that says if the search is quoted, no
binary operators are applied...
so foo&bar would do the above, but "foo&bar" would do


(subject contains "foo&bar") or (sender contains "foo&bar")

David

Seth Spitzer

unread,
Nov 9, 2002, 12:44:19 PM11/9/02
to Mike Lee
Mike,

I wrote:

>> (subject contains foo) and (sender contains bar)
>> or
>> (subject contains bar) and (sender contains foo)
>> or
>> (subject contains "foo&bar") and (sender contains "foo&bar")
>>
>> The third line there gets around the "Tom & Jerry" problem.

You wrote:

> Shouldn't
> (subject contains "foo&bar") and (sender contains "foo&bar")
> be
> (subject contains "foo&bar") or (sender contains "foo&bar") then?

You are correct. Good catch.

I'll add this to bug #177034

-Seth

Davamundo

unread,
Nov 10, 2002, 1:58:06 PM11/10/02
to
David Fraser wrote:

yeah, it would be logical, for me, to enclose the search in quotes ("Tom
& Jerry") to bypass the boolean !

Davamundo

Garth Wallace

unread,
Nov 10, 2002, 5:19:58 PM11/10/02
to
0 new messages