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

0 results when startkey==endkey and using startkey_docid/endkey_docid

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None
    • None

    Description

      When startkey and endkey are the same, then it's treated as equivalent to key, so other parameters are ignored. This creates surprising results when trying to slice a list of docs with the same key, e.g. say the results are:

      {"id":"2","key":"b","value":null},
      {"id":"3","key":"b","value":null},
      {"id":"4","key":"b","value":null}
      

      If you try to slice from 2 to 3 with

      ?startkey="b"&startkey_docid="2"&endkey="b"&endkey_docid="3"
      

      ...then you get 0 results instead of 2.

      Pastebin to repro
      Related PouchDB issue

      Attachments

        Activity

          People

            Unassigned Unassigned
            nolanlawson Nolan Lawson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: