unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Apparently, terms with a common prefix are *not* connected by implicit "OR"
@ 2019-08-11 17:20 Jorge P. de Morais Neto
  2019-08-11 23:08 ` David Bremner
  0 siblings, 1 reply; 10+ messages in thread
From: Jorge P. de Morais Neto @ 2019-08-11 17:20 UTC (permalink / raw)
  To: notmuch

Hi.  The NOTMUCH-SEARCH-TERMS man page says:

    Each term in the query will be implicitly connected by a logical AND
    if no explicit operator is provided (except that terms with a common
    prefix will be implicitly combined with OR).

However, in practice I get different results:
    $ notmuch count '(to:pontodosconcursos.com.br OR to:jorge+cp+concurso@disroot.org)'
    66
    $ notmuch count '(to:pontodosconcursos.com.br to:jorge+cp+concurso@disroot.org)'
    0

I have other examples of this.  I currently use notmuch 0.29.1 privately
backported to Debian buster according to the Debian Wiki [procedure][],
but I already got this problem in earlier notmuch releases, including
the official Debian buster package.  What gives?

[procedure]: https://wiki.debian.org/SimpleBackportCreation

My workarund is to always explicit the "OR" operator, as in:
    (to:concurso OR to:dominandoti OR to:cebraspe OR to:gleyson131 OR to:quadrix.org.br OR to:cathedranet.com.br OR from:cathedranet.com.br OR from:quadrix.org.br OR from:gleyson131 OR from:cebraspe OR from:dominandoti OR from:concurso OR is:lists/itaconcursos)

If the OR operator was indeed implicit, the query above would be
shorter.

Regards
-- 
- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free/libre software for Android: https://f-droid.org/
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-08-25  9:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-11 17:20 Apparently, terms with a common prefix are *not* connected by implicit "OR" Jorge P. de Morais Neto
2019-08-11 23:08 ` David Bremner
2019-08-15 14:58   ` Jorge P. de Morais Neto
2019-08-21  1:39     ` David Bremner
2019-08-21  5:48       ` Rollins, Jameson
2019-08-21 11:41         ` WIP: fix implicit operators David Bremner
2019-08-21 11:41           ` [PATCH 1/3] test: add known broken tests for from: and subject: David Bremner
2019-08-25  9:33             ` Tomi Ollila
2019-08-21 11:41           ` [PATCH 2/3] lib: introduce N_F_GROUP and use it to fix implicit AND for from: David Bremner
2019-08-21 11:41           ` [PATCH 3/3] WIP/test: extend field grouping tests 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).