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

UnifiedHighlighter should support the new Weight.matches API for better match accuracy

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: modules/highlighter
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The new Weight.matches() API should allow the UnifiedHighlighter to more accurately highlight some BooleanQuery patterns correctly – see LUCENE-7903.

      In addition, this API should make the job of highlighting easier, reducing the LOC and related complexities, especially the UH's PhraseHelper. Note: reducing/removing PhraseHelper is not a near-term goal since Weight.matches is experimental and incomplete, and perhaps we'll discover some gaps in flexibility/functionality.

      This issue should introduce a new UnifiedHighlighter.HighlightFlag enum option for this method of highlighting. Perhaps call it WEIGHT_MATCHES? Longer term it could go away and it'll be implied if you specify enum values for PHRASES & MULTI_TERM_QUERY?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dsmiley David Smiley
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m