lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject Re: Retrieving Phonetic Code as result
Date Thu, 22 Jan 2015 14:07:39 GMT
On 1/22/2015 6:42 AM, Amit Jha wrote:
> 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"/>

The indexed data (which would include the phonetic transformation) is
never returned in results.  The returned results are ALWAYS the original
values, unaffected by analysis.

If the field does not have docValues enabled (yours does not), then the
indexed values are available in facets ... but there is no way to see
the direct relationship between facet values and individual documents.

For the most flexibility with seeing index contents, you could make a
copy of your index directory and load it into a separate program -- Luke.

https://github.com/DmitryKey/luke/releases/tag/luke-4.10.1

You can also enable the debugQuery parameter on a query to see how the
score is calculated, which does include some information about indexed
values.  It takes time and a fair amount of experience to read the debug
data successfully, and a query with debug is noticeably slower than without.

One last bit of information:  If you know what the stored value is, you
use that value on the Analysis page in the Solr admin UI and see what
the final indexed terms (tokens) are.

Thanks,
Shawn


Mime
View raw message