[
https://issues.apache.org/jira/browse/LUCENE-8446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16568754#comment-16568754
]
David Smiley commented on LUCENE-8446:
--------------------------------------
I pulled these two changes out of LUCENE-8286 so they don't distract and in the
interest of making some piecemeal progress on that issue.
Admittedly there is no test in this patch but existing tests do no break, and
the current behavior for this edge case was not tested (i.e. how to handle this
scenario wasn't necessarily deliberate). Tests in LUCENE-8286 will depend on
this behavior so it'll be tested that way.
{noformat}
Old :<b>This is</b><b> the title</b><b> field</b>.
New :<b>This is the title field</b>.
{noformat}
(example taken from test in LUCENE-8286)
> UnifiedHighlighter DefaultPassageFormatter should merge overlapping offsets
> ---------------------------------------------------------------------------
>
> Key: LUCENE-8446
> URL: https://issues.apache.org/jira/browse/LUCENE-8446
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/highlighter
> Reporter: David Smiley
> Assignee: David Smiley
> Priority: Minor
> Attachments: LUCENE-8446.patch
>
>
> The UnifiedHighlighter's DefaultPassageFormatter (mostly unchanged from the
> old PostingsHighlighter) will format overlapping matches by closing a tag and
> immediately opening a tag. I think this is a bit ugly structurally and it
> ought to continue the tag is if the matches were merged. This is extremely
> rare in practice today since a match is always a word, and thus we'd only see
> this behavior if multiple words at the same position of different offsets are
> highlighted. The advent of matches representing phrases will increase the
> probability of this, and indeed was discovered while working on LUCENE-8286.
> Additionally, and related, OffsetsEnums should internally be ordered by the
> end offset if the start offset is the same.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]