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 EC1636DE0BA5 for ; Thu, 7 Sep 2017 11:51:39 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5 tests=[AWL=0.010, 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 1p5LMgMehmWF for ; Thu, 7 Sep 2017 11:51:35 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 5127C6DE0C51 for ; Thu, 7 Sep 2017 11:51:35 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1dq1q8-0005JT-QN; Thu, 07 Sep 2017 14:47:48 -0400 Received: (nullmailer pid 14723 invoked by uid 1000); Thu, 07 Sep 2017 18:51:26 -0000 From: David Bremner To: Gaute Hope , Jani Nikula , notmuch@notmuchmail.org Subject: Re: [PATCH] WIP: add thread subqueries. In-Reply-To: <1504806079.rug5z5bxr4.astroid@strange.none> References: <87378ml59b.fsf@nikula.org> <20170820213240.20526-1-david@tethera.net> <87efs5g0sq.fsf@tethera.net> <1504806079.rug5z5bxr4.astroid@strange.none> Date: Thu, 07 Sep 2017 15:51:26 -0300 Message-ID: <87zia69wb5.fsf@tesseract.cs.unb.ca> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Thu, 07 Sep 2017 18:51:40 -0000 Gaute Hope writes: > David Bremner writes on august 21, 2017 3:35: >> David Bremner writes: >> >> >>> If you're interested in this feature, please test, let me know if it's >>> workable for your use case. The syntax here is thread:{$query}. The >>> usual caveats about whitespace apply. The running example is >>> >>> thread:{from:me} and thread:{from:jian} and not thread:{from:dave} >>> >> >> I was playing around with this, and >> >> 'thread:"{from:bremner and date:2017}"' and thread:{from:sitaram} >> >> is about 10x faster than without the date restriction. This is roughly >> proportional to the number of threads matching the first subquery. >> Unfortunately the date restriction needs to be inside the subquery with >> the current design. > > So just to clarify; to make true full thread searches there cannot be > more than one term in each thread:{} query? Otherwise, all terms in > each thread: query must be found in at least one message at the same > time. So you could put the date: restriction in a separate thread:{}, > but it would be slower? I think your interpretation is correct. I would further emphasise the following: - contrary to usual intuition with notmuch/xapian every extra thread:{} term will slow things down - having the date restriction in a seperate thread:{} term would ask for threads with at least one message in that date range - there might be many such threads; e.g. I have 34178 threads from 2016 d