I got the answer to my question.
The field needs to be "stored" (or "termVector" enabled) for highlighting to
work properly.
Cheers
Avlesh
On Fri, Sep 25, 2009 at 1:01 PM, Avlesh Singh wrote:
> I am new to the whole highlighting API and have a few basic questions:
> I have a "text" type field defined as underneath:
>
>
>
> ignoreCase="true" expand="false"/>
> words="stopwords.txt"/>
> generateWordParts="1" generateNumberParts="1" catenateWords="1"
> catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
>
> protected="protwords.txt"/>
>
>
>
>
> ignoreCase="true" expand="true"/>
> words="stopwords.txt"/>
> generateWordParts="1" generateNumberParts="1" catenateWords="0"
> catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
>
> protected="protwords.txt"/>
>
>
>
>
> And the schema field is associated as follows:
>
>
> My query, q=text_entity_name:(foo bar)&hl=true&hl.fl=text_entity_name
> work fine for the search part but not for highlighting. The highlight named
> list is empty for each document returned back.
>
> I have a unique key defined. What am I missing? Do I need to store term
> vectors for highlighting to work properly?
>
> Cheers
> Avlesh
>