Re: [notmuch] Missing messages breaking threads

Subject: Re: [notmuch] Missing messages breaking threads

Date: Tue, 22 Dec 2009 22:48:25 +0000 (UTC)

To: notmuch@notmuchmail.org

Cc:

From: Olly Betts


Carl Worth writes:
> We don't have any concept of versioning yet, but it would obviously be
> easy to have a new version document with an increasing integer.

Adding a magic document for this isn't ideal as you have to make sure
it can't appear in search results, etc.

This is just the sort of thing which Xapian's "user metadata" is there
for.  It's essentially a key/value store which is versioned along with
the rest of the Xapian database.  So to set it:

  database.set_metadata("version", "1");

And to read (and default if not set):

  string version = database.get_metadata("version");
  if (version.empty()) version = "0";

Cheers,
   Olly


Thread: