From: Rich Lane <rlane@club.cc.cmu.edu>
To: sup-devel@rubyforge.org
Subject: [sup-devel] [PATCH] xapian: add boolean terms with zero wdf
Date: Thu, 14 Jan 2010 21:14:29 -0800 [thread overview]
Message-ID: <1263532469-30760-1-git-send-email-rlane@club.cc.cmu.edu> (raw)
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
next reply other threads:[~2010-01-15 5:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 5:14 Rich Lane [this message]
2010-01-23 12:43 ` William Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1263532469-30760-1-git-send-email-rlane@club.cc.cmu.edu \
--to=rlane@club.cc.cmu.edu \
--cc=sup-devel@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox