Renaud Bussières <contact@renaudbussieres.com> writes: > While writing this email, I did some more testing, and I found that I > get the expected results if I do 'notmuch search to:@domain.com', > without a '*'. Then, my question is: how would you explain the results > of 'to:*@domain.com'? Unfortunately the default behaviour of the Xapian query parser is a bit surprising here. It doesn't know how to parse 'to:*@domain.com', so it trys again as 'to domain com'. This means 'to' stops being a prefix. In this case the sexp query parser is probably better % notmuch count --exclude=false --query=sexp '(to *@tethera.net)' yields the same answer as % notmuch count --exclude=false --query=sexp '(to tethera net)' For more information see % man notmuch-sexp-queries or https://notmuchmail.org/doc/latest/man7/notmuch-sexp-queries.html _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-leave@notmuchmail.org