CouchDB
  1. CouchDB
  2. COUCHDB-881

Support reduce=false for map-only views since it is just a no-op

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.0.2, 1.1
    • Component/s: HTTP Interface
    • Labels:
      None
    • Environment:

      Linux, OSX, Erlang R13B

    • Skill Level:
      Regular Contributors Level (Easy to Medium)

      Description

      Currently, a view with no reduce function defined disallows having a `reduce` parameter in the HTTP query.

      It would slightly simplify client code to always query views with reduce=false except when a reduction is actually desired. That way, views which have useful map-only and map-reduce output can be queried with the same reduce=false parameter. Currently, if one wants only the map results, one must know whether that view is map-only (reduce parameter should be omitted) or map-reduce (reduce parameter should be set to "false").

        Activity

        Hide
        Jason Smith added a comment -

        Patch 1/2, also in http://github.com/jhs/couchdb/tree/reduce_false, which simply adds a couple tests to make them more explicit/thorough.

        Show
        Jason Smith added a comment - Patch 1/2, also in http://github.com/jhs/couchdb/tree/reduce_false , which simply adds a couple tests to make them more explicit/thorough.
        Hide
        Jason Smith added a comment -

        Patch 2/2 which always permits reduce=false view queries.

        Show
        Jason Smith added a comment - Patch 2/2 which always permits reduce=false view queries.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jason Smith
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development