aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/database.cc
diff options
context:
space:
mode:
authorGravatar Jani Nikula <jani@nikula.org>2014-02-08 20:50:44 +0200
committerGravatar David Bremner <david@tethera.net>2014-03-11 19:51:22 -0300
commit59823f964250be6d0ddbdfc45d4b07803bab267d (patch)
tree8f43becd4d0290632e8dea7532c54792157bf6a1 /lib/database.cc
parent4d150eba6775d9c34276547c7ae248a8ec4e6107 (diff)
lib: add support for path: prefix searches
The path: prefix is a literal boolean prefix matching the paths, relative from the maildir root, of the message files. path:foo matches all message files in foo (but not in foo/new or foo/cur). path:foo/new matches all message files in foo/new. path:"" matches all message files in the top level maildir. path:foo/** matches all message files in foo and recursively in all subdirectories of foo. path:** matches all message files recursively, i.e. all messages.
Diffstat (limited to 'lib/database.cc')
-rw-r--r--lib/database.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/database.cc b/lib/database.cc
index f395061e..93cc7f57 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -100,8 +100,8 @@ typedef struct {
* In addition, terms from the content of the message are added with
* "from", "to", "attachment", and "subject" prefixes for use by the
* user in searching. Similarly, terms from the path of the mail
- * message are added with a "folder" prefix. But the database doesn't
- * really care itself about any of these.
+ * message are added with "folder" and "path" prefixes. But the
+ * database doesn't really care itself about any of these.
*
* The data portion of a mail document is empty.
*
@@ -208,7 +208,8 @@ static prefix_t BOOLEAN_PREFIX_EXTERNAL[] = {
{ "thread", "G" },
{ "tag", "K" },
{ "is", "K" },
- { "id", "Q" }
+ { "id", "Q" },
+ { "path", "P" },
};
static prefix_t PROBABILISTIC_PREFIX[]= {