You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Rob Nikander <ro...@gmail.com> on 2014/08/25 18:41:38 UTC

Consistent colors from highlighter, multiple fields?

Hi,

I'm using FastVectorHighlighter, and I wanted to get highlights from
multiple fields that matched, so I called `highlighter.getBestFragment` for
each field. It returns null if it had nothing for that field.  The problem
is the colors don't match, so it looks confusing.  For example, I search
for "apple orange", and my HTML shows the term "apple" in green in the
field1, but red in the field2.

Any recommendations on how to fix this?

thanks,
Rob