#include "notmuch-private.h"
#include "database-private.h"
-#include <xapian.h>
-
struct _notmuch_filenames {
Xapian::TermIterator iterator;
Xapian::TermIterator end;
* iterating over the non-prefixed portion of terms sharing a common
* prefix.
*/
-notmuch_filenames_t *
+static notmuch_filenames_t *
_notmuch_filenames_create (void *ctx,
notmuch_database_t *notmuch,
const char *prefix)
directory->doc.add_value (NOTMUCH_VALUE_TIMESTAMP,
Xapian::sortable_serialise (0));
- directory->document_id = db->add_document (directory->doc);
+ directory->document_id = _notmuch_database_generate_doc_id (notmuch);
+ db->replace_document (directory->document_id, directory->doc);
talloc_free (local);
}