couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nolan Lawson (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COUCHDB-2224) 0 results when startkey==endkey and using startkey_docid/endkey_docid
Date Mon, 14 Apr 2014 17:22:15 GMT
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)

Mime
View raw message