From b06a8dccf2572d3ac6b99bdb7519ff6e8b85c3f9 Mon Sep 17 00:00:00 2001 From: William Morgan Date: Sun, 24 Feb 2008 20:53:23 -0800 Subject: [PATCH] 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. --- lib/sup/message.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.45.2