The more I play with values the more I realize highlighting seems to have a 
bug.  It seems to do with tokenizing.

WILL match and highlight:
Query: TOKEN      Data:token
Query: SEARCH     Data:searching
Query: abcCR      Data: abcCR1428    (highlights abcCR)

WILL match and NOT highlight:
Query: abcCR1428   Data: abcCR1428

-----Original Message-----
From: Harsch, Timothy J. (ARC-TI)[PEROT SYSTEMS] 
[mailto:timothy.j.har...@nasa.gov] 
Sent: Wednesday, January 27, 2010 10:42 AM
To: solr-user@lucene.apache.org
Subject: doc with missing highlight info

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

Reply via email to