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

UnifiedHighlighter doesn't handle some AutomatonQuery's with multi-byte chars

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 7.0
    • modules/highlighter
    • None
    • New

    Description

      In MultiTermHighlighting, a CharacterRunAutomaton is being created that takes the result of AutomatonQuery.getAutomaton that in turn is byte oriented, not character oriented. For ASCII terms, this is safe but it's not for multi-byte characters. This is most likely going to rear it's head with a WildcardQuery, but due to special casing in MultiTermHighlighting, PrefixQuery isn't affected. Nonetheless it'd be nice to get a general fix in so that MultiTermHighlighting can remove special cases for PrefixQuery and TermRangeQuery (both subclass AutomatonQuery).

      AFAICT, this bug was likely in the PostingsHighlighter since inception.

      Attachments

        1. LUCENE_7719.patch
          20 kB
          David Smiley

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment