Hi gurus, 

I am having some issues with making the highlighting work properly. If I search 
for a word in a "title" field and request a highlighted summary from another 
"long_description" field, this works on some documents, but on some doesn't. 
Have you seen anything like this before?
 

Example (working): 

http://localhost:8983/solr/select?q=title:london&fl=sku,title,long_description&hl=true&hl.fl=long_description

<response>...
<lst name="highlighting">

<lst name="10262914">

<arr name="long_description">

<str>

, as the mysterious and unseen narrator, Robinson (voiced by Paul Scofield), 
takes viewers through one year in <em>London</em>
</str>
</arr>
</lst>
</lst>


Example (non-working):

http://localhost:8983/solr/select?q=title:terminator&fl=sku,title,long_description&hl=true&hl.fl=long_description

<response>...
<lst name="highlighting">

<lst name="10699058"/>
</lst>

 

Both terms exist in the title and long_description. long_description is also 
stored and indexed. Could it be the length of the term that is causing the 
issue? 

I've attached the 2 csv documents that I'm using and below are the relevant 
sections from schema.xml. I'm using solr release 1.4. Thanks!

Jan. 


---SCHEMA.XML relevant entries:


<field name="long_description" type="text" indexed="true" stored="true"/>


<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <!-- in this example, we will only use synonyms at query time
        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" 
ignoreCase="true" expand="false"/>
        <filter class="solr.StopFilterFactory"
                ignoreCase="true"
                words="stopwords.txt"
                enablePositionIncrements="true"
                />
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" 
generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" 
splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.SnowballPorterFilterFactory" language="English" 
protected="protwords.txt"/>
      </analyzer>
      <analyzer type="query">
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" 
ignoreCase="true" expand="true"/>
        <filter class="solr.StopFilterFactory"
                ignoreCase="true"
                words="stopwords.txt"
                enablePositionIncrements="true"
                />
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" 
generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" 
splitOnCaseChange="1"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.SnowballPorterFilterFactory" language="English" 
protected="protwords.txt"/>
      </analyzer>
</fieldType>


      

Reply via email to