Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3285

org.apache.jackrabbit.core.query.lucene.DefaultHighlighter.doHighlight doesn't hightlight matches correctly if full text query has multiple terms

    XMLWordPrintableJSON

    Details

      Description

      org.apache.jackrabbit.core.query.lucene.DefaultHighlighter: line 204-207
      It seems, that int index = 0; counter is not being reset in new iteration over the next array of termoffsets, which leads to the following consequences:
      All the occurrences of the first query term (in case there are several of them), except for the first on are being compared to offset of a last termoffset of the following terms.
      So some of matches are being skipped.

      Suggested fix: reset int index to zero inside the while loop on line 205

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mkonstantinov Maksim Konstantinov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: