Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8121

UnifiedHighlighter can highlight terms within SpanNear clauses at unmatched positions

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 7.3
    • modules/highlighter
    • None
    • New

    Description

      The UnifiedHighlighter (and original Highlighter) highlight phrases by converting to a SpanQuery and using the Spans start and end positions to assume that every occurrence of the underlying terms between those positions are to be highlighted. But this is inaccurate; see LUCENE-5455 for a good example, and also LUCENE-2287. The solution is to use the SpanCollector API which was introduced after the phrase matching aspects of those highlighters were developed.

      Attachments

        1. LUCENE-2287_UH_SpanCollector.patch
          54 kB
          David Smiley
        2. LUCENE-2287_UH_SpanCollector.patch
          87 kB
          David Smiley

        Issue Links

          Activity

            People

              dsmiley David Smiley
              dsmiley David Smiley
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: