]> git.cworth.org Git - sup/commitdiff
index: remove unused method load_entry_for_id
authorRich Lane <rlane@club.cc.cmu.edu>
Sat, 20 Jun 2009 20:50:03 +0000 (13:50 -0700)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Wed, 24 Jun 2009 13:44:48 +0000 (09:44 -0400)
lib/sup/index.rb

index c331dec4061e9d03a98d49de7dfe986fb6ba8d6f..b65bbc5403a33f2ce468f8d5d11953899bb4b671 100644 (file)
@@ -411,17 +411,6 @@ EOS
 
   def delete id; @index_mutex.synchronize { @index.delete id } end
 
-  def load_entry_for_id mid
-    @index_mutex.synchronize do
-      results = @index.search Ferret::Search::TermQuery.new(:message_id, mid)
-      return if results.total_hits == 0
-      docid = results.hits[0].doc
-      entry = @index[docid]
-      entry_dup = entry.fields.inject({}) { |h, f| h[f] = entry[f]; h }
-      [docid, entry_dup]
-    end
-  end
-
   def load_contacts emails, h={}
     q = Ferret::Search::BooleanQuery.new true
     emails.each do |e|