Did you try mergeContiguous yet and see if it produced what you wanted?

> On May 20, 2022, at 8:19 AM, Endika Posadas <endikas...@gmail.com> wrote:
> 
> Hi all,
> 
> I am using Solr's Unified highlighter to highlight parts of a text block.
> However, I have noticed that the highlighter, instead of highlighting the
> whole phrase, highlights the words separately.
> 
> For example, if we search for "hello world" it will highlight <b>hello</b>
> <b>world</b>. Both words are highlighted, so it's barely noticeable.
> 
> On the other hand, if we phrase search for "hello world" and the text
> contains 'hello to the world' (where 'to' and 'the' are stop words), it
> will highlight <b>hello</b> to the <b>world</b>. This can be a bit
> confusing and we would like to highlight the whole phrase instead <b>hello
> to the world</b>.
> 
> Is there a way to highlight so that the whole matched phrase gets
> highlighted instead of the individual words?
> 
> Thanks

Reply via email to