From: William Morgan Date: Mon, 25 Feb 2008 04:53:23 +0000 (-0800) Subject: only use the first 255 characters of a message id (ferret bug workaround) X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=b06a8dccf2572d3ac6b99bdb7519ff6e8b85c3f9;p=sup only use the first 255 characters of a message id (ferret bug workaround) Apparently, constructing a TermQuery object with a field value of more than 255 characters never successfully matches. This is not a good long-term solution. A good one would be to take the SHA1 of every message id instead. That will require an index rebuild, so I will save that patch until later. --- diff --git a/lib/sup/message.rb b/lib/sup/message.rb index c06a03f..6a2a9c4 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -148,7 +148,7 @@ class Message @source.fn_for_offset @source_info end - def sanitize_message_id mid; mid.gsub(/\s/, "") end + def sanitize_message_id mid; mid.gsub(/\s+/, "")[0..254] end def save index return unless @dirty