i use this configuration to search data contain both English products and its equivalent in Chinese.
<fieldType name="text_synm" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.CJKTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonym.txt" ignoreCase="true" expand="false"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" splitOnNumerics="1" />
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.CJKTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonym.txt" ignoreCase="true" expand="false"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" splitOnNumerics="1" />
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
but when i search in chinese in solr admin it give me no result
i tried to use
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
instead of
<tokenizer class="solr.CJKTokenizerFactory"/>
but there is no result
i make sure that that the synonym.txt is utf-8 encode
any clue here?
i think any way i should edit the apach/conf/server.xml and add this
to the connector tag to be for example
also in the
i should add this
any way it did not work in my case may be cause my synonym.txt file is mixed between Chinese and english i hope some one find more advanced answer.