lib/sup/ferret_index.rb in sup-0.9.1 vs lib/sup/ferret_index.rb in sup-0.10
- old
+ new
@@ -9,10 +9,12 @@
returning a new search string.
Variables:
subs: The string being searched.
EOS
+ def is_a_deprecated_ferret_index?; true end
+
def initialize dir=BASE_DIR
super
@index_mutex = Monitor.new
wsa = Ferret::Analysis::WhiteSpaceAnalyzer.new false
@@ -125,11 +127,14 @@
## so this allows people to forcibly update the address in the index by
## marking those threads for saving.
:from => (m.from ? m.from.indexable_content : ""),
:to => (m.to + m.cc + m.bcc).map { |x| x.indexable_content }.join(" "),
+ ## always overwrite :refs.
+ ## these might have changed due to manual thread joining.
+ :refs => (m.refs + m.replytos).uniq.join(" "),
+
:subject => (entry[:subject] || wrap_subj(Message.normalize_subj(m.subj))),
- :refs => (entry[:refs] || (m.refs + m.replytos).uniq.join(" ")),
}
@index_mutex.synchronize do
@index.delete m.id
@index.add_document d