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

PassageFormatter in PostingsHighlighter trunk the message returned

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1
    • Fix Version/s: 4.3, 6.0
    • Component/s: modules/highlighter
    • Labels:
      None
    • Environment:

      NA

    • Lucene Fields:
      New, Patch Available

      Description

      when I try to highlight the word zero [0] in the file : org\apache\lucene\search\postingshighlight\package.html

      the 2 last lines weren't return. There are 4 Passages :
      2-65
      277-434
      434-735
      735-968

      but the length of the file is 984.

      in the file : PassageFormatter.format(...)

      it should return all the original content with the words highlighted.

      PATCH

      need to add this at the end of the method

      // at line : 91 add this
      if(pos<content.length()){
      sb.append(content.substring(pos));
      }

      return sb.toString();

        Attachments

        1. BreakIteratorTest.java
          3 kB
          Sebastien Dionne
        2. LUCENE-4816.patch
          7 kB
          Robert Muir
        3. LUCENE-4816.patch
          7 kB
          Michael McCandless
        4. package.html
          0.9 kB
          Sebastien Dionne
        5. PassageFormatter.java
          3 kB
          Sebastien Dionne
        6. PassageFormatter-PATCH.java
          3 kB
          Sebastien Dionne
        7. WholeBreakIterator.java
          2 kB
          Michael McCandless

          Activity

            People

            • Assignee:
              mikemccand Michael McCandless
              Reporter:
              survivant Sebastien Dionne
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: