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

FastVectorHighlihgter fails with SIOOB if single phrase or term is > fragCharSize

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0, 4.1, 4.2, 3.6.2, 4.2.1
    • Fix Version/s: 4.3, 6.0
    • Component/s: modules/highlighter
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      This has been reported on several occasions like SOLR-4660 / SOLR-4137 or on the ES mailing list https://groups.google.com/d/msg/elasticsearch/IdyMSPK5gao/nKZq8_NYWmgJ

      The reason is that the current code expects the fragCharSize > matchLength which is not necessarily true if you use phrases or if you have very long terms like URLs or so. I have a test that reproduces the issue and a fix as far as I can tell (me doesn't have much experience with the highlighter.

        Attachments

        1. LUCENE-4899.patch
          16 kB
          Simon Willnauer
        2. LUCENE-4899.patch
          7 kB
          Simon Willnauer

          Issue Links

            Activity

              People

              • Assignee:
                simonw Simon Willnauer
                Reporter:
                simonw Simon Willnauer
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: