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

Highlighting AnalyzingInfixSuggester skips non-highlighted key

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 4.10
    • 4.10.3, 5.0, 6.0
    • modules/other
    • New

    Description

      when setting 'doHighlight' to true at AnalyzingInfixSuggester.lookup(..), both the key and the highlightKey inside the returned lookupresult are set to the highlighted string. See at AnalyzingInfixSuggester.createResults, line 530:
      if (doHighlight)

      { Object highlightKey = highlight(text, matchedTokens, prefixToken); result = new LookupResult(highlightKey.toString(), highlightKey, score, payload, contexts); }

      else

      { result = new LookupResult(text, score, payload, contexts); }

      As I understand, the key should'nt be highlighted in any case, only the highlightKey.

      Attachments

        1. LUCENE-6004.patch
          23 kB
          jane chang

        Issue Links

          Activity

            People

              mikemccand Michael McCandless
              reuschling Christian Reuschling
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 5m
                  5m
                  Remaining:
                  Remaining Estimate - 5m
                  5m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified