You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Nolan Lawson (JIRA)" <ji...@apache.org> on 2014/04/14 19:22:15 UTC

[jira] [Created] (COUCHDB-2224) 0 results when startkey==endkey and using startkey_docid/endkey_docid

Nolan Lawson created COUCHDB-2224:
-------------------------------------

             Summary: 0 results when startkey==endkey and using startkey_docid/endkey_docid
                 Key: COUCHDB-2224
                 URL: https://issues.apache.org/jira/browse/COUCHDB-2224
             Project: CouchDB
          Issue Type: Bug
      Security Level: public (Regular issues)
            Reporter: Nolan Lawson


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:

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

If you try to slice from 2 to 3 with

{code}
?startkey="b"&startkey_docid="2"&endkey="b"&endkey_docid="3"
{code}

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

[Pastebin to repro|http://pastebin.com/ufhuPU6L]
[Related PouchDB issue|https://github.com/pouchdb/pouchdb/issues/1397#issuecomment-40327882]




--
This message was sent by Atlassian JIRA
(v6.2#6252)