Ivan Erceg created COUCHDB-2190: ----------------------------------- Summary: Allow "skip" to be negative Key: COUCHDB-2190 URL: https://issues.apache.org/jira/browse/COUCHDB-2190 Project: CouchDB Issue Type: Improvement Security Level: public (Regular issues) Components: HTTP Interface Reporter: Ivan Erceg
I propose to allow "skip" to be a negative value in order to minimise the number of requests and/or the amount of data that has to be retrieved. An example: I have a key for a reduce and I want to find the next and the previous keys in a single request. If "skip" was allowed to be negative I could make a query with skip -1 and limit +3 thus retrieving the previous, the current and the next keys. I for one can't think of an alternative solution (though I'm a relative newbie in CouchDb) that would allow to do this in a single request. Considering how skip works (if I understand it correctly), there shouldn't be any technical impediment to search the B-tree for the given key, take one (or more) steps back (in the same way we take them forward for skip > 0) and then retrieve the data from there. -- This message was sent by Atlassian JIRA (v6.2#6252)