]> git.notmuchmail.org Git - notmuch/blobdiff - database.cc
add_message: Add a type:mail ("Kmail") term to all documents.
[notmuch] / database.cc
index 041cffdc9afe49b01a2c54e86a87b88610d25b0d..1c1e590b351603f5b0e3d02e0dac6dbb2eea54af 100644 (file)
@@ -457,7 +457,6 @@ notmuch_database_open (const char *path)
     notmuch->path = xstrdup (path);
 
     try {
-       Xapian::PostingIterator i;
        notmuch->xapian_db = new Xapian::WritableDatabase (xapian_path,
                                                           Xapian::DB_CREATE_OR_OPEN);
     } catch (const Xapian::Error &error) {
@@ -519,10 +518,10 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
                                           (char *) NULL);
 
     try {
-       doc = Xapian::Document ();
-
        doc.set_data (filename);
 
+       add_term (doc, "type", "mail");
+
        parents = g_ptr_array_new ();
 
        refs = notmuch_message_file_get_header (message, "references");