aboutsummaryrefslogtreecommitdiffhomepage
path: root/database.cc
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-10-21 00:34:36 -0700
committerGravatar Carl Worth <cworth@cworth.org>2009-10-21 00:34:36 -0700
commit6a3b68edeffa53c3e1c9aa156eff46c5999077c5 (patch)
tree02e930dfe592ad087148cdff125f57c5dbe21d9e /database.cc
parentaf65f52acf4eac5b2187855a63895afe3386c074 (diff)
add_message: Add a type:mail ("Kmail") term to all documents.
This gives us an easy way to specify "all mail messages" in a search query. We simply look for this term.
Diffstat (limited to 'database.cc')
-rw-r--r--database.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/database.cc b/database.cc
index 5ee07059..1c1e590b 100644
--- a/database.cc
+++ b/database.cc
@@ -520,6 +520,8 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
try {
doc.set_data (filename);
+ add_term (doc, "type", "mail");
+
parents = g_ptr_array_new ();
refs = notmuch_message_file_get_header (message, "references");