Awesome Email Analzyer?

102 views
Skip to first unread message

Chris Marisic

unread,
May 4, 2012, 10:35:03 AM5/4/12
to rav...@googlegroups.com
Does anyone know of an awesome Email analyzer for Lucene?

I really have to imagine someone has already created an email analyzer that given the email "bi...@mcrosoft.com" would create the following terms: bi...@microsoft.com, microsoft.com, bill, microsoft I'd hate to end up reinvent the wheel by creating a hand rolled analyzer for this.

Oren Eini (Ayende Rahien)

unread,
May 4, 2012, 10:38:54 AM5/4/12
to rav...@googlegroups.com
Email = new[] {doc.Email, doc.Email.Split('@') }

Chris Marisic

unread,
May 4, 2012, 11:40:40 AM5/4/12
to rav...@googlegroups.com
Hmm, hadn't thought about just generating the terms i want myself like that!

Nick

unread,
Sep 11, 2012, 2:22:41 PM9/11/12
to rav...@googlegroups.com
But:

1. I have to write this in my index map:
      Email = new object[] {user.Email, user.Email.Split('@') } // without the "object[]" it does not compile
2. Email becomes an array of strings and I can't query it with Where(x => x.Email = "m...@domain.com")

Note: I have a Reduce part in my index.

Chris Marisic

unread,
Sep 11, 2012, 2:34:18 PM9/11/12
to rav...@googlegroups.com
I'm pretty sure you want to do

Where(x=> x.Email.In(searchterm))

Nick

unread,
Sep 11, 2012, 2:57:39 PM9/11/12
to rav...@googlegroups.com
ok, but when I have my query results and I want to display result.Email, I don't get the original email since this is now an array of terms...

Chris Marisic

unread,
Sep 11, 2012, 3:27:16 PM9/11/12
to rav...@googlegroups.com
In that case you want to have in your map more like

Email = user.Email
EmailTerms =  new object[] {user.Email, user.Email.Split('@') }
Reply all
Reply to author
Forward
Message has been deleted
0 new messages