Unified highlighter- unable to get results - can get results with original and termvector highlighters

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Unified highlighter- unable to get results - can get results with original and termvector highlighters

Warren, David [USA]
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

Reply | Threaded
Open this post in threaded view
|

Re: Unified highlighter- unable to get results - can get results with original and termvector highlighters

david.w.smiley@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] <[hidden email]>
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
>
>