* Inconsistency in quoting probabilistic prefixes?
@ 2023-12-02 14:08 artur.brzozowski
2023-12-03 13:22 ` David Bremner
0 siblings, 1 reply; 5+ messages in thread
From: artur.brzozowski @ 2023-12-02 14:08 UTC (permalink / raw)
To: notmuch@notmuchmail.org
Hey,
Trying to add List matching to my notmuch tagging and I found
something that surprises me. Namely,
1) when I want to match a bunch of alternatives for <from:>
prefix, I have to quote the parenthesis to get the results:
$ notmuch search 'from:"(box@some.io or mail@example.com)"'
<results found>
$ notmuch search 'from:(box@some.io or mail@example.com)'
<no results>
2) when I want to do the same to a parenthesised set of <List:>
alternatives, I must leave it unquoted to get the results.
$ notmuch search 'List:"(freebsd-announce@freebsd.org or misc@openbsd.org)"'
<no results>
$ notmuch search 'List:(freebsd-announce@freebsd.org or misc@openbsd.org)'
<results found>
I use the standard "index.header.List=List-Id" key-value as
pointed out in notmuch-config(1).
Is this expected behaviour? If so, why?
Regards,
Artur
^ permalink raw reply [flat|nested] 5+ messages in thread
* Inconsistency in quoting probabilistic prefixes?
@ 2023-12-02 14:22 artur.brzozowski
2023-12-02 16:49 ` David Bremner
0 siblings, 1 reply; 5+ messages in thread
From: artur.brzozowski @ 2023-12-02 14:22 UTC (permalink / raw)
To: notmuch@notmuchmail.org
Hi!
Trying to add List matching to my notmuch tagging and I found
something that surprises me. Namely,
1) when I want to match a bunch of alternatives for <from:>
prefix, I have to quote the parenthesis to get the results:
$ notmuch search 'from:"(box@some.io or mail@example.com)"'
<results found>
$ notmuch search 'from:(box@some.io or mail@example.com)'
<no results>
2) when I want to do the same to a parenthesised set of <List:>
alternatives, I must leave it unquoted to get the results.
$ notmuch search 'List:"(freebsd-announce@freebsd.org or misc@openbsd.org)"'
<no results>
$ notmuch search 'List:(freebsd-announce@freebsd.org or misc@openbsd.org)'
<results found>
I use the standard "index.header.List=List-Id" key-value as
pointed out in notmuch-config(1).
Is this expected behaviour? If so, why?
Regards,
Artur
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Inconsistency in quoting probabilistic prefixes?
2023-12-02 14:22 Inconsistency in quoting probabilistic prefixes? artur.brzozowski
@ 2023-12-02 16:49 ` David Bremner
2023-12-03 18:55 ` artur.brzozowski
0 siblings, 1 reply; 5+ messages in thread
From: David Bremner @ 2023-12-02 16:49 UTC (permalink / raw)
To: artur.brzozowski, notmuch@notmuchmail.org
"artur.brzozowski" <artur.brzozowski@protonmail.com> writes:
> Hi!
>
> Trying to add List matching to my notmuch tagging and I found
> something that surprises me. Namely,
>
> 1) when I want to match a bunch of alternatives for <from:>
> prefix, I have to quote the parenthesis to get the results:
>
> $ notmuch search 'from:"(box@some.io or mail@example.com)"'
> <results found>
> $ notmuch search 'from:(box@some.io or mail@example.com)'
> <no results>
>
> 2) when I want to do the same to a parenthesised set of <List:>
> alternatives, I must leave it unquoted to get the results.
>
> $ notmuch search 'List:"(freebsd-announce@freebsd.org or misc@openbsd.org)"'
> <no results>
> $ notmuch search 'List:(freebsd-announce@freebsd.org or misc@openbsd.org)'
> <results found>
>
> I use the standard "index.header.List=List-Id" key-value as
> pointed out in notmuch-config(1).
>
> Is this expected behaviour? If so, why?
Unfortunately there are likely to be inconsistencies between those
fields supporting regex queries (like from) and "true" probabilistic
prefixes. I think that these problems are tricky to fix because of the
way notmuch extends the Xapian query parser, namely by reparsing a
"boolean" term.
The sexp query parser should not have these issues.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Inconsistency in quoting probabilistic prefixes?
2023-12-02 14:08 artur.brzozowski
@ 2023-12-03 13:22 ` David Bremner
0 siblings, 0 replies; 5+ messages in thread
From: David Bremner @ 2023-12-03 13:22 UTC (permalink / raw)
To: artur.brzozowski, notmuch@notmuchmail.org
"artur.brzozowski" <artur.brzozowski@protonmail.com> writes:
> Hey,
>
> Trying to add List matching to my notmuch tagging and I found
> something that surprises me. Namely,
This is a duplicate message, my fault, I saw it in the moderation queue,
didn't realize it already went to the list.
d
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Inconsistency in quoting probabilistic prefixes?
2023-12-02 16:49 ` David Bremner
@ 2023-12-03 18:55 ` artur.brzozowski
0 siblings, 0 replies; 5+ messages in thread
From: artur.brzozowski @ 2023-12-03 18:55 UTC (permalink / raw)
To: David Bremner; +Cc: notmuch@notmuchmail.org
On Saturday, December 2nd, 2023 at 4:49 PM, David Bremner <david@tethera.net> wrote:
> Unfortunately there are likely to be inconsistencies between those
> fields supporting regex queries (like from) and "true" probabilistic
> prefixes.
Thanks. Yes, I expected this to be at play.
> The sexp query parser should not have these issues.
Nice! I think I should rather use those because fighting with quotation is the last thing I want to ever do.
Kindly,
Artur
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-12-03 18:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-02 14:22 Inconsistency in quoting probabilistic prefixes? artur.brzozowski
2023-12-02 16:49 ` David Bremner
2023-12-03 18:55 ` artur.brzozowski
-- strict thread matches above, loose matches on Subject: below --
2023-12-02 14:08 artur.brzozowski
2023-12-03 13:22 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).