I use keys in my multiview client, I just add keys as normal, e.g. /demo/_design/query/_view/data?startkey="val1"&endkey="val2"&reduce=false
in the json document views array that I post to the multiview. I build this document in javascript so I escape the " for the keys e.g. "/demo/_design/query/_view/data?startkey=\"val1\"&endkey=\"val2\"&reduce=false" Norman On Thu, Aug 19, 2010 at 4:17 AM, JRad <[email protected]> wrote: > I could successfully run your test and also my own test with empty views. > I'll try extensive tests and make you informed of the results. > My only remaining question is about view parameters, How can I send > startkey, endkey, startkeydocId for each of my views? > > Thank you Norman, > > On Wed, Aug 18, 2010 at 11:50 PM, Norman Barker <[email protected]> > wrote: >> >> Behrad, >> >> I have added http://github.com/normanb/couchdb which contains the >> multiview code and javascript tests. >> >> Can you you trying running the multiview js test (right hand side of >> futon, select Test Suite) and let me know if this works for you, I >> have included a multiview single and multiple test. >> >> thanks, >> >> Norman >> >> On Wed, Aug 18, 2010 at 8:26 AM, Norman Barker <[email protected]> >> wrote: >> > Hi Behrad, >> > >> > I will add test cases to the test harness for multiview and we will >> > see if we can get this working, the log files help, thanks! Looks like >> > you are posting as an authenticated user, I haven't tried this with >> > the multiview, so I will add a test. >> > >> > I will send you an email later on today when this is done. >> > >> > thanks, >> > >> > Norman >> > >> > On Wed, Aug 18, 2010 at 2:47 AM, JRad <[email protected]> wrote: >> >> I couldn't verify the specific error in single view case. In the >> >> attached >> >> file I included two log snippets, one for single view test and other >> >> calling >> >> two views which receives "unsupported view" error! >> >> >> >> >> >> --Behrad >> >> >> >> ________________________________ >> >> From: Norman Barker <[email protected]> >> >> To: Behrad Zari <[email protected]> >> >> Cc: [email protected] >> >> Sent: Tuesday, August 17, 2010 18:53:04 >> >> Subject: Re: Multi-View >> >> >> >> Behrad, (please cc dev list, thanks!) >> >> >> >> the code handles that there is a reduce function and should work, this >> >> seems an error with streaming response, particularly as you are only >> >> calling one view. One view request is handled differently and just >> >> results in that view being streamed to the client. >> >> >> >> Can you turn the debug flag on in local.ini and see if you can more >> >> information? >> >> >> >> thanks, >> >> >> >> Norman >> >> >> >> On Tue, Aug 17, 2010 at 5:32 AM, Behrad Zari <[email protected]> >> >> wrote: >> >>> Hi Norman, >> >>> I've compiled and patched your multi-view code from >> >>> http://github.com/normanb/couchdb-multiview >> >>> >> >>> My fist attempt to test was: >> >>> curl -verbose -X POST -H "Content-Type: application/json" -d >> >>> @sample.json >> >>> "http://192.168.129.65:5984/lbd/_multi" >> >>> where sample.json is: >> >>> {"views":["_design/lbd/_view/contacts_all"]} >> >>> >> >>> but I get: >> >>> >> >>> HTTP/1.1 200 OK >> >>> < Transfer-Encoding: chunked >> >>> < Server: CouchDB/1.0.0 (Erlang OTP/R13B) >> >>> < Date: Tue, 17 Aug 2010 11:17:26 GMT >> >>> < Content-Type: text/plain;charset=utf-8 >> >>> < Cache-Control: must-revalidate >> >>> < >> >>> * Received problem 2 in the chunky parser >> >>> * >> >>> Closing connection #0 >> >>> curl: (56) Received problem 2 in the chunky parser >> >>> >> >>> If my view naming is correct then: >> >>> I don't know what is happening but since our views are map/reduce >> >>> views >> >>> (they all have reduce functions) >> >>> and couchdb reduce by default is true, your patch is somehow affected >> >>> with >> >>> this behaviour! >> >>> >> >>> >> >>> >> >>> My Second question is how (exact syntax?) can we path parameters? >> >>> startkey1, endkey1, startdocId1, reduce=false >> >>> startkey2, endkey2, startdocId2, reduce=false >> >>> ... >> >>> >> >>> >> >>> >> >>> >> >>> --Behrad >> >>> >> >>> >> >> >> > > > > > -- > Behrad >
