CouchDB
  1. CouchDB
  2. COUCHDB-357

group_level fails for multi-key reduce view

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 0.9.1
    • Component/s: HTTP Interface
    • Labels:
      None

      Description

      If you try and execute a multi-key reduce view with a group_level param, could returns a query parser error with message '"Multi-key fetchs for reduce view must include `group=true`". The error persists if you add that param. The problem appears to be that couch_httpd_view.erl is only checking for 'exact' grouping, not an integer level. Attaching a patch; thanks to Paul Davis for the direction...

      1. issue-357.patch
        1 kB
        Mark Hammond

        Issue Links

          Activity

          Hide
          Mark Hammond added a comment -

          testcase and patch

          Show
          Mark Hammond added a comment - testcase and patch
          Hide
          Mark Hammond added a comment -

          I also meant to change the error message to be less misleading when group_level was supplied - something like "Multi-key fetchs for reduce view must include `group=true` or a `group_level`"

          Show
          Mark Hammond added a comment - I also meant to change the error message to be less misleading when group_level was supplied - something like "Multi-key fetchs for reduce view must include `group=true` or a `group_level`"
          Hide
          Paul Joseph Davis added a comment -

          Given the set of keys: [1, 0] [1, 1] [1, 2] and a group_level=1 then we'd need to provide the equivalent of key=[1] but this will fail during reduction because startkey=[1]&endkey=[1] (the equivalent of specifying key=[1]) will select no keys.

          Show
          Paul Joseph Davis added a comment - Given the set of keys: [1, 0] [1, 1] [1, 2] and a group_level=1 then we'd need to provide the equivalent of key= [1] but this will fail during reduction because startkey= [1] &endkey= [1] (the equivalent of specifying key= [1] ) will select no keys.
          Hide
          Sam Bisbee added a comment -

          Resolved as not fixing a while ago with no push back. Closing.

          Show
          Sam Bisbee added a comment - Resolved as not fixing a while ago with no push back. Closing.

            People

            • Assignee:
              Paul Joseph Davis
              Reporter:
              Mark Hammond
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development