lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramanathapuram, Rajesh" <Rajesh.Ramanathapu...@turner.com>
Subject Solr - Multi Term highlighting issue
Date Wed, 20 Apr 2011 13:43:03 GMT
Hello,

I am dealing with a highlighting issue in SOLR, I will try to explain
the issue.

When I search for a single term in solr, it wraps <em> tag around the
words I want to highlight, all works well.
But if I search multiple term, for most part highlighting works good and
then for some of the terms, 
the highlight return multiple terms in a sing <em> tag     ...
<em>srchtrm1) <br><b><p>.... srchtrm2</em>
I expect solr to return highlight terms like    ... <em>srchtrm1</em>)
<br><b><p>... <em>srchtrm2</em>

When I search for 'US mec chile', here is how my result appears 
  ... Corboba. (<em>MEC)</b></p><p></p><p><b>CHILE</em>/FOREST
FIRES: We
had ... with <em>US</em> and <em>Chile</em> ...,
  (<em>MEC)</b></p><p></p><p><b>US</em>  ....

This is what I was expecting it to be 
  ... Corboba. (<em>MEC</em>)</b></p><p></p><p><b><em>CHILE</em>/FOREST
FIRES: We had ... with <em>US</em> and <em>Chile</em> ...,
(<em>MEC</em>)</b></p><p></p><p><b><em>US</em>
....

Here is my query params 
- <response>
- <lst name="responseHeader">
  <int name="status">0</int> 
  <int name="QTime">26</int> 
- <lst name="params">
     <str name="hl.fragsize">100000</str> 
     <str name="explainOther" /> 
     <str name="indent">on</str> 
     <str name="hl.fl">story, slug</str> 
     <str name="wt">standard</str> 
     <str name="hl">on</str> 
     <str name="rows">10</str> 
     <str name="version">2.2</str> 
     <str name="hl.highlightMultiTerm">true</str> 
     <str name="fl">*</str> 
     <str name="start">0</str> 
     <str name="q">mec us chile</str> 
     <str name="qt">standard</str> 
     <str name="hl.usePhraseHighlighter">true</str> 
     <str name="fq">storyid="XXXX XXXX XXXXX"</str> 
  </lst>
  </lst>

Here are some other links I found in the forum, but no real conclusion
 
http://www.lucidimagination.com/search/document/ac64e4f0abb6e4fc/solr_hi
ghlighting_question#78163c42a67cb533 
   
I am going to try this patch, which also had no conclusive results
   https://issues.apache.org/jira/browse/SOLR-1394 

Has anyone come across this issue?
Any suggestions on how to fix this issue is much appreciated.


thanks & regards,
Rajesh Ramana 

Mime
View raw message