Navaa,

you need query expansion for that.
E.g. if your query goes through dismax, you need to add the two field names to 
the qf parameter.
The nice thing is that qf can be:
  text^3.0 test.stemmed^2 text.phonetic^1
And thus exact matches are preferred to stemmed or phonetic matches.

This is configured in solrconfig.xml.
It's quite common to create your own query component to do more than just 
dismax for this.

hope it helps.

paul


Le 12 févr. 2014 à 14:22, Navaa <navnath.thomb...@xtremumsolutions.com> a écrit 
:

> Hi,
> I am using solr for searching phoneticly equivalent string
> my schema contains...
> <fieldType name="text_general_doubleMetaphone" class="solr.TextField"
> positionIncrementGap="100">
>               <analyzer type="index">
>                       <tokenizer class="solr.StandardTokenizerFactory" />
>                       <filter class="solr.PhoneticFilterFactory" 
> encoder="DoubleMetaphone"
> inject="true"/>
>                       <filter class="solr.LowerCaseFilterFactory"/> 
>               </analyzer>
>               <analyzer type="query">
>                       <tokenizer class="solr.StandardTokenizerFactory" />
>                       <filter class="solr.PhoneticFilterFactory" 
> encoder="DoubleMetaphone"
> inject="true"/>
>                       <filter class="solr.LowerCaseFilterFactory"/> 
>               </analyzer>
>     </fieldType>
> 
> and fields are
> 
> <field name="fname" type="text_general" indexed="true" stored="true"
> required="false" />
> <field name="fname_sound" type="text_general_doubleMetaphone" indexed="true"
> stored="true" required="false" />
>   <copyField source="fname" dest="fname_sound" />
> 
> 
> it works when i search stfn===> stephen, stephn 
> 
> But I am expecting stephn=====> stephen like 
> How I will get this result. m I doing something wrong
> 
> Thanks in advance
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Searching-phonetic-by-DoubleMetaphone-soundex-encoder-tp4116885.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to