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

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0, 4.1, 4.2, 3.6.2, 4.2.1
    • 4.3, 6.0
    • modules/highlighter
    • None
    • 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
          7 kB
          Simon Willnauer
        2. LUCENE-4899.patch
          16 kB
          Simon Willnauer

        Issue Links

          Activity

            People

              simonw Simon Willnauer
              simonw Simon Willnauer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: