On Thu, 5 Jan 2012 16:38:07 +0100, boyska <piuttosto at logorroici.org> 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. > > 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... > > 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, -- Thomas/Schnouki -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 489 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120105/3e931a97/attachment.pgp>