lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Krupansky <jack.krupan...@gmail.com>
Subject Re: Retrieving Phonetic Code as result
Date Fri, 23 Jan 2015 20:24:10 GMT
That's phone the filter is doing - transforming text into phonetic codes at
index time. And at query time as well to do the phonetic matching in the
query. The actual phonetic codes are stored in the index for the purposes
of query matching.

-- Jack Krupansky

On Fri, Jan 23, 2015 at 12:57 PM, Amit Jha <shanuu.jha@gmail.com> wrote:

> Can I extend solr to add phonetic codes at time of indexing as uuid field
> getting added. Because I want to preprocess the metaphone code because I
> calculate the code on runtime will give me some performance hit.
>
> Rgds
> AJ
>
> > On Jan 23, 2015, at 5:37 PM, Jack Krupansky <jack.krupansky@gmail.com>
> wrote:
> >
> > Your app can use the field analysis API (FieldAnalysisRequestHandler) to
> > query Solr for what the resulting field values are for each filter in the
> > analysis chain for a given input string. This is what the Solr Admin UI
> > Analysis web page uses.
> >
> > See:
> >
> http://lucene.apache.org/solr/4_10_2/solr-core/org/apache/solr/handler/FieldAnalysisRequestHandler.html
> > and in solrconfig.xml
> >
> >
> > -- Jack Krupansky
> >
> >> On Thu, Jan 22, 2015 at 8:42 AM, Amit Jha <shanuu.jha@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"/>
> >>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message