0

I wish to index email ids in SOLR but somehow it doesnt work.
My search has two parts. Auto suggest and text search.
Auto suggest works just fine when I use

<analyzer type="index">
  <tokenizer class="solr.LowerCaseTokenizerFactory"/>
  <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="15" side="front"/>
</analyzer>
<analyzer type="query">
    <tokenizer class="solr.LowerCaseTokenizerFactory"/>
</analyzer>

but the when i search for an email id that is unique it gives multiple results. For e.g. sameer.rao@xyz.com is the entry
input: sameer.rao
output:

sameer1.rao
sameer.rao1
sameer.rao

Please help!

I have tried using standard tokenizer, but it only searches the phrases separated by delimiters. I also want to implement auto suggest which would return results on partial search. sample: ankarao.ka

must return ankarao.kale ankarao.kate The field names i have used are

I am then copying email id to the remaining fields. The description of field types is given below.


2 Answers2

0

I think you are using text as field type for email id, instand of text use string as field type for email in your schema.xml file.

Reason why you should use string is here :

see this post

Community
  • 1
  • 1
Keval
  • 1,857
  • 16
  • 26
0

I think this is due to the tokenizer you are using EdgeNGram, which will stem your indexed results for a more fuzzy search, just like what you are getting back for similar results. Have you tried using the regular standard tokenizer? Like this:

<analyzer type="index">
                <tokenizer class="solr.StandardTokenizerFactory"/>
</analyzer>
<analyzer type="query">
            <tokenizer class="solr.StandardTokenizerFactory"/>
</analyzer>
Jorge Lazo
  • 388
  • 7
  • 18
  • I have tried using standard tokenizer, but it only searches the phrases separated by delimiters. I also want to implement auto suggest which would return results on partial search. – user2818151 Mar 25 '15 at 07:50
  • Have updated the question with details of all the field types i am using. – user2818151 Mar 25 '15 at 07:59