Harsch, Timothy J. (ARC-TI)[PEROT SYSTEMS] wrote:
Hi,
I have a query where the query matches the document but no highlighting info is returned.
Why? Normally, highlighting returns correctly. This query is different from others in
that it uses a phrase like "CR1428-Occ1"
Field:
<field name="destSpan" type="text" indexed="true"
stored="true" termVectors="true" termPositions="true" termOffsets="true"
/>
query:
http://localhost:8080/solr/select?q=destSpan%3A%28%22CR1428-Occ2%22%29&fl=destSpan&hl=true&hl.fl=destSpan
results:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
<lst name="params">
<str name="fl">destSpan</str>
<str name="q">destSpan:("CR1428-Occ2")</str>
<str name="hl.fl">destSpan</str>
<str name="hl">true</str>
</lst>
</lst>
<result name="response" numFound="1" start="0">
<doc>
<str name="destSpan"> CR1428-Occ2 abcCR1428 ...</str>
</doc>
</result>
<lst name="highlighting">
<lst name="6de31965cda3612c0932a4ea51aba23f8c666c7f"/>
</lst>
</response>
Tim Harsch
Sr. Software Engineer
Dell Perot Systems
Which Solr version are you using? If trunk, you are using
FastVectorHighlighter
because destSpan is termVectors/termPositions/termOffsets are on. If so,
you can use (traditional) Highlighter explicitly by specifying
hl.useHighlighter=true:
http://wiki.apache.org/solr/HighlightingParameters#hl.useHighlighter
If you are using FVH, can you give me info of <fieldType name="text"/>?
Thanks,
Koji
--
http://www.rondhuit.com/en/