From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 84EA36DE0C5F for ; Mon, 22 Aug 2016 05:48:45 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.007 X-Spam-Level: X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=0.004, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gvtgiQM231yz for ; Mon, 22 Aug 2016 05:48:44 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 938C56DE0C45 for ; Mon, 22 Aug 2016 05:48:44 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1bboee-00017n-6h; Mon, 22 Aug 2016 08:48:40 -0400 Received: (nullmailer pid 32475 invoked by uid 1000); Mon, 22 Aug 2016 12:48:38 -0000 From: David Bremner To: Gaute Hope , notmuch@notmuchmail.org Subject: Re: match on all messages in a thread - rather than messages invdividually In-Reply-To: <1471858269.x2m28lgosh.astroid@strange> References: <1471858269.x2m28lgosh.astroid@strange> User-Agent: Notmuch/0.22.1 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Mon, 22 Aug 2016 09:48:38 -0300 Message-ID: <87a8g5q89l.fsf@zancas.localnet> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2016 12:48:45 -0000 Gaute Hope writes: > Is it possible to search in a way that (through the API) such that the > thread is matching, rather than the individual messages? This is not currently possible. Since threads are not stored as documents in the database, a straightforward implementation would be linear in the number of threads. It might be possible to filter the set of threads to be examined by turning the "AND" query into an "OR" query, and making a second pass at the thread-id's of messages matching the expanded query. I'm not sure if/when I'll find time to look at it, but if someone wants a project, I think most of the xapian pieces are in id:1467034387-16885-1-git-send-email-david@tethera.net > How does muted thread work with regard to this? If I have one unmuted > message in a thread that message matches the query. If a new message is > added to a muted thread, is the muted tag applied to it? "muted" is not something built in to notmuch, so it depends a bit which hack you're refering to. If you mean the CLI hack described at https://notmuchmail.org/excluding/ then yes, the muted tag is propagated.