Lucene - Core
  1. Lucene - Core
  2. LUCENE-2603

FastVectorHighlighter: add a method to set an arbitrary char that is used when concatenating multiValued data

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.9.3, 3.0.2
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: modules/highlighter
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      If the following multiValued names are in authors field:

      • Michael McCandless
      • Erik Hatcher
      • Otis Gospodnetić

      Since FragmentsBuilder concatenates multiValued data with a space in BaseFragmentsBuilder.getFragmentSource():

      while( buffer.length() < endOffset && index[0] < values.length ){
        if( index[0] > 0 && values[index[0]].isTokenized() && values[index[0]].stringValue().length() > 0 )
          buffer.append( ' ' );
        buffer.append( values[index[0]++].stringValue() );
      }
      

      an entire field snippet (using LUCENE-2464) will be "Michael McCandless Erik Hatcher Otis Gospodnetić". There is a requirement an arbitrary char (e.g. '/') can be set so that client can separate the snippet easily. i.e. "Michael McCandless/Erik Hatcher/Otis Gospodnetić"

      1. LUCENE-2603.patch
        4 kB
        Koji Sekiguchi
      2. LUCENE-2603.patch
        3 kB
        Koji Sekiguchi

        Activity

        Hide
        Koji Sekiguchi added a comment -

        Updated patch attached. I'll commit shortly.

        Show
        Koji Sekiguchi added a comment - Updated patch attached. I'll commit shortly.
        Hide
        Koji Sekiguchi added a comment -

        trunk: Committed revision 986173.
        branch_3x: Committed revision 986175.

        Show
        Koji Sekiguchi added a comment - trunk: Committed revision 986173. branch_3x: Committed revision 986175.
        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development