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

Highlighter throws StringIndexOutOfBoundsException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.9
    • Component/s: modules/highlighter
    • Labels:
      None
    • Environment:

      Found this running the example code in Solr (latest version).

    • Lucene Fields:
      New, Patch Available

      Description

      Using the canonical Solr example (ant run-example) I added this document (using exampledocs/post.sh):

      <add><doc>
      <field name="id">Test for Highlighting StringIndexOutOfBoundsExcdption</field>
      <field name="name">Some Name</field>
      <field name="manu">Acme, Inc.</field>
      <field name="features">Description of the features, mentioning various things</field>
      <field name="features">Features also is multivalued</field>
      <field name="popularity">6</field>
      <field name="inStock">true</field>
      </doc></add>

      and then the URL http://localhost:8983/solr/select/?q=features&hl=true&hl.fl=features caused the exception.

      I have a patch. I don't know if it is completely correct, but it avoids this exception.

        Attachments

        1. Lucene-1500-NewException.patch
          8 kB
          Mark Harwood
        2. Lucene-1500-NewException.patch
          7 kB
          Mark Harwood
        3. LUCENE-1500.patch
          1 kB
          Peter Wolanin
        4. patch.txt
          1 kB
          David Bowen

          Activity

            People

            • Assignee:
              markh Mark Harwood
              Reporter:
              dbowen David Bowen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: