X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=database.cc;h=1c1e590b351603f5b0e3d02e0dac6dbb2eea54af;hp=7e678d87b8a506524663814e55b502309c74ed37;hb=6a3b68edeffa53c3e1c9aa156eff46c5999077c5;hpb=cd4a8734d3bb151df70d51a84903bff994439b05 diff --git a/database.cc b/database.cc index 7e678d87..1c1e590b 100644 --- a/database.cc +++ b/database.cc @@ -18,7 +18,7 @@ * Author: Carl Worth */ -#include "notmuch-private.h" +#include "database-private.h" #include @@ -28,12 +28,6 @@ using namespace std; -struct _notmuch_database { - char *path; - Xapian::WritableDatabase *xapian_db; - Xapian::TermGenerator *term_gen; -}; - #define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr[0])) /* Xapian complains if we provide a term longer than this. */ @@ -524,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");