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 Dmitry Kan <dm...@gmail.com> on 2011/09/14 08:54:54 UTC

solr 1.4 highlighting issue

Hello list,

Not sure how many of you are still using solr 1.4 in production, but here is
an issue with highlighting, that we've noticed:

The query is:

(drill AND ships) OR rigs


Excerpt from the highlighting list:

<arr name="Contents">
<str>
Within the fleet of 27 floating &lt;em>rigs&lt;/em> (semisubmersibles and
drillships) are 21 deepwater &lt;em>drilling&lt;/em>
</str>
</arr>
</lst>



Why did solr highlight "drilling" even though there is no "ships" in the
text?

*
*--
Regards,

Dmitry Kan

Re: solr 1.4 highlighting issue

Posted by Dmitry Kan <dm...@gmail.com>.
Koji,

This looks strange to me, because I would assume, that highlighter also
applies boolean logic same way as a query parser. In this way of thinking
"drilling" should be highlighted if "ships" occurred together in the same
document. Which wasn't the case in the example.

Dmitry

On Wed, Sep 14, 2011 at 2:20 PM, Koji Sekiguchi <ko...@r.email.ne.jp> wrote:

> (11/09/14 15:54), Dmitry Kan wrote:
>
>> Hello list,
>>
>> Not sure how many of you are still using solr 1.4 in production, but here
>> is
>> an issue with highlighting, that we've noticed:
>>
>> The query is:
>>
>> (drill AND ships) OR rigs
>>
>>
>> Excerpt from the highlighting list:
>>
>> <arr name="Contents">
>> <str>
>> Within the fleet of 27 floating&lt;em>rigs&lt;/em>  (semisubmersibles and
>> drillships) are 21 deepwater&lt;em>drilling&lt;/**em>
>> </str>
>> </arr>
>> </lst>
>>
>>
>>
>> Why did solr highlight "drilling" even though there is no "ships" in the
>> text?
>>
>>
> Dmitry,
>
> This is expected, even if you use the latest version of Solr.
>
> You got the document because rigs was hit in the document, but then
> Highlighter
> tries to search individual terms of the query in the document again.
>
> koji
> --
> Check out "Query Log Visualizer" for Apache Solr
> http://www.rondhuit-demo.com/**loganalyzer/loganalyzer.html<http://www.rondhuit-demo.com/loganalyzer/loganalyzer.html>
> http://www.rondhuit.com/en/
>



-- 
Regards,

Dmitry Kan

Re: solr 1.4 highlighting issue

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(11/09/14 15:54), Dmitry Kan wrote:
> Hello list,
>
> Not sure how many of you are still using solr 1.4 in production, but here is
> an issue with highlighting, that we've noticed:
>
> The query is:
>
> (drill AND ships) OR rigs
>
>
> Excerpt from the highlighting list:
>
> <arr name="Contents">
> <str>
> Within the fleet of 27 floating&lt;em>rigs&lt;/em>  (semisubmersibles and
> drillships) are 21 deepwater&lt;em>drilling&lt;/em>
> </str>
> </arr>
> </lst>
>
>
>
> Why did solr highlight "drilling" even though there is no "ships" in the
> text?
>

Dmitry,

This is expected, even if you use the latest version of Solr.

You got the document because rigs was hit in the document, but then Highlighter
tries to search individual terms of the query in the document again.

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

Re: solr 1.4 highlighting issue

Posted by Dmitry Kan <dm...@gmail.com>.
Hi Mike,

Actually, the example I gave is the document in this case. So there was no
"ships", only "drilling".

Dmitry

On Wed, Sep 14, 2011 at 1:59 PM, Michael Sokolov <so...@ifactory.com>wrote:

> The highlighter gives you snippets of text surrounding words (terms) drawn
> from the query.  The whole document should satisfy the query (ie it probably
> has ships/s somewhere else in it), but each snippet won't generally have all
> the terms.
>
> -Mike
>
>
> On 9/14/2011 2:54 AM, Dmitry Kan wrote:
>
>> Hello list,
>>
>> Not sure how many of you are still using solr 1.4 in production, but here
>> is
>> an issue with highlighting, that we've noticed:
>>
>> The query is:
>>
>> (drill AND ships) OR rigs
>>
>>
>> Excerpt from the highlighting list:
>>
>> <arr name="Contents">
>> <str>
>> Within the fleet of 27 floating&lt;em>rigs&lt;/em>  (semisubmersibles and
>> drillships) are 21 deepwater&lt;em>drilling&lt;/**em>
>> </str>
>> </arr>
>> </lst>
>>
>>
>>
>> Why did solr highlight "drilling" even though there is no "ships" in the
>> text?
>>
>> *
>> *--
>> Regards,
>>
>> Dmitry Kan
>>
>>
>


-- 
Regards,

Dmitry Kan

Re: solr 1.4 highlighting issue

Posted by Michael Sokolov <so...@ifactory.com>.
The highlighter gives you snippets of text surrounding words (terms) 
drawn from the query.  The whole document should satisfy the query (ie 
it probably has ships/s somewhere else in it), but each snippet won't 
generally have all the terms.

-Mike

On 9/14/2011 2:54 AM, Dmitry Kan wrote:
> Hello list,
>
> Not sure how many of you are still using solr 1.4 in production, but here is
> an issue with highlighting, that we've noticed:
>
> The query is:
>
> (drill AND ships) OR rigs
>
>
> Excerpt from the highlighting list:
>
> <arr name="Contents">
> <str>
> Within the fleet of 27 floating&lt;em>rigs&lt;/em>  (semisubmersibles and
> drillships) are 21 deepwater&lt;em>drilling&lt;/em>
> </str>
> </arr>
> </lst>
>
>
>
> Why did solr highlight "drilling" even though there is no "ships" in the
> text?
>
> *
> *--
> Regards,
>
> Dmitry Kan
>