You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Navaa <na...@xtremumsolutions.com> on 2014/02/12 06:59:33 UTC
Phonetic search on multiple fields
Hi,
I am beginner of solr,
I am trying to implement phonetic search in my application
my code in schema.xml for fieldType
<fieldType name="text_general" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.WordDelimiterFilterFactory"
splitOnCaseChange="1" splitOnNumerics="0"
generateWordParts="1" stemEnglishPossessive="0"
generateNumberParts="0"
catenateWords="1" catenateNumbers="0" catenateAll="0"
preserveOriginal="1"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
And ....
<fieldType name="text_general_phonetic" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.WordDelimiterFilterFactory"
splitOnCaseChange="1" splitOnNumerics="0"
generateWordParts="1" stemEnglishPossessive="0"
generateNumberParts="0"
catenateWords="1" catenateNumbers="0" catenateAll="0"
preserveOriginal="1"/>
<filter class="solr.BeiderMorseFilterFactory" nameType="GENERIC"
ruleType="APPROX" concat="true" languageSet="auto"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
AND field definition
<field name="fname" type="text_general" indexed="true" stored="true"
required="false" multiValued="false"/>
<field name="fname_copy" type="text_general_phonetic" indexed="true"
stored="true" required="false" />
<copyfield source="fname" dest="fname_copy"/>
when I am search stephen, stifn will gives me stephen but it wont works...
Also if how can I use phonetic filter with DoubleMetaphone encoder..
Please help me
Thanks in Advance.
--
View this message in context: http://lucene.472066.n3.nabble.com/Phonetic-search-on-multiple-fields-tp4116826.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Phonetic search on multiple fields
Posted by Gora Mohanty <go...@mimirtech.com>.
Hi,
You should ask this question in the solr-user list that
can be subscribed to from the same page as for this one:
https://lucene.apache.org/solr/discussion.html
The dev list is meant for discussions related to development
of Solr.
Regards,
Gora
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org