Lucene - Core
  1. Lucene - Core
  2. LUCENE-3697

FastVectorHighlighter SimpleBoundaryScanner does not work well when highlighting at the beginning of the text

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: modules/highlighter
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The SimpleBoundaryScanner still breaks text not based on characters provided when highlighting text that end up scanning to the beginning of the text to highlight. In this case, just use the start of the text as the offset.

      1. LUCENE-3697.patch
        2 kB
        Koji Sekiguchi
      2. LUCENE-3697.patch
        2 kB
        Shay Banon

        Activity

        Hide
        Shay Banon added a comment -

        Attached fix.

        Show
        Shay Banon added a comment - Attached fix.
        Hide
        Shay Banon added a comment -

        This causes the SimpleFragmentsBuilderTest#testMVSeparator to fail, because it has empty string fields which are separated by a custom separator. I think if you do that, the boundy config should include the separator character (not sure what the implications are to ignore empty strings). I can fix it to do so if the patch make sense.

        Show
        Shay Banon added a comment - This causes the SimpleFragmentsBuilderTest#testMVSeparator to fail, because it has empty string fields which are separated by a custom separator. I think if you do that, the boundy config should include the separator character (not sure what the implications are to ignore empty strings). I can fix it to do so if the patch make sense.
        Hide
        Koji Sekiguchi added a comment -

        Patch makes sense.

        This causes the SimpleFragmentsBuilderTest#testMVSeparator to fail, because it has empty string fields which are separated by a custom separator.

        Yes. I think that just fixing the expected string in #testMVSeparator is fine.

        Show
        Koji Sekiguchi added a comment - Patch makes sense. This causes the SimpleFragmentsBuilderTest#testMVSeparator to fail, because it has empty string fields which are separated by a custom separator. Yes. I think that just fixing the expected string in #testMVSeparator is fine.
        Hide
        Koji Sekiguchi added a comment -

        patch that just fixing the expected string in #testMVSeparator.

        Show
        Koji Sekiguchi added a comment - patch that just fixing the expected string in #testMVSeparator.
        Hide
        Koji Sekiguchi added a comment -

        trunk: Committed revision 1232769.
        3x: Committed revision 1232783.

        Show
        Koji Sekiguchi added a comment - trunk: Committed revision 1232769. 3x: Committed revision 1232783.

          People

          • Assignee:
            Koji Sekiguchi
            Reporter:
            Shay Banon
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development