]> git.notmuchmail.org Git - sup/commitdiff
better indexing
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 27 Dec 2006 17:59:31 +0000 (17:59 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 27 Dec 2006 17:59:31 +0000 (17:59 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@102 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/index.rb
lib/sup/message.rb

index e3211615a7a0d3ca9ab286986764683d2622e230..1513428516e4a5ca962855c8eb02a5bf45ed6a79 100644 (file)
@@ -25,7 +25,7 @@ class Index
     @dir = dir
     @sources = {}
     @sources_dirty = false
-    @qparser ||= Ferret::QueryParser.new :default_field => :body, :analyzer => Ferret::Analysis::WhiteSpaceAnalyzer.new
+    @qparser ||= Ferret::QueryParser.new :default_field => :body, :analyzer => Ferret::Analysis::WhiteSpaceAnalyzer.new(true)
 
     self.class.i_am_the_instance self
   end
index 7debda684d17bd13ccca30639ad1e5b8a7e67469..4cbb167ca7371cd4ecda866f483e0ea0fffa2fa6 100644 (file)
@@ -199,12 +199,12 @@ class Message
 
   def content
     [
-      from && from.longname,
-      to.map { |p| p.longname },
-      cc.map { |p| p.longname },
-      bcc.map { |p| p.longname },
+      from && (from.name + " " + from.email),
+      to.map { |p| p.name + " " + p.email },
+      cc.map { |p| p.name + " " + p.email },
+      bcc.map { |p| p.name + " " + p.email },
       to_chunks.select { |c| c.is_a? Text }.map { |c| c.lines },
-      subj,
+      Message.normalize_subj(subj),
     ].flatten.compact.join " "
   end