From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.213.7.146 with SMTP id d18cs206105ebd; Thu, 14 Jan 2010 21:23:51 -0800 (PST) Received: by 10.224.65.211 with SMTP id k19mr1923415qai.293.1263533030875; Thu, 14 Jan 2010 21:23:50 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 4si3826006qwe.45.2010.01.14.21.23.50; Thu, 14 Jan 2010 21:23:50 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-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-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 2086515B8030; Fri, 15 Jan 2010 00:23:50 -0500 (EST) Received: from magnesium.club.cc.cmu.edu (MAGNESIUM.CLUB.CC.cmu.edu [128.237.157.15]) by rubyforge.org (Postfix) with ESMTP id 24E3015B8030 for ; Fri, 15 Jan 2010 00:15:15 -0500 (EST) Received: (qmail 6488 invoked from network); 15 Jan 2010 05:15:10 -0000 Received: from pion.club.cc.cmu.edu (HELO localhost.localdomain) (128.237.157.88) by magnesium.club.cc.cmu.edu with SMTP; 15 Jan 2010 05:15:10 -0000 From: Rich Lane To: sup-devel@rubyforge.org Date: Thu, 14 Jan 2010 21:14:29 -0800 Message-Id: <1263532469-30760-1-git-send-email-rlane@club.cc.cmu.edu> X-Mailer: git-send-email 1.6.3.3 Subject: [sup-devel] [PATCH] xapian: add boolean terms with zero wdf X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion 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-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org Xapian's Flint backend stores the document length in every posting, so if the document length is changed (by adding a label, for example), every posting entry needs to be rewritten. This basically nullifies the performance improvement from the Xapian bug 250 fix. We can prevent this by adding these terms with 0 within-document-frequency so that their addition or removal doesn't change the document length. This is the analog to notmuch commit ccf2e0cc. --- lib/sup/xapian_index.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb index c81dca4..99d7c0e 100644 --- a/lib/sup/xapian_index.rb +++ b/lib/sup/xapian_index.rb @@ -590,7 +590,7 @@ class Xapian::Document alias old_add_term add_term def add_term term if term.length <= Redwood::XapianIndex::MAX_TERM_LENGTH - old_add_term term + old_add_term term, 0 else warn "dropping excessively long term #{term}" end -- 1.6.3.3 _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel