From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id KEg2MUz5DGflmQAAqHPOHw:P1 (envelope-from ) for ; Mon, 14 Oct 2024 10:58:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id KEg2MUz5DGflmQAAqHPOHw (envelope-from ) for ; Mon, 14 Oct 2024 12:58:20 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=tethera.net header.s=2024 header.b=IN0ZWPwg; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1728903500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=DpVGqweuDQ05bQjK1rlFTMeOi3cG1dU46bUmPLD7yIk=; b=tlEhr9CfYj3AUf20fWDjg1gEgHS94uI7RM8YKImtiG1IY3l2Z7bGh+v21z0mls73xNJwre +YfMn/IlJ+3GB6CCl13fQpqIXPrxsrTkQ0XSMzOVnlpKDGZz5iRwTred8PQtlCFPUf6CDr iAiWdRWT0pdfqPKxINrGAA66NP+A1sPasKq6ySk7AtJr50q5cQHrgHGrmfOoJf5f8mixjg +xWWSdXbMedphCyg4CfBBEw3fkU1ktA2wMXeCMR9SMRwR3GxYFlP3muVccMcVGVv0Y6Mue bfnB/Aug5rSRpJzUkZFN6t16I8G41AOd8IsevoqzQ3ixW6hJCwt29si7L+zXMA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=tethera.net header.s=2024 header.b=IN0ZWPwg; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1728903500; a=rsa-sha256; cv=none; b=fm7vDe5lfz6SVJiMQRvqKpihjhNNy7Rmt1k1jW8GqPcGXAnt4zcUOU+nuJ55Jnai32mVmr ld15VAQU9jblbQt9eKPJ8CMyxVXyIu6uA7cilkxjd0CZ+LF8KAMF253+3rDmJv84keNQfp zaxyBi7LXuUWz8gKaXOzb7bw37Svs1blBDu2zgwkhmDYLIaVA8p0Kj/aAZFJ4sEO9SCRSQ JmPchs8S/NZ3tiRQU5d+EaDwc/64w1QNIN+EMcLGrtY+vmuVAYdAqYxXYdzi6vMrddXa1/ bGD3gTo/FRfAAAqmVy2lbRf0v35kR9GNy3aET392r1CHzT8+//kxkALOuD7q0Q== Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 733337DBE9 for ; Mon, 14 Oct 2024 12:58:19 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id C0E4F5E525; Mon, 14 Oct 2024 10:58:10 +0000 (UTC) Received: from phubs.tethera.net (phubs.tethera.net [192.99.9.157]) by mail.notmuchmail.org (Postfix) with ESMTPS id 811315E50F for ; Mon, 14 Oct 2024 10:58:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tethera.net; i=@tethera.net; q=dns/txt; s=2024; t=1728903483; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=oHd2KBv+f0dFaUYnBfQcQx6Yy0jK65Zw5rCgygSa7Tw=; b=IN0ZWPwgBcP10/Cz9a13U9X32b8OATrjyZXT8dI4SyDk3W65sf0jUQNz7EqYoVbJf0AcA ou+rV4bpVjtIK5fDOhP7C+jkpzHWHZt+zozjOZAnRWozwYeehFyXBA9icp+mPD3bzAyQu/d Y3sMgwOCGQuz+jxFYzGAea0lcfj3hB0KZvR4a//TUWcAGCE6pEdt3fwSY0ETqQrVxK+LVWQ Gz5WaNY3CFGnDDZX/Fi3XikOof7uRBwKLKGRW/XwsB98O1YYcHklV03sQYcpbSM0kjyCwEp zKg5IKFEZV8rRQda/5Aoqp4UKVWB7wD24agq5MgKn4G6xjWH6oYS/D6/XdYg== Received: from tethera.net (fctnnbsc51w-159-2-211-58.dhcp-dynamic.fibreop.nb.bellaliant.net [159.2.211.58]) by phubs.tethera.net (Postfix) with ESMTPS id A3BD2180181; Mon, 14 Oct 2024 07:58:03 -0300 (ADT) Received: (nullmailer pid 1982784 invoked by uid 1000); Mon, 14 Oct 2024 10:58:03 -0000 From: David Bremner To: Michael J Gruber Subject: Re: searching for a message by path In-Reply-To: References: <20240928025630.km2tcgjgt3xub4jo@localhost> <87wmiur7aq.fsf@tethera.net> <874j5hdj1a.fsf@tethera.net> Date: Mon, 14 Oct 2024 07:58:03 -0300 Message-ID: <87cyk3c5ok.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: VM64RAIIWCVE5GDMV7ZA4V3AIA3Q7P3E X-Message-ID-Hash: VM64RAIIWCVE5GDMV7ZA4V3AIA3Q7P3E X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: frederik@ofb.net, notmuch@notmuchmail.org X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Country: DE X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 6.73 X-Spam-Score: 6.73 X-Migadu-Queue-Id: 733337DBE9 X-TUID: uQYrRtHrwfF4 Michael J Gruber writes: > ``` > dirterm=XDIRECTORY$(dirname $relone) > dirdocid=$(xapian-delve -1 -t $dirterm ~/.mail/.notmuch/xapian/ | tail -n1) > docterm=XFDIRENTRY${dirdocid}:$(basename $relone) > docid=$(xapian-delve -1 -t $docterm ~/.mail/.notmuch/xapian/ | tail -n1) > xapian-delve -1 -t $docterm -r $docid -V1 ~/.mail/.notmuch/xapian/ | > grep Value | cut -d' ' -f6- > ``` Impressive hack! ;) Roughly speaking, that's what the code in question does, but a PostingSource is a Xapian way of wrapping up that double query (two calls to xapian-delve in this case) so that it can be part of a regular query with e.g. a file: prefix.