Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-2523

CouchDB 2.0: Specifying startkey/endkey parameters alongside a keys parameter when querying /_all_docs should be invalid

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Database Core
    • None

    Description

      CouchDB 1.X validates that the combination of query parameters to _all_docs is valid. For instance, you cannot specify keys and also startkey/endkey:

      curl -g -XGET 'http://127.0.0.1:5984/testdb/_all_docs?keys=["a"]&startkey="a"' 
      {"error":"query_parse_error","reason":"`keys` is incompatible with `key`, `start_key` and `end_key`"}
      

      In CouchDB 2.0, there is no such validation:

      curl -g -XGET 'http://127.0.0.1:15984/testdb/_all_docs?keys=["a"]&startkey="a"'
      {"total_rows":5,"rows":[
      {"id":"a","key":"a","value":{"rev":"1-4c6114c65e295552ab1019e2b046b10e"}}
      ]}
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            wilhol Will Holley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: