Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Rich Lane <rlane@club.cc.cmu.edu>
To: sup-devel@rubyforge.org
Subject: [sup-devel] [PATCH 2/4] index email addresses as text
Date: Sat, 16 Jan 2010 12:03:05 -0800	[thread overview]
Message-ID: <1263672187-5174-2-git-send-email-rlane@club.cc.cmu.edu> (raw)
In-Reply-To: <1263672187-5174-1-git-send-email-rlane@club.cc.cmu.edu>

This lets you search for an email address (or its component parts, since it's
indexed as a phrase) with no prefix.
---
 lib/sup/xapian_index.rb |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb
index c0b2f9f..6fa6c55 100644
--- a/lib/sup/xapian_index.rb
+++ b/lib/sup/xapian_index.rb
@@ -278,7 +278,8 @@ EOS
     'to_name' => 'TN',
     'name' => %w(FN TN),
     'attachment' => 'A',
-    '' => %w(S B FN TN A),
+    'email_text' => 'E',
+    '' => %w(S B FN TN A E),
   }
 
   # Unstemmed
@@ -459,6 +460,7 @@ EOS
     person_termer = lambda do |d|
       lambda do |p|
         doc.index_text p.name, PREFIX["#{d}_name"] if p.name
+        doc.index_text p.email, PREFIX['email_text']
         doc.add_term mkterm(:email, d, p.email)
       end
     end
-- 
1.6.5.2

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


  reply	other threads:[~2010-01-16 20:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-16 20:03 [sup-devel] [PATCH 1/4] dont index redundant data Rich Lane
2010-01-16 20:03 ` Rich Lane [this message]
2010-01-16 20:03   ` [sup-devel] [PATCH 3/4] id query prefix synonym for msgid Rich Lane
2010-01-16 20:03     ` [sup-devel] [PATCH 4/4] trivial index format upgrade Rich Lane
2010-01-23 12:49 ` [sup-devel] [PATCH 1/4] dont index redundant data William Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1263672187-5174-2-git-send-email-rlane@club.cc.cmu.edu \
    --to=rlane@club.cc.cmu.edu \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox