Lucene’s unified highlighter will concatenate all the snippets into one string by default. For example if we have a multivalued field with:
Applying a unified highlighter to it will result in:
While using other highlighter types, or if using the Elasticsearch backend, the result will be:
To get Lucene’s unified highlighter to behave in the same way, we’d need to have our custom implementation of both PassageFormatter and FieldHighlighter Alternatively, we might end up simply exposing the ellipsis parameter of the DefaultPassageFormatter to the users through Lucene-specific unified highlighter DSL. |