What are you actually trying to do on a business level? Because this
feels like an "XY Problem":
https://people.apache.org/~hossman/#xyproblem

Solr will generate MetaPhone during indexing, then during Query and
will do the matching. It's not clear why you actually want to get
those codes back to outside of Solr.

Regards,
   Alex.
----
Sign up for my Solr resources newsletter at http://www.solr-start.com/


On 22 January 2015 at 09:24, Amit Jha <shanuu....@gmail.com> wrote:
> Hi,
>
> I need to know how can I retrieve phonetic codes. Does solr provide it as
> part of result? I need codes for record matching.
>
> *following is schema fragment:*
>
> <fieldtype name="phonetic" stored="true" indexed="true"
> class="solr.TextField" >
>       <analyzer type="index">
>         <tokenizer class="solr.StandardTokenizerFactory"/>
>         <filter class="solr.DoubleMetaphoneFilterFactory" inject="true"
> maxCodeLength="4"/>
>       </analyzer>
>     </fieldtype>
>
>  <field name="firstname" type="text_general" indexed="true" stored="true"/>
>   <field name="firstname_phonetic" type="phonetic" />
>   <field name="lastname_phonetic" type="phonetic" />
>   <field name="lastname" type="text_general" indexed="true" stored="true"/>
>
> <copyField source="lastname" dest="lastname_phonetic"/>
>  <copyField source="firstname" dest="firstname_phonetic"/>
>
> Hi,
>
> Thanks for response, I can see generated MetaPhone codes using Luke. I am
> using solr only because it creates the phonetic code at time of indexing.
> Otherwise for each record I need to call Metaphone algorithm in realtime to
> get the codes and compare them. I think when luke can read and display it,
> why can't solr?

Reply via email to