You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Harsch, Timothy J. (ARC-TI)[PEROT SYSTEMS]" <ti...@nasa.gov> on 2010/01/27 19:42:17 UTC

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


Re: doc with missing highlight info

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
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/


RE: doc with missing highlight info (bug found?!?)

Posted by "Harsch, Timothy J. (ARC-TI)[PEROT SYSTEMS]" <ti...@nasa.gov>.
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.harsch@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