{"action":"opened","issue":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/4920","repository_url":"https://api.github.com/repos/pouchdb/pouchdb","labels_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/4920/labels{/name}","comments_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/4920/comments","events_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/4920/events","html_url":"https://github.com/pouchdb/pouchdb/issues/4920","id":135493549,"number":4920,"title":"Add startkey and endkey info when descending is true","user":{"login":"lordgreg","id":480546,"avatar_url":"https://avatars.githubusercontent.com/u/480546?v=3","gravatar_id":"","url":"https://api.github.com/users/lordgreg","html_url":"https://github.com/lordgreg","followers_url":"https://api.github.com/users/lordgreg/followers","following_url":"https://api.github.com/users/lordgreg/following{/other_user}","gists_url":"https://api.github.com/users/lordgreg/gists{/gist_id}","starred_url":"https://api.github.com/users/lordgreg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordgreg/subscriptions","organizations_url":"https://api.github.com/users/lordgreg/orgs","repos_url":"https://api.github.com/users/lordgreg/repos","events_url":"https://api.github.com/users/lordgreg/events{/privacy}","received_events_url":"https://api.github.com/users/lordgreg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-22T17:58:45Z","updated_at":"2016-02-22T17:58:45Z","closed_at":null,"body":"Hi.\r\n\r\nI've just realized, after few days, that... \r\n\r\n1. when using id prefix search\r\n```\r\n      opts.startkey = 'test';\r\n      opts.endkey = 'test\\\\uffff';\r\n```\r\n\r\n2. and trying to use \r\n```\r\nopts.descending = true;\r\n```\r\n\r\nYou will get empty array. I just found an [SO](http://stackoverflow.com/questions/30952341/pouchdb-startkey-endkey-not-returning-docs) question with answer, if using startkey & endkey with combination of descending parameter, you should switch startkey and endkey, so that startkey becomes endkey and vice versa.\r\n\r\nPlease add this info into documentation for future reference or users, who'd like documents returned  or add automatically startkey and endkey reversing mehanism inside PouchDB.\r\n\r\n:+1: "}}