1 Return-Path: <jani@nikula.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 87C22431FBF
\r
6 for <notmuch@notmuchmail.org>; Wed, 29 Jan 2014 11:05:46 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id jdHG4c6S51KY for <notmuch@notmuchmail.org>;
\r
16 Wed, 29 Jan 2014 11:05:37 -0800 (PST)
\r
17 Received: from mail-ea0-f179.google.com (mail-ea0-f179.google.com
\r
18 [209.85.215.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 45D7D431FBD
\r
21 for <notmuch@notmuchmail.org>; Wed, 29 Jan 2014 11:05:37 -0800 (PST)
\r
22 Received: by mail-ea0-f179.google.com with SMTP id q10so941042ead.24
\r
23 for <notmuch@notmuchmail.org>; Wed, 29 Jan 2014 11:05:34 -0800 (PST)
\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
25 d=1e100.net; s=20130820;
\r
26 h=x-gm-message-state:from:to:subject:in-reply-to:references
\r
27 :user-agent:date:message-id:mime-version:content-type;
\r
28 bh=ruJSi2DoWO7Z83uIA1BRpmJdAFm2S77i5UIHbdMn+II=;
\r
29 b=Ieye9qTsbW6SPdUsPu4MpS/ibwHdVCCzEdWaj8A9wuiqHntT+YhroHJEjn61XaR5qf
\r
30 B6JuYmVuh/93NsyBYM9bW6qeWwrERQi8eWes1Kfug++A0/9J9uBiC/ZvtvdI6aeygR0Z
\r
31 xbC/fBxzhYcNNrdlyJPMBrFNEQJyr9uAFy+TeaXDmXSPEgWMc1k3y1sM0CBgCHG76iL2
\r
32 p+BCP4etSqzbUiet4CEFN5Qdcgl2rNAclIJDiScT5mfZWbqtchE4DHpgtQA2sDCkpdMw
\r
33 zPoFVF5nLoYh3Y4/13pYlk2IvxsHrRF7fLbmnzbBziHH4e5vgHVxK+xz7L1QDbIp5ypb
\r
36 ALoCoQmQwlRs051nC/uX5gx8uhesp8aluvZlalxEqTrAmDaJ00mNFORPKS01BXjHaKKJL9BVdc/M
\r
37 X-Received: by 10.15.36.65 with SMTP id h41mr11808769eev.0.1391022334730;
\r
38 Wed, 29 Jan 2014 11:05:34 -0800 (PST)
\r
39 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.
\r
41 by mx.google.com with ESMTPSA id k6sm12426881eep.17.2014.01.29.11.05.31
\r
42 for <multiple recipients>
\r
43 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
44 Wed, 29 Jan 2014 11:05:33 -0800 (PST)
\r
45 From: Jani Nikula <jani@nikula.org>
\r
46 To: Carl Worth <cworth@cworth.org>, Austin Clements <aclements@csail.mit.edu>,
\r
47 notmuch@notmuchmail.org
\r
48 Subject: Re: [PATCH 0/5] lib: make folder: prefix literal
\r
49 In-Reply-To: <874n4rvcvo.fsf@yoom.home.cworth.org>
\r
50 References: <cover.1389304779.git.jani@nikula.org>
\r
51 <87y525m649.fsf@awakening.csail.mit.edu>
\r
52 <87r47wfltb.fsf@nikula.org> <87iot8f4vg.fsf@nikula.org>
\r
53 <874n4rvcvo.fsf@yoom.home.cworth.org>
\r
54 User-Agent: Notmuch/0.17+44~ge3b4cd9 (http://notmuchmail.org) Emacs/24.3.1
\r
55 (x86_64-pc-linux-gnu)
\r
56 Date: Wed, 29 Jan 2014 21:05:30 +0200
\r
57 Message-ID: <874n4mfw1x.fsf@nikula.org>
\r
59 Content-Type: text/plain
\r
60 X-BeenThere: notmuch@notmuchmail.org
\r
61 X-Mailman-Version: 2.1.13
\r
63 List-Id: "Use and development of the notmuch mail system."
\r
64 <notmuch.notmuchmail.org>
\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
66 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
68 List-Post: <mailto:notmuch@notmuchmail.org>
\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
72 X-List-Received-Date: Wed, 29 Jan 2014 19:05:46 -0000
\r
74 On Sun, 26 Jan 2014, Carl Worth <cworth@cworth.org> wrote:
\r
75 > Jani Nikula <jani@nikula.org> writes:
\r
76 >> Here's a thought. With boolean prefix folder:, we can devise a scheme
\r
77 >> where the folder: query defines what is to be matched.
\r
79 > I like the idea, but I tried to infer the rules from the examples, and I
\r
80 > failed. It looks like there are two new symbols, "/" and "/." but I
\r
81 > couldn't decipher the exact semantics of each.
\r
83 > I think a proposal like this should not re-use the '/' symbol as we
\r
84 > already have that as a path divider. (See rsync for lots of user
\r
85 > confusion with a significant trailing '/').
\r
87 > I propose a similar, but slightly different approach, where we add two
\r
88 > additional symbols:
\r
90 > '^' Matches the beginning of a path
\r
92 > '$' Matches the end of a path
\r
94 > [Obviously, I chose these symbols from regular expressions. I would be
\r
95 > OK with alternate symbols, ('$' seems like it might be problematic in
\r
96 > the shell, but perhaps not too much if it's always at the end of a
\r
99 > This way, one could search for:
\r
101 > folder:foo Works like "folder:" historically
\r
103 > folder:^full/path$ Works like Jani's proposal
\r
105 > folder:^path/prefix Satisfies Tomi's use case, (as well as anyone
\r
106 > who doesn't want to have to specify or
\r
107 > distinguish between "/cur" or "/new".
\r
109 > Any extra '/' at the beginning or end of a search string, (such as
\r
110 > "folder:^/full/path/$") would not change the semantics.
\r
112 > Further, I think we can implement this with less database bloat by
\r
113 > leaving "folder" as probabilistic and simply indexing two new terms to
\r
114 > indicate the beginning of the path and the end of the path.
\r
116 > Finally, we could also extend the scheme to other things like subject:
\r
117 > to allow for an exact subject search like:
\r
119 > "subject:^lib: make folder: prefix literal$"
\r
121 > It was with an eye toward something like this that I chose to make
\r
122 > folder: probabilistic in the first place. (I probably would have indexed
\r
123 > things appropriately in the first place as well, but at the time doing
\r
124 > the necessary query parsing for '^' and '$' seemed daunting).
\r
126 Unfortunately, I haven't had the time to experiment with this. But it
\r
127 bugs me that the probabilistic folder: prefix has stemming and it's case
\r
128 insensitive. It's possible to work around the stemming with the anchors
\r
129 you suggest or by quoting, but is there a way to have case sensitive
\r
130 probabilistic prefixes?
\r