Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4137

FastVectorHighlighter: StringIndexOutOfBoundsException in BaseFragmentsBuilder

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.1, 4.0, 4.1, 4.2, 4.2.1
    • Fix Version/s: 4.3
    • Component/s: highlighter
    • Labels:
      None

      Description

      under some circumstances the BaseFragmentsBuilder genereates a StringIndexOutOfBoundsException inside the makeFragment method.
      The starting offset is higher than the end offset.

      I did a small patch checking the offsets and posted it over there at Stackoverflow: http://stackoverflow.com/questions/12456448/solr-highlight-bug-with-usefastvectorhighlighter

      The code in 4.0 seems to be the same as in 3.6.1

      Example how to reproduce the behaviour:
      There is a word called "www.DAKgesundAktivBonus.de" inside the index. If you search for "dak bonus" some offset calculations went wrong.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                simonw Simon Willnauer
                Reporter:
                mschel Marcel
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: