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 420A7431FD0 for ; Sat, 14 May 2011 21:40:23 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled 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 og184sYJVEQv for ; Sat, 14 May 2011 21:40:22 -0700 (PDT) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 61AF8431FB6 for ; Sat, 14 May 2011 21:40:22 -0700 (PDT) Received: by pxi20 with SMTP id 20so3321596pxi.41 for ; Sat, 14 May 2011 21:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=s+Ob2OIZQnsr9pK9BhMPwpMGEv3nZGDFWn2XQNKqqxY=; b=C5j1h4FuI81SnLd/nDIaamdKcFr3tIZEeA+8ysAjr8/Hy4HLlHTECKVZQ0m269Xxs8 H5Fi8HG1f2y6W50tLhwEiZUKVnglC2lCsRlbCBD/5zMKSeCLH4LQ3CqnR66vHhv1N5GK 5AAiCoA6Gwy+gGWxXkk1doAR4bhPl9dYKEuWA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=oHWd4MLELNteiWAtnHH5w6VlV6+QFXc1ilbzf11jTJsWGUxtSQAd1/xD46CdNPVTcl txYvjOC5OaVOafRzWK+WsvjJ10DZEYC4hAcjMeZbXLVTct7ud/8psZnDGjxpAIfyHCnC uH9MfqZAbwVDI6qA55DKKg48rNj+EtPDQe0gE= MIME-Version: 1.0 Received: by 10.68.56.134 with SMTP id a6mr5085336pbq.267.1305434419643; Sat, 14 May 2011 21:40:19 -0700 (PDT) Received: by 10.68.51.198 with HTTP; Sat, 14 May 2011 21:40:19 -0700 (PDT) In-Reply-To: References: <87zkmwsc2d.fsf@servo.factory.finestructure.net> <87ei45rjm4.fsf@flamingspork.com> Date: Sun, 15 May 2011 00:40:19 -0400 Message-ID: Subject: Re: storing From and Subject in xapian From: servilio To: Istvan Marko Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: notmuch@notmuchmail.org, Austin Clements X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Sun, 15 May 2011 04:40:23 -0000 On 12 May 2011 04:39, Istvan Marko wrote: > Stewart Smith writes: > >> Would it be possible to progressively fill the DB with the new data? >> >> i.e. >> >> if Subject/From not in db for message >> =C2=A0 =C2=A0add Subject/From for this message to DB. > > I started looking into this but then realized that notmuch search opens > the database in read-only mode so it cannot make updates. It might be > desirable to keep it that way for safety and locking reasons. What about the following: - increase NOTMUCH_DATABASE_VERSION[1] - update notmuch_database_upgrade[2] to fill in the new data for the documents missing it - include an upgradedb command that wraps notmuch_database_upgrade[2] - have notmuch search prints a warning about running a DB version less than the runtime and suggests running upgradedb Regards, Servilio [1] http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/database.cc#l39 [2] http://git.notmuchmail.org/git/notmuch/blob/HEAD:/lib/database.cc#l765