Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12499

Add reduce operation to merge field values

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 7.3.1
    • None
    • streaming expressions
    • None

    Description

      It would be nice to have a reduce operation that lets you collect the values of a field from the group of tuples into an array.

      Something that transforms
      
      {
       "k1": "1",
       "k2": ["a", "b"]
      },
      {
       "k1": "2",
       "k2": ["c", "d"]
      },
      {
       "k1": "2",
       "k2": ["e", "f"]
      }
      
      into
      
      {
       "k1": "1",
       "k2": ["a", "b"]
      },
      {
       "k1": "2",
       "k2": ["c", "d", "e", "f"]
      }
      

      and

      {
       "k1": "1",
       "k2": "a"
      },
      {
       "k1": "2",
       "k2": "b"
      },
      {
       "k1": "2",
       "k2": "c"
      }
      
      into
      
      {
       "k1": "1",
       "k2": ["a"]
      },
      {
       "k1": "2",
       "k2": ["b", "c"]
      }
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            cspitzlay Christian Spitzlay
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: