From 8224e1e94a02e0ed6bc5d34b655ad2c19ae5eb29 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Mon, 2 Jun 2014 15:15:39 +0100 Subject: [PATCH] Re: Deduplication ? --- 52/795a2c05f5100239b572d0c1be08441e12443b | 128 ++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 52/795a2c05f5100239b572d0c1be08441e12443b diff --git a/52/795a2c05f5100239b572d0c1be08441e12443b b/52/795a2c05f5100239b572d0c1be08441e12443b new file mode 100644 index 000000000..0559552ef --- /dev/null +++ b/52/795a2c05f5100239b572d0c1be08441e12443b @@ -0,0 +1,128 @@ +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 156A6431FAE + for ; Mon, 2 Jun 2014 07:16:11 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.502 +X-Spam-Level: +X-Spam-Status: No, score=0.502 tagged_above=-999 required=5 + tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, + NML_ADSP_CUSTOM_MED=1.2, 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 7txZm2rNfGDf for ; + Mon, 2 Jun 2014 07:16:03 -0700 (PDT) +Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 12370431FAF + for ; Mon, 2 Jun 2014 07:16:03 -0700 (PDT) +Received: from smtp.qmul.ac.uk ([138.37.6.40]) + by mail2.qmul.ac.uk with esmtp (Exim 4.71) + (envelope-from ) + id 1WrT1s-0002Vu-WA; Mon, 02 Jun 2014 15:16:01 +0100 +Received: from 5751dfa2.skybroadband.com ([87.81.223.162] helo=localhost) + by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) + (envelope-from ) + id 1WrT1Y-0002Tt-NA; Mon, 02 Jun 2014 15:15:40 +0100 +From: Mark Walters +To: Vladimir Marek , + David Edmondson +Subject: Re: Deduplication ? +In-Reply-To: <871tv7s8q1.fsf@qmul.ac.uk> +References: <20140602123212.GA12639@virt.cz.oracle.com> + + <20140602135438.GA8223@virt.cz.oracle.com> + <871tv7s8q1.fsf@qmul.ac.uk> +User-Agent: Notmuch/0.15.2+615~g78e3a93 (http://notmuchmail.org) Emacs/23.4.1 + (i486-pc-linux-gnu) +Date: Mon, 02 Jun 2014 15:15:39 +0100 +Message-ID: <87y4xfqtx0.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Sender-Host-Address: 87.81.223.162 +X-QM-Geographic: According to ripencc, + this message was delivered by a machine in Britain (UK) (GB). +X-QM-SPAM-Info: Sender has good ham record. :) +X-QM-Body-MD5: d72e9e3fbebffda3be071f659bc3c751 (of first 20000 bytes) +X-SpamAssassin-Score: -0.1 +X-SpamAssassin-SpamBar: / +X-SpamAssassin-Report: The QM spam filters have analysed this message to + determine if it is + spam. We require at least 5.0 points to mark a message as spam. + This message scored -0.1 points. + Summary of the scoring: + * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail + provider * (markwalters1009[at]gmail.com) + * -0.1 AWL AWL: From: address is in the auto white-list +X-QM-Scan-Virus: ClamAV says the message is clean +Cc: notmuch@notmuchmail.org +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: Mon, 02 Jun 2014 14:16:11 -0000 + + + +Mark Walters writes: + +> Vladimir Marek writes: +> +>>> > I want to import bigger chunk of archived messages into my notmuch +>>> > database. It's about 100k messages. The problem is, that I most probably +>>> > have quite a lot of those messages in the DB. Basically I would like to +>>> > add only those I don't have already. +>>> > +>>> > There are two possibilities +>>> > +>>> > a) I will add all the 100k messages and then remove the duplicities. +>>> > +>>> > b) I will write a script which will parse the message ID's of the +>>> > to-be-added messages and try to match them to the notmuch DB. Adding +>>> > only files I can't find already. +>>> > +>>> > Ad b) might be better option, but I started to play with the idea of +>>> > deduplication. I'm thinking about listing all the message IDs stored in +>>> > DB, listing all files belonging to the IDs and deleting all but one. +>>> > Also I'm thinking about implementing some simple algorithm telling me +>>> > whether the messages are really very similar. Just to be sure I don't +>>> > delete something I don't want to. +>>> > +>>> > Was anyone playing with the idea? +>>> +>>> notsync[1] used the (lack of) existence of a message id in the store to +>>> decide whether to add something from an IMAP server, but it is old, +>>> crufty, unused and unloved code. +>> +>> I see, that's close to my b) solution, thanks! +> +> Did you mean a) here? The idea was to add them all first and then run +> this script to delete the duplicates. +> + +Sorry: out of order arrival times and lack of care on my part. Sorry! + +MW + +> Best wishes +> +> Mark +> +>> -- +>> Vlad +>> _______________________________________________ +>> notmuch mailing list +>> notmuch@notmuchmail.org +>> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2