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 49ADA6DE0A7F for ; Tue, 17 Oct 2017 11:33:08 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.043 X-Spam-Level: X-Spam-Status: No, score=-0.043 tagged_above=-999 required=5 tests=[AWL=-0.043] 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 bb__ne_g1eEU for ; Tue, 17 Oct 2017 11:33:07 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTP id 84DE76DE0A6C for ; Tue, 17 Oct 2017 11:33:07 -0700 (PDT) Received: from fifthhorseman.net (unknown [38.109.115.130]) by che.mayfirst.org (Postfix) with ESMTPSA id 74BCAF99A; Tue, 17 Oct 2017 14:33:06 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id CCE622038C; Tue, 17 Oct 2017 14:33:03 -0400 (EDT) From: Daniel Kahn Gillmor To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: [PATCH] lib: add support for thread: queries In-Reply-To: <20171016190754.22581-1-jani@nikula.org> References: <20171016190754.22581-1-jani@nikula.org> Date: Tue, 17 Oct 2017 14:33:00 -0400 Message-ID: <8760bdvd43.fsf@fifthhorseman.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: Tue, 17 Oct 2017 18:33:08 -0000 --=-=-= Content-Type: text/plain On Mon 2017-10-16 22:07:54 +0300, Jani Nikula wrote: > Add support for querying threads using message-ids in addition to > thread-ids. The main benefit is that thread queries via message-ids > are portable across databases, re-indexing, and thread joining, while > thread ids can be somewhat transient. A thread: query can > be shared between notmuch users, while a thread: query may > cease to work after the regular delivery of a message that joins > threads. > > What previously required: > > $ notmuch search $(notmuch search --output=threads id:) > > can now be reduced to: > > $ notmuch search thread: > > We limit the query to message-ids that have @ to optimize regular > thread-id queries and to avoid collisions with thread-ids which are > guaranteed (or which we can guarantee) to not contain @. This seems > reasonable, as valid message-ids will have @. > > The performance penalty for regular thread-id queries seems to be > neglible, and thread queries via message-ids seem to be about 10% > slower than the direct thread-id query counterpart. The rationale for this patch really good. This is functionality we should make available directly without the shell substitution shenanigans described above, and i like the elegance of determining whether it's a message-id or a thread id based on the presence of an '@' symbol. i have read the patch and it seems reasonable to me, though i'm not particularly confident in my ability to catch any subtle bugs in logic about manipulating Xapian. I think we should adopt this proposal, though i welcome additional review from people with more Xapian-fu than myself. --dkg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEOCdgUepHf6PklTkyFJitxsGSMjcFAlnmTNwACgkQFJitxsGS MjcACg//R9TfI//KtJ6SMrZjB7L/nhFeZixWKv3sM+0FIgW6a+srB598GZs7paIn JEBEm5ioC4oEaBy0VOxQtjauQ/ISIBT2yA08/EW+cScAoJ2gVR9ICVJyYosh5INo ZqQTnMcoHdwLc2Ilo+OV2p7UMSmX4eKbY1Qfi8ysbo100W/oTTrZqUMfA23SgUtt SqLK+9Cere1wEPJRXQMFFL8oV/SzUZyg812qqIA1TzdEjqkX9FiE5Q5G21c9ZKrw zLentes4drvCAtkVUTtkewtwPaUcXQyIjB6nIhhTpzoGbFcvXtCKPDfgkwgM0U5Y i1O8pIoWyOEMMB2b2lAjNj/NsKl0fcWvaFAfe5snl/V+7fYBMGZqbeVO2+PaCMNt cc/bfcBO4sPrjogRTBpKB692Jlz9k1IUvcvUhreSS0a/QrV4/Bmpzb8AUpxedtLE UMjEN0CZ//FBd5v1WcTnlXu92FY5WE5IRH20RSmovhRoCH1HNANbtY4aCUEJuAMY sZ1kgZmzMW0hj7OYngq6jl8VoJrRKJ8gaVuRu/HqHGBAPnWPgiaQAAvRuMrGvt5w 6dGWSXkXNL1GYyFBOsHsjabKZsXbN0YUVg8yhi68QSgmS233MPiUSZ/o9YPYBeg0 A52IqnA9XwLWx+xWhC8yay42lIxzzBPsoKSbIJ+89OqwCqaLH3M= =1zdP -----END PGP SIGNATURE----- --=-=-=--