Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 23BFA431FBC for ; Tue, 22 Dec 2009 14:49:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1JPObIbCAbzi for ; Tue, 22 Dec 2009 14:49:42 -0800 (PST) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by olra.theworths.org (Postfix) with ESMTP id 5B3B6431FAE for ; Tue, 22 Dec 2009 14:49:42 -0800 (PST) Received: from list by lo.gmane.org with local (Exim 4.50) id 1NNDXq-0007pM-TI for notmuch@notmuchmail.org; Tue, 22 Dec 2009 23:49:35 +0100 Received: from ip-118-90-130-94.xdsl.xnet.co.nz ([118.90.130.94]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Dec 2009 23:49:34 +0100 Received: from olly by ip-118-90-130-94.xdsl.xnet.co.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Dec 2009 23:49:34 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: notmuch@notmuchmail.org From: Olly Betts Date: Tue, 22 Dec 2009 22:48:25 +0000 (UTC) Lines: 20 Message-ID: References: <87oclwrtqa.fsf@jameswestby.net> <874onoysrl.fsf@yoom.home.cworth.org> <87my1grrdi.fsf@jameswestby.net> <873a38ypg5.fsf@yoom.home.cworth.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 118.90.130.94 (Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6) Sender: news Subject: Re: [notmuch] Missing messages breaking threads X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2009 22:49:43 -0000 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