Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Lucene currently includes a WholeBreakIterator used to highlight entire fields using the postings highlighter, without breaking their content into sentences.

      I would like to contribute a CustomSeparatorBreakIterator that breaks when a custom char separator is found in the text. This can be used for instance when wanting to highlight entire fields, value per value. One can subclass PostingsHighlighter and have getMultiValueSeparator return a control character, like U+0000 , then use the custom break iterator to break on U+0000 so that one snippet per value will be generated.

      1. LUCENE-6485.patch
        13 kB
        Luca Cavanna

        Activity

        Hide
        Luca Cavanna added a comment -

        Patch attached

        Show
        Luca Cavanna added a comment - Patch attached
        Hide
        ASF subversion and git services added a comment -

        Commit 1682114 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1682114 ]

        LUCENE-6485: Add CustomSeparatorBreakIterator

        Show
        ASF subversion and git services added a comment - Commit 1682114 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1682114 ] LUCENE-6485 : Add CustomSeparatorBreakIterator
        Hide
        ASF subversion and git services added a comment -

        Commit 1682115 from Robert Muir in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1682115 ]

        LUCENE-6485: Add CustomSeparatorBreakIterator

        Show
        ASF subversion and git services added a comment - Commit 1682115 from Robert Muir in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1682115 ] LUCENE-6485 : Add CustomSeparatorBreakIterator
        Hide
        Robert Muir added a comment -

        Thanks Luca! This is a nice alternative to WholeBreakIterator.

        Show
        Robert Muir added a comment - Thanks Luca! This is a nice alternative to WholeBreakIterator.
        Hide
        Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

        Show
        Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

          People

          • Assignee:
            Unassigned
            Reporter:
            Luca Cavanna
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development