Thank you adam, but sadly that wasn't the question. Let me try to rephrase it:
Say my view contains following data: "keyA" - "valueA" "keyB" - "valueB" "keyC" - "valueB" ["keyA","keyB"] - "some other data" if i query the view with key*s*=["keyA", ["keyA","keyB"]] couchdb returns: rows: [{ key: "keyA", value: "valueA" }, { key: "["keyA","keyB"]", value: "some other data" }] if i query the same view with key*s*=[["keyA","keyB"], "keyA"] couchdb returns: rows: [{ key: "["keyA","keyB"]", value: "some other data" }, { key: "keyA", value: "valueA" }] so the result rows are in the same order of the queried multiple keys. I have to "reduce" the view result in my application logic, so i want to know if i can rely on that behavior. regards, Stefan 2015-08-24 15:59 GMT+02:00 Adam Kocoloski <kocol...@apache.org>: > Yes, that’s the defined behavior, and it will persist in 2.x. You need to > take this into account when you write your map function; e.g. if you > `emit([“keyB”, “keyA”], “value);` and then query for [“keyA”,”keyB”] you > will not get a match. Regards, > > Adam > > > On Aug 22, 2015, at 8:02 AM, Stefan Klein <st.fankl...@gmail.com> wrote: > > > > Hi CouchDB users, > > > > when I query a view with keys=["keyA", "keyB"] the returnd rows also > > list the matches for "keyA" first, then matches for "keyB". If i query > > with ["keyB","keyA"] the results reflects this and lists matches for > > "keyB" first. > > This is for my local couchdb 1.6.1. > > Is this behaviour guaranteed for 1.6.1? > > Will it also be guaranteed for 2.x? > > Or does couchdb just happen to behave so on my installation? > > > > thanks, > > Stefan > > > >