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

Highlighting AnalyzingInfixSuggester skips non-highlighted key

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 4.10
    • Fix Version/s: 4.10.3, 5.0, 6.0
    • Component/s: modules/other
    • Labels:
    • Lucene Fields:
      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

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                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