From: Jani Nikula Date: Sat, 13 Aug 2016 09:38:40 +0000 (+0300) Subject: Re: [PATCH 9/9] add has: query prefix to search for specific properties X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d753fbf2e7fb62cbef6db047e181ad343fd1b966;p=notmuch-archives.git Re: [PATCH 9/9] add has: query prefix to search for specific properties --- diff --git a/4a/99d7c633e353f14791aea139612fb79b9e58bf b/4a/99d7c633e353f14791aea139612fb79b9e58bf new file mode 100644 index 000000000..f0f37d1d5 --- /dev/null +++ b/4a/99d7c633e353f14791aea139612fb79b9e58bf @@ -0,0 +1,122 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 2AB606DE25E8 + for ; Sat, 13 Aug 2016 02:40:35 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.329 +X-Spam-Level: +X-Spam-Status: No, score=0.329 tagged_above=-999 required=5 tests=[AWL=1.049, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, + RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-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 MMojALNfNF22 for ; + Sat, 13 Aug 2016 02:40:18 -0700 (PDT) +Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com + [74.125.82.67]) by arlo.cworth.org (Postfix) with ESMTPS id 238CE6DE3521 for + ; Sat, 13 Aug 2016 02:40:07 -0700 (PDT) +Received: by mail-wm0-f67.google.com with SMTP id q128so1664566wma.1 + for ; Sat, 13 Aug 2016 02:40:06 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=nikula-org.20150623.gappssmtp.com; s=20150623; + h=from:to:cc:subject:in-reply-to:references:date:message-id + :mime-version; bh=Fl3JV4B22MQp5cJ8BRS3qTXUm2OLLCjSPFIPmwCcEWc=; + b=OEMPgQz7zhN77nBuzQ41UlGlhmEuk/MC904s24fGw64zuAIP4/U1aPaa0xPqe8/Be6 + BvYM1NpxMV6TIo7ychao7QaRtxR8C6PSSzSN/cMVcapQstzT1IxHhZh8Z0xUSeh8MxWh + ddWkHEA9b3zyQ0BdqZ3hNQ3M5/Hea4CdmoQo2iLvOIC9fftMmAQuqj3KgROszgu4E/w2 + kRGHOqiS0M4bfsGUZ2fh0YjWXutHkaB5Cvy1sHj5Fqn41F7eywxwHGNNg5Kz+ZNWRMHR + k2qsU1/S5Cf1yhdkA+ttQT9AfrLvCPj7gduLXpftt5Y5mj61MB3BFe4PU57avCFqN/LO + l2dw== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date + :message-id:mime-version; + bh=Fl3JV4B22MQp5cJ8BRS3qTXUm2OLLCjSPFIPmwCcEWc=; + b=TgOvS4ezExAG41P+kvGMdK109kFTIV5GZMjh0vXIfi319hRh8DZgr1sz+cSyPqaFGQ + r5hsde7uMGWbNjV1DrqKuKqvyH/UwaPUwCqBVF5jdHWZh02C0vDVS50J2ylO8dePB/3S + DOtg0SmYatzRP7q3MpBBjtHg8rpFp+NN6rdC+SjSaQ6cCG4J5jCysutNXY0P/tfOnAq3 + LflVpweZDPZGK3VWSDif3XeLKtf/TcMFLdfRjtnzPR+BKbXwUVHlgtmiOhki7BUKoxvG + BQQvVFRgb7bC0xUYhU2c8JIaBtTkBrSTeprvC9CN6ucSTswdyEwbatc02vvqw8givFCb + DaLQ== +X-Gm-Message-State: + AEkoouskNEVRZ5jqy3jvkT4u53ZQybT3fMu/V7W9CFxLzGYpUXqOi6YmSsX6eRB68plzvA== +X-Received: by 10.194.27.202 with SMTP id v10mr22752413wjg.140.1471081204801; + Sat, 13 Aug 2016 02:40:04 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c368-70.dhcp.inet.fi. + [88.195.104.70]) + by smtp.gmail.com with ESMTPSA id d80sm6362817wmd.14.2016.08.13.02.40.03 + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 13 Aug 2016 02:40:03 -0700 (PDT) +From: Jani Nikula +To: David Bremner , notmuch@notmuchmail.org +Cc: Daniel Kahn Gillmor +Subject: Re: [PATCH 9/9] add has: query prefix to search for specific + properties +In-Reply-To: <87d1lm7zg2.fsf@maritornes.cs.unb.ca> +References: <1470491559-3946-1-git-send-email-david@tethera.net> + <1470491559-3946-10-git-send-email-david@tethera.net> + <87d1lm7zg2.fsf@maritornes.cs.unb.ca> +Date: Sat, 13 Aug 2016 12:38:40 +0300 +Message-ID: <87vaz580v3.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Sat, 13 Aug 2016 09:40:35 -0000 + +On Sat, 06 Aug 2016, David Bremner wrote: +> David Bremner writes: +> +>> +>> +The **has:** prefix searches for messages with a particular +>> += property pair. Properties are used internally by notmuch +>> +(and extensions) to add metadata to messages. A given key can be +>> +present on a given message with several different values. +>> + +> +> I probably should have added to the commit message that this +> documentation is intentionally minimal, because it's not intended for +> people creating properties; that should go in API documentation, I think. +> +> +>> + { "has", "XPROPERTY" }, +>> /* +>> * Without the ":", since this is a multi-letter prefix, Xapian +>> * will add a colon itself if the first letter of the path +> +> I don't really understand the comment on the next line (since it seems +> that no : is added to XPROPERTY by Xapian), but I guess we should +> probably be consistent. Maybe Jani can explain the comment? + +My recollection is vague, but it has to do with user-defined prefixes +(XSOMETHING) and terms beginning with uppercase letters. I think it +would possibly be useful (mandatory?) to append ":" at the end of +XPROPERTY, if it's possible we'll have properties beginning with +uppercase letters. + +Quoting https://xapian.org/docs/omega/termprefixes.html + +""" +X starts a multi-capital letter user-defined prefix. If you want a +prefix for something without a standard prefix, you create your own +starting with an X (e.g. XSHOESIZE). The prefix ends with the first +non-capital. If the term you're prefixing starts with a capital, add a +":" between prefix and term to resolve ambiguity about where the prefix +ends and the term begins. +""" + +BR, +Jani.