0

SXA Search Component is not Working with Chinese language

We are able to index Chinese content in solr but its not working with SXA search component and always show zero results while search is working fine with other languages. Also we experience results are appearing if we search Chinese characters with space between them (Ex : 搜 索) while not working as a normal content without spaces (EX : 搜索)

We tried by adding "HMMChineseTokenizerFactory" tokenizer and ZH-CN dynamic field in solr schema file but still its not working.

<fieldType name="text_general_zh" class="solr.TextField" positionIncrementGap="100" multiValued="false">
    <analyzer type="index">
      <tokenizer class="org.apache.lucene.analysis.cn.smart.HMMChineseTokenizerFactory"/>
      <filter class="solr.StopFilterFactory" words="lang/stopwords_zh.txt" ignoreCase="true"/>
      <filter class="solr.PorterStemFilterFactory"/>
    </analyzer>
    <analyzer type="query">
        <tokenizer class="org.apache.lucene.analysis.cn.smart.HMMChineseTokenizerFactory" />
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_zh.txt" />
        <filter class="solr.PorterStemFilterFactory"/>
    </analyzer>
</fieldType> 

<dynamicField name="*_t_zh" type="text_general_zh" indexed="true" stored="true" />

Can anyone please help in this concern..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.