Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] [PATCH] xapian: add boolean terms with zero wdf
@ 2010-01-15  5:14 Rich Lane
  2010-01-23 12:43 ` William Morgan
  0 siblings, 1 reply; 2+ messages in thread
From: Rich Lane @ 2010-01-15  5:14 UTC (permalink / raw)
  To: sup-devel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sup-devel] [PATCH] xapian: add boolean terms with zero wdf
  2010-01-15  5:14 [sup-devel] [PATCH] xapian: add boolean terms with zero wdf Rich Lane
@ 2010-01-23 12:43 ` William Morgan
  0 siblings, 0 replies; 2+ messages in thread
From: William Morgan @ 2010-01-23 12:43 UTC (permalink / raw)
  To: sup-devel

Applied to master and will go out in 0.10. Thanks!
-- 
William <wmorgan-sup@masanjin.net>
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-23 12:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-15  5:14 [sup-devel] [PATCH] xapian: add boolean terms with zero wdf Rich Lane
2010-01-23 12:43 ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox