Hi Rajani,

Below is the configured in my schema.
<fieldType name="text_chinese" class="solr.TextField" 
positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.ChineseTokenizerFactory"/>        
        <filter class="solr.StopFilterFactory"  ignoreCase="true"  
words="stopwords.txt"   enablePositionIncrements="true" />
        <filter class="solr.ChineseFilterFactory" />
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.ChineseTokenizerFactory"/>
        <filter class="solr.ChineseFilterFactory" />
        <filter class="solr.StopFilterFactory" ignoreCase="true" 
words="stopwords.txt"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>

      </analyzer>
    </fieldType>

<field name="product_code" type="string" indexed="true" stored="false" 
multiValued="true" />

<field name="author_name" type="text_chinese" indexed="true" stored="false" 
multiValued="true"/>

<field name="author_name_string" type="string" indexed="true" stored="false" 
multiValued="true" />

<field name="simple" type="text_chinese" indexed="true" stored="false" 
multiValued="true" />

<copyField source="product_code" dest="simple" />

<copyField source="author_name" dest="author_name_string" />


if I search with the query q=simple:总评价 it works but doesn't work if I search 
with q=simple:676767667. If the field is defined as string the chinese 
character works but doesn't work if it is defined as text_chinese.

Regards,
Poornima





On Tuesday, 22 October 2013 7:52 PM, Rajani Maski <rajinima...@gmail.com> wrote:
 
Hi Poornima,

  Your statement :   "It works fine with the chinese strings but not working 
with product code or ISBN even though the fields are defined as string" is 
confusing. 

Did you mean that the product code and ISBN fields are of type text_Chinese?

Is it first or second:
<field name="product_code"type="string" indexed="true" stored="false"/>

or 

<field name="product_code" type="text_chinese" indexed="true" stored="false"/>


What do you refer to when you tell that it's not working? Unable to search?


















On Tue, Oct 22, 2013 at 6:09 PM, Poornima Jay <poornima...@rocketmail.com> 
wrote:

Hi,
>
>Did any one face a problem for chinese language in SOLR 3.6.1. Below is the 
>analyzer in the schema.xml file.
>
><fieldType name="text_chinese" class="solr.TextField" 
>positionIncrementGap="100">
>      <analyzer type="index">
>          <tokenizer class="solr.CJKTokenizerFactory"/>
>           <filter class="solr.StopFilterFactory" ignoreCase="true" 
>words="stopwords.txt" enablePositionIncrements="true"/>
>           <filter class="solr.ChineseFilterFactory" />
>          <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>
>      </analyzer>
>      <analyzer type="query">
>        <tokenizer class="solr.CJKTokenizerFactory"/>
>          <filter class="solr.ChineseFilterFactory" />
>          <filter class="solr.StopFilterFactory" ignoreCase="true" 
>words="stopwords.txt"/>
>          <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
>      </analyzer>
> </fieldType>
>
>It works fine with the chinese strings but not working with product code or 
>ISBN even though the fields are defined as string.
>
>Please let me know how should the chinese schema be configured.
>
>Thanks.
>Poornima
>

Reply via email to