Subject: Re: [sup-talk] Bug with searching for multiple labels at once

From: Mark Alexander <[email-masked]>
Date: Thu, 10 Jun 2010 07:53:08 -0400

Excerpts from Gregor Hoffleit's message of Thu Jun 10 06:39:54 -0400 2010:
> I have a strange problem with search strings including multiple labels.
> I was at the impression that the search
> 
>     label:somelabel label:anotherlabel

I ran into this confusing behavior a while back when I upgraded from a
ferret index to a Xapian index.  It appears that the query language
now requires you to use an explicit AND operator between search terms.
Without that, the implied operator appears to be an OR.
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Gregor Hoffleit <[email-masked]>
Date: Thu, 10 Jun 2010 12:39:54 +0200

should find mail with both labels attached (i.e. an AND search for both
labels).

But it doesn't work that way for me (I'm using Sup next from Git). It
returns way more hits than expected.

"label:LABELDOESNTEXIST label:list" returns all mails with the label
"list" attached, although it should find nothing.

In contrast, "label:LABELDOESNTEXIST from:me" returns zero mails, as
expected, just as e.g. "label:LABELDOESNTEXIST before:yesterday".

"label:LABELDOESNTEXIST is:unread" on the other hand, gives unexpected
hits as well (I guess 'is:unread' is converted into a label search?)

Regards,
    Gregor Hoffleit

---

From: Rich Lane <[email-masked]>
Date: Thu, 10 Jun 2010 11:01:09 -0400

Unless you use an explicit AND, boolean terms of the same field will be OR'd.

http://trac.xapian.org/ticket/402
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Gregor Hoffleit <[email-masked]>
Date: Thu, 10 Jun 2010 15:05:07 +0200

Indeed, I just noticed that the NewUserGuide.txt is much more up-to-date
than the Wiki (http://sup.rubyforge.org/wiki/wiki.pl?SearchingMail).

As a start, I copied the information from the NewUserGuide to that Wiki
page. Still, somebody who knows better should update that page.
Furthermore, I marked the information in "Testing Xapian" as obsolete in
the Wiki.

Still, it is not clear to me what happens without explicit AND or OR
operator.

"label:somelabel label:anotherlabel" seems to be equivalent to
"label:somelabel OR label:anotherlabel".

"label:ruby-talk subject:\[ANN\]" seem to be equivalent to
"label:ruby-talk AND subject:\[ANN\]".

The Xapian QueryParser documentation (http://xapian.org/docs/queryparser.html)
is not clear about this either.

Regards,
    Gregor Hoffleit
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel