I am using the following defines and query, and  want to hightlight of the 
"title" and "body" elements of HTML documents.

FieldTypes defines:
=============
    <fieldType name="text_ja" class="solr.TextField" positionIncrementGap="100" 
 autoGeneratePhraseQueries="true">
      <analyzer type="index">
        <tokenizer class="solr.GosenTokenizerFactory"/>
      </analyzer>
    </fieldType>

    <fieldType name="text_ja_bigram" class="solr.TextField" 
positionIncrementGap="100" autoGeneratePhraseQueries="true">
      <analyzer>
        <tokenizer class="solr.CJKTokenizerFactory"/>
      </analyzer>
    </fieldType>
=============

Field defines:
=============
   <field name="title" type="text_ja" indexed="true" stored="true" 
multiValued="true"/>
   <field name="body" type="text_ja" indexed="true" stored="true" 
multiValued="true"/>
   <field name="title_bigram" type="text_ja_bigram" indexed="true" 
stored="true" multiValued="true"/>
   <field name="body_bigram" type="text_ja_bigram" indexed="true" stored="true" 
multiValued="true"/>
    <copyField source="title"     dest="title_bigram"/>
    <copyField source="body"     dest="body_bigram"/>
=============

Query: 
=============
q=foo&defType=edismax&qf=title^2+title_bigram^2+body+body_bigram
=============

If I set the hl.fl of highlightcomponent as  "title" and "body", the result of 
bigram (CJKTokenizer) cannot be highlighted.

Regards,

Qiao HU


-----Original Message-----
From: Erick Erickson [mailto:erickerick...@gmail.com]
Sent: Saturday, September 15, 2012 10:06 PM
To: solr-user@lucene.apache.org
Subject: Re: highlighting of text field in Japanese

I'm not quite sure I follow (and I know nothing about how the highlighter works 
with Japanese).

But, you don't highlight fieldTypes, you highlight individual fields and it's 
just a comma (or space) separated list. You can set these either on the URL or 
in the solrconfig.xml file for your particular request handler, see the 
"/browse" handler for an example.

If that doesn't help, show us the field definitions and what you've tried....

Best
Erick

On Fri, Sep 14, 2012 at 2:18 AM,  <chau...@sunmoretec.co.jp> wrote:
> Hi,
>
> I am very new for Solr.
> I am using edismax that combines two fieldTypes of CJKTokenizer and 
> GosenTokenizer to query for japanese  text.
> but do not how to set the hl.fl of highlightcomponent for the two fieldTypes 
> with the same  contents.
> Could you guys offer me some advice please?
>
> Regards,
>
> Qiao HU


Reply via email to