From: Gregor Hoffleit <gregor@hoffleit.de>
To: sup-talk <sup-talk@rubyforge.org>
Subject: [sup-talk] A fix for the joining threads bug with Ferret
Date: Fri, 23 Oct 2009 13:48:31 +0200 [thread overview]
Message-ID: <1256297205-sup-683@sam.mediasupervision.de> (raw)
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
next reply other threads:[~2009-10-23 11:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 11:48 Gregor Hoffleit [this message]
2009-10-23 13:15 ` Tero Tilus
2009-11-01 22:57 ` 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=1256297205-sup-683@sam.mediasupervision.de \
--to=gregor@hoffleit.de \
--cc=sup-talk@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