From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.117.16 with SMTP id p16cs557265agc; Fri, 23 Oct 2009 04:58:32 -0700 (PDT) Received: by 10.224.3.204 with SMTP id 12mr5324224qao.70.1256299111788; Fri, 23 Oct 2009 04:58:31 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 2si7990617qwi.32.2009.10.23.04.58.31; Fri, 23 Oct 2009 04:58:31 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 845DB3C8045; Fri, 23 Oct 2009 07:58:31 -0400 (EDT) Received: from sam.mediasupervision.de (sam.mediasupervision.de [80.152.3.104]) by rubyforge.org (Postfix) with ESMTP id 79D9D158805C for ; Fri, 23 Oct 2009 07:48:32 -0400 (EDT) Received: from localhost (sam.mediasupervision.de [127.0.0.1]) by sam.mediasupervision.de (Postfix) with ESMTP id 04B04485C3D for ; Fri, 23 Oct 2009 13:48:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at sam.mediasupervision.de Received: from sam.mediasupervision.de ([127.0.0.1]) by localhost (sam.mediasupervision.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W7aCquMOLu2L for ; Fri, 23 Oct 2009 13:48:31 +0200 (CEST) Received: by sam.mediasupervision.de (Postfix, from userid 1000) id D446F485C70; Fri, 23 Oct 2009 13:48:31 +0200 (CEST) From: Gregor Hoffleit To: sup-talk Date: Fri, 23 Oct 2009 13:48:31 +0200 Message-Id: <1256297205-sup-683@sam.mediasupervision.de> User-Agent: Sup/git Subject: [sup-talk] A fix for the joining threads bug with Ferret X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org I did a little bit research regarding the problem that joining threads isn't persistent (as described in [1]-[3]). I managed to track down the problem until the following line in FerretIndex#sync_message in lib/sup/ferret_index.rb. d = { ... :refs => (entry[:refs] || (m.refs + m.replytos).uniq.join(" ")) } I have problems to understand what this line is supposed to do. For me, it always evaluates to "entry[:refs]" (even if that's an empty string!), losing the reference in the modified message m, which was added by add_ref. Therefore the manual join is always lost. With my limited Ruby knowledge, my quick and dirty fix was: if entry[:refs]!="" then d[:refs]=entry[:refs] else d[:refs]=(m.refs + m.replytos).uniq.join(" ") end Is this what the above code is about? Btw, the code in xapian_index.rb looks much different. Still, I'd like to see this fixed for Xapian. Regards, Gregor Hoffleit [1] http://sup.rubyforge.org/ditz/issue-4e501973cea5bd1f28739ae4cea98edce8249895.html [2] http://rubyforge.org/pipermail/sup-talk/2009-April/002050.html [3] http://rubyforge.org/pipermail/sup-talk/2009-April/002060.html _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk