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.
@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