[jira] [Commented] (SOLR-10321) Unified highlighter returns empty fields when using glob

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SOLR-10321) Unified highlighter returns empty fields when using glob

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/SOLR-10321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15932832#comment-15932832 ]

David Smiley commented on SOLR-10321:
-------------------------------------

Ah; ok.  Solving this would be a bit tricky due to the division of responsibility between the UnifiedHighlighter (Lucene) and UnifiedSolrHighlighter.  We would need to shim in an intermediate StoredVieldVisitor to track which fields are seen vs not at all, and store it on Solr's UH subclass instance.  That doesn't seem worth it to me, especially just for wildcards in "hl.fl".

What might make sense (to me) is a new boolean option to have UnifiedSolrHighlighter omit returning empty-string highlights altogether.  Although enabling that would conceal the distinction of the inability to find any snippet from stored text, vs not having any stored text to even highlight.  I dunno.

I assume this is just a minor nuisance for you Markus?

> Unified highlighter returns empty fields when using glob
> --------------------------------------------------------
>
>                 Key: SOLR-10321
>                 URL: https://issues.apache.org/jira/browse/SOLR-10321
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public)
>          Components: highlighter
>    Affects Versions: 6.4.2
>            Reporter: Markus Jelsma
>            Priority: Minor
>             Fix For: master (7.0)
>
>
> {code}
> q=lama&hl.method=unified&hl.fl=content_*
> {code}
> returns:
> {code}
>   <lst name="http://www.nu.nl/weekend/3771311/dalai-lama-inspireert-westen.html">
>     <arr name="content_en"/>
>     <arr name="content_nl">
>       <str>Nobelprijs Voorafgaand aan zijn bezoek aan Nederland is de dalai &lt;em&gt;lama&lt;/em&gt; in Noorwegen om te vieren dat 25 jaar geleden de Nobelprijs voor de Vrede aan hem werd toegekend. Anders dan in Nederland wordt de dalai &lt;em&gt;lama&lt;/em&gt; niet ontvangen in het Noorse parlement. </str>
>     </arr>
>     <arr name="content_general"/>
>     <arr name="content_de"/>
>     <arr name="content_fr"/>
>     <arr name="content_es"/>
>     <arr name="content_pt"/>
>     <arr name="content_ja"/>
>     <arr name="content_zh-cn"/>
>     <arr name="content_th"/>
>     <arr name="content_ar"/>
>   </lst>
> {code}
> FastVector and original do not emit:
> {code}
>     <arr name="content_de"/>
>     <arr name="content_fr"/>
>     <arr name="content_es"/>
>     <arr name="content_pt"/>
>     <arr name="content_ja"/>
>     <arr name="content_zh-cn"/>
>     <arr name="content_th"/>
>     <arr name="content_ar"/>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]