(11/11/22 22:30), VladislavLysov wrote:
Hello!!!
   I have a trouble with Solr highlighting. I have any document with next
fields- "TYPE", "DBID" and others. When i do next request -
https://localhost:8443/solr/myCore/afts?wt=standard&q=TYPE:
https://localhost:8443/solr/myCore/afts?wt=standard&q=TYPE:"cm:content"&indent=on&hl=true&hl.fl=DBID&hl.usePhraseHighlighter=true&fl=DBID
it was returned next text:
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">3</int>
</lst>
<result name="response" numFound="166" start="0">
<doc>
<arr name="DBID">
<str>892</str>
</arr>
</doc>
<doc>
</result>
<lst name="highlighting">
<lst name="LEAF-892"/>
</lst>
</response>
What is problem?
Thank you!

What term are you trying to highlight? You queried "cm:content" on TYPE field 
and
commanded to highlight the term on DBID field. But seems that DBID field 
includes
only 892, highlighter cannot create any highlighted snippets.

With Solr 3.5 (now RC2 available) or trunk version of Solr, you can use hl.q 
parameter
for highlighting query.

http://wiki.apache.org/solr/HighlightingParameters#hl.q

koji
--
Check out "Query Log Visualizer" for Apache Solr
http://www.rondhuit-demo.com/loganalyzer/loganalyzer.html
http://www.rondhuit.com/en/

Reply via email to