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 A04ED429E31 for ; Thu, 5 Jan 2012 08:36:05 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1] 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 pM3bTb9SWU56 for ; Thu, 5 Jan 2012 08:36:02 -0800 (PST) Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222]) by olra.theworths.org (Postfix) with ESMTP id C6F2A429E27 for ; Thu, 5 Jan 2012 08:36:01 -0800 (PST) Received: from thor.loria.fr (thor.loria.fr [152.81.12.250]) by ks3536.kimsufi.com (Postfix) with ESMTPSA id CCF9A6A0026; Thu, 5 Jan 2012 17:35:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net; s=key-schnouki; t=1325781358; bh=fo2Uza2ck2z7Ue8J4q7RnOcySAQnVCBLUeXEwBhigFE=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Mj9BaQdyPxN7Q7iqg7ROeOxgEQYQs0sDsf4HV7iDV5zVT6KuLzjezrcU8qzxHLQdg IXnsJiTnTxEFtxBiJhFs3Yg381HHClYmfK5vLf3SGumnggCQCq630bWKYI0/JakyxN 7mXb1WVm/y/GwJMF6dt+ittu5x0qz+3urAyBO5Jc= From: Thomas Jost To: boyska , notmuch@notmuchmail.org Subject: Re: Info about notmuch database In-Reply-To: <20120105153748.GA13888@edge> References: <4e39a92bc2136f12ae6924e8878d5d1a@logorroici.org> <87fwfup4w9.fsf@thor.loria.fr> <20120105153748.GA13888@edge> User-Agent: Notmuch/0.10.2+178~g8a0a6dd (http://notmuchmail.org) Emacs/24.0.92.1 (x86_64-unknown-linux-gnu) Date: Thu, 05 Jan 2012 17:35:55 +0100 Message-ID: <87boqip0no.fsf@thor.loria.fr> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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: Thu, 05 Jan 2012 16:36:05 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, 5 Jan 2012 16:38:07 +0100, boyska wrote: > > There's a description of the DB "schema" in lib/database.cc in the > > notmuch source code. But you may also consider just using libnotmuch > > instead, if that's enough for what you want to do. >=20 > thanks, found it, much clearer now. > But I really can't understand why not just putting these things on a > separate file :) atomic consistency issues? I doubt it's for consistency (see commit 824dad76), more likely it's because people should use libnotmuch rather than directly hacking into the DB ;) > > Also: why Xapian? I'm already using something similar I wrote with > > Python, storing everything in a dictionary, using Pickle to save that to > > disk: 162 lines of code and 45 kb of data are enough to store my > > addressbook and have completion in Emacs... >=20 > dictionary approach is fine to manage a "manual" addressbook, where you > store addresses. But what I want is an _automatic_ addressbook, like the > lbdb one, which just indexes all seen emails. That's what my little script does too: index emails and how many times they appear in the DB so that completion shows more frequently used ones first. The indexing is done after running "notmuch new", when running my auto-tagging script. I'm too lazy to maintain a "manual" addressbook correctly :) > The grep approach is better from this point of view, but still not > advanced enough for me. > For example, I'd like to store "cooccorrences": if some email is used in > the same mail of some other, then it must contain a relationship; for > example, your email should be correlated to the notmuch mailinglist, > because you wrote to it. (they should be 0-weighted xapian term). Also, > I want to give more importance to email addresses which are frequently > seen, and much less to not-so-frequently seen. Xapian makes these really > easy, so the question is "why not using it?" ;) Nice ideas, and Xapian is probably a good choice for doing that kind of stuff :) Do you plan to use this addressbook with notmuch-address.el, or will it be a standalone program? Regards, =2D-=20 Thomas/Schnouki --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJPBdFrAAoJEMPdciX+bh5ISBMH/Aov1V4s1bEGpbC6MK6LHc4d ilRCSxW61n4e4vEaF/lZb52AK35CGBzFV/+UjwlJngR4RKvdexClKTk2EjypGxty vfv40WminEhSCmNVSh26+ebx/2ZAlVDC6/Lqmv4quRuDNXM2xthQzXlZ9ujcLb/O WMav/sQz8ZzDPXrMicDDEDvcKmXTfpUkmAfsNFArhe0gY4umyNcegRHxnOAMzb8M T1gaTc/RWvj3nW0iNOBmLmH/PJZq4vUvHedyXVJbZJTNwWEvEQL4JdhFsVbsLTqa gQs0nY2SNUF5O78mzNCNLmk8R3Ydb42YkFSm/ReyvB6/RvZGnMy0cg20t8ujSqI= =CAQE -----END PGP SIGNATURE----- --=-=-=--