aboutsummaryrefslogtreecommitdiff
path: root/lib/database.cc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2016-08-18 05:06:54 -0300
committerDavid Bremner <david@tethera.net>2016-08-18 05:11:37 -0300
commit9e177b236c7054bc6a51c4718bfd4b31cd4f8b20 (patch)
tree28284e230459002dd0ad9f895d0b7fa9ef995e87 /lib/database.cc
parent1ba73d1437202b9ae3c2cff6d20dbe92fcacf053 (diff)
lib: reword comment about XFOLDER: prefix
I believe the current one is misleading, because in my experiments Xapian did not add : when prefix and term were both upper case. Indeed, it's hard to see how it could, because prefixes are added at a layer above Xapian in our code. See _notmuch_message_add_term for an example. Also try to explain why this is a good idea. As far as I can ascertain, this is more of an issue for a system trying to work with an unknown set of prefixes. Since notmuch has a fixed set of prefixes, and we can hopefully be trusted not to add XGOLD and XGOLDEN as prefixes, it is harder for problems to arise.
Diffstat (limited to 'lib/database.cc')
-rw-r--r--lib/database.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/database.cc b/lib/database.cc
index 57a98c94..5577aaf9 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -260,10 +260,10 @@ static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
{ "id", "Q" },
{ "path", "P" },
/*
- * Without the ":", since this is a multi-letter prefix, Xapian
- * will add a colon itself if the first letter of the path is
- * upper-case ASCII. Including the ":" forces there to always be a
- * colon, which keeps our own logic simpler.
+ * Unconditionally add ':' to reduce potential ambiguity with
+ * overlapping prefixes and/or terms that start with capital
+ * letters. See Xapian document termprefixes.html for related
+ * discussion.
*/
{ "folder", "XFOLDER:" },
};