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 "Warren, David [USA]" <wa...@bah.com> on 2020/05/11 14:46:25 UTC
Unified highlighter- unable to get results - can get results with
original and termvector highlighters
I am running Solr 8.4 and am attempting to use its highlighting feature. It appears to work well when I use the original highlighter or the term vector highlighter, but when I try to use the unified highlighter, I get no results returned. My Google searches so far have not revealed anybody having this same problem (perhaps user error on my part), hence why I’m asking a question to the Solr mailing list.
I am running a query which searches the “title_text” field for a term and highlights it.
The configuration for title_text is this:
<field name="title_text" type="text_en" indexed="true" stored="true" multiValued="true" termVectors="true"/>
The query looks like this:
https://solr-server/index/c1/select?hl.fl=title_text&hl.method=unified&hl=true&q= title_text%3Azelda
If hl.method=original or hl.method=termvector, I get back results in the highlighting section with “Zelda” surrounded by <em> tags.
If hl.method=unified, all results in the highlighting section are blank.
I’ve attached a remote debugger to my Solr server and verified that the unified highlighter class (org/apache/solr/highlight/UnifiedSolrHighlighter.java) is being invoked when I set hl.method=unified. And I do not see any errors in the Solr logs.
Any idea what I’m doing wrong? In looking at the Solr highlighting documentation, I didn’t see any additional configuration which needs to be done to get the unified highlighter to work.
I realize I have not provided a bunch of information here, but obviously can provide more if needed.
Thank you,
David Warren
Booz | Allen | Hamilton
703-625-0311 mobile
Re: Unified highlighter- unable to get results - can get results with
original and termvector highlighters
Posted by David Smiley <da...@gmail.com>.
Hello,
Did you get it to work eventually?
Try setting hl.weightMatches=false and see if that helps. Wether this
helps or not, I'd like to have a deeper understanding of the internal
structure of the Query (not the original query string). What query parser
are you using?. If you pass debug=query to Solr then you'll get a a parsed
version of the query that would be helpful to me.
~ David
On Mon, May 11, 2020 at 10:46 AM Warren, David [USA] <wa...@bah.com>
wrote:
> I am running Solr 8.4 and am attempting to use its highlighting feature.
> It appears to work well when I use the original highlighter or the term
> vector highlighter, but when I try to use the unified highlighter, I get no
> results returned. My Google searches so far have not revealed anybody
> having this same problem (perhaps user error on my part), hence why I’m
> asking a question to the Solr mailing list.
>
> I am running a query which searches the “title_text” field for a term and
> highlights it.
> The configuration for title_text is this:
> <field name="title_text" type="text_en" indexed="true" stored="true"
> multiValued="true" termVectors="true"/>
>
> The query looks like this:
>
> https://solr-server/index/c1/select?hl.fl=title_text&hl.method=unified&hl=true&q=
> title_text%3Azelda
>
> If hl.method=original or hl.method=termvector, I get back results in the
> highlighting section with “Zelda” surrounded by <em> tags.
> If hl.method=unified, all results in the highlighting section are blank.
>
> I’ve attached a remote debugger to my Solr server and verified that the
> unified highlighter class
> (org/apache/solr/highlight/UnifiedSolrHighlighter.java) is being invoked
> when I set hl.method=unified. And I do not see any errors in the Solr logs.
>
> Any idea what I’m doing wrong? In looking at the Solr highlighting
> documentation, I didn’t see any additional configuration which needs to be
> done to get the unified highlighter to work.
>
> I realize I have not provided a bunch of information here, but obviously
> can provide more if needed.
>
> Thank you,
> David Warren
> Booz | Allen | Hamilton
> 703-625-0311 mobile
>
>