Don't hash headers we won't end up using.
[notmuch] / database.cc
index 6ac04f74ee4f4dbbd19908f3d82c47c554458d2d..efc3876205b79de6469373533988af12ca6f354e 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <xapian.h>
 
-#include <glib.h>
+#include <glib.h> /* g_strdup_printf, g_free, GHashTable */
 
 using namespace std;
 
@@ -486,6 +486,13 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
 
     message = notmuch_message_open (filename);
 
+    notmuch_message_restrict_headers (message,
+                                     "references",
+                                     "in-reply-to",
+                                     "message-id",
+                                     "date",
+                                     (char *) NULL);
+
     try {
        doc = Xapian::Document ();