Subject: Re: [sup-talk] searches

From: Mark Alexander <[email-masked]>
Date: Thu, 05 Aug 2010 10:35:19 -0400

Excerpts from Brian May's message of Wed Aug 04 22:14:14 -0400 2010:
> How do I perform and AND operation?

You use the AND operator :-) .  Apparently it's a known bug that
Xapian doesn't do AND as the implied operator when there is none
specified.  So I do things like this:

  is:unread AND is:inbox AND label:widgets
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Marc Hartstein <[email-masked]>
Date: Mon, 09 Aug 2010 16:19:02 -0400

Excerpts from Brian May's message of Mon Aug 09 01:59:16 -0400 2010:
> How do I search for all messages not containing a label? I tried:

Looking at http://xapian.org/docs/queryparser.html, it looks like "pure
not" is disabled, at least in my sup installation. It also seems like
booleans *must* be in ALLCAPS to be recognized.

Thus:

NOT label:mylabel   - gives a syntax error
not label:mylabel   - is 'not OR label:mylabel' [searching for the word
                        "not" or for the label]

I'm getting some results from a search on 'label: NOT label:mylabel',
though I'm not sure if the results I'm getting are correct for what
you're looking for.
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Brian May <[email-masked]>
Date: Thu, 5 Aug 2010 12:14:14 +1000

Hello,

Where is the best documentation on performing searches?

I have noticed some quirks:

\label:VLSCI

finds nothing, even though lots of emails are labeled VLSCI.

\label:vlsci

finds all these emails.

\label:vlsci \label:unread

finds all vlsci OR unread emails - I would have assumed that should be AND?

Thanks
-- 
Brian May <[email-masked]>
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Gregor Hoffleit <[email-masked]>
Date: Thu, 05 Aug 2010 16:25:08 +0200

* John Bent <[email-masked]> [Do Aug 05 15:49:38 +0200 2010]
> Excerpts from Brian May's message of Wed Aug 04 20:14:14 -0600 2010:

I fell into these traps as well (there was a thread in this list two
months ago, search for this message: [email-masked]).

I started to rewrite the page SearchingMail in the Wiki:
http://sup.rubyforge.org/wiki/wiki.pl?SearchingMail

The information on that page should be correct, but certainly is not
complete. Neither is it easy to grok.

As a start, the basic query language is described in
http://xapian.org/docs/queryparser.html.

Some stumbling points about searching in Sup:

- By default, query terms are combined with AND
- Exception: Query terms within the same field type are combined as OR

I.e. a search for "label:ruby-talk subject:\[ANN\]" (without the
quotes!) is equivalent to "label:ruby-talk AND subject:\[ANN\]".

In contrast, the search "subject:apples subject:oranges" is equivalent
to "subject:apples OR subject:oranges"!

> The above looks like you are doing them one at a time.  If you do this:
> 
> \label:vlsci label:unread
> 
> that should do what you want.

Wrong. As these are two queries in the same field type, they are ORed.

The get the result you're expecting, you must search for
"label:vlsci AND label:unread" (without the quotes).

> Also, on the search results view, hitting '|' let you refine the search
> so:
> \label:vlsci | label:unread
> 
> should also do what you want.

Again, this is wrong. Refining a search will just let you append or 
edit the current query. I.e. after hitting '|' you should append
"AND label:unread" to the query string.

I would really welcome if somebody with a little more insight than me
could take the time to update the documentation about searching in Sup.

    Gregor Hoffleit

---

From: Brian May <[email-masked]>
Date: Mon, 9 Aug 2010 15:59:16 +1000

> to "subject:apples OR subject:oranges"!

Ok, thanks for the information.

not label:mylabel
! label:mylabel
~label:mylabel
-label:mylabel

The first finds no results. The rest are the same as "label:mylabel".

What am I doing wrong here?

What do the above searchs really do?
-- 
Brian May <[email-masked]>
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: John Bent <[email-masked]>
Date: Thu, 05 Aug 2010 07:49:38 -0600

Thanks,

John