Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 63924 invoked from network); 20 Sep 2010 15:53:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Sep 2010 15:53:11 -0000 Received: (qmail 79477 invoked by uid 500); 20 Sep 2010 15:53:09 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 78788 invoked by uid 500); 20 Sep 2010 15:53:06 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 78761 invoked by uid 99); 20 Sep 2010 15:53:04 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Sep 2010 15:53:04 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of norman.barker@gmail.com designates 74.125.82.180 as permitted sender) Received: from [74.125.82.180] (HELO mail-wy0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Sep 2010 15:52:42 +0000 Received: by wyb40 with SMTP id 40so6233204wyb.11 for ; Mon, 20 Sep 2010 08:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=0f4vB19/fJMHHFEeRFl2WCJ+F8yXZJ6BtHhxWebGu9E=; b=OwY2q74q5kn7k17+YKZ0Fwq9Oo8mWEAX9bSEL2QCsi+CWMpX4j6UvOxv5dQGzR86sA eXgnsDxxB9/h8tFIjd0YVb7IWnCLnu1snCXMYN6UQ+XSHMpYoAn38as2A2jLcmw6VnZt zB6vKYeWyya+BcM0ZD8srDgW/rxL6cfLxq2ig= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=UU4YNErgdX/RBSZLMNYlmZAoluSjtLBk1uRiENub5E8BsbXrkqePIGL0gOX4jlvI9J qR0Q1JIXUjmrAjnm/A136PLwPebxnfL8y7pdQVsi3HpM+fSvsHBfHiGWmsgjNZptbSpi mImPwMP5hBKtMw/36FTlyRU2H0KLf4TlzF8js= MIME-Version: 1.0 Received: by 10.216.159.131 with SMTP id s3mr8010509wek.99.1284997940144; Mon, 20 Sep 2010 08:52:20 -0700 (PDT) Received: by 10.216.69.212 with HTTP; Mon, 20 Sep 2010 08:52:20 -0700 (PDT) In-Reply-To: <548217237.3544831284982025212.JavaMail.root@zimbra3-e1.priv.proxad.net> References: <1755098106.3544721284982006337.JavaMail.root@zimbra3-e1.priv.proxad.net> <548217237.3544831284982025212.JavaMail.root@zimbra3-e1.priv.proxad.net> Date: Mon, 20 Sep 2010 09:52:20 -0600 Message-ID: Subject: Re: Muti-View support : feedback,issues, and question From: Norman Barker To: cdr53x@free.fr Cc: user@couchdb.apache.org, dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi, thanks for testing this out, this looks like a configuration issue, _multi should be a registered httpd_db_handler in local.ini as follows. [httpd_db_handlers] _multi =3D {multiview_httpd, handle_request} I will look into this and make sure it gets added. In the test scripts the following code var ddocThree =3D { _id:"_design/three", views: { "test" : {map: "function (doc) {if (doc.integer % 3 =3D=3D 0) emit(doc.integer, null)};"} } }; is emitting keys with the doc._id as an integer, in this case for multiples of 3, the second view ddocFour is emitting the documents with keys that are multiples of 4. Hence when we do a multiview and find the intersections of these two views we get the documents whose id (as integer keys) are multiples of 12. Norman On Mon, Sep 20, 2010 at 5:27 AM, wrote: > > > > Hi, > > We successfully installed the multiview couchdb from the git, and there s= eems to be some issues with the tests demonstrating the mutiview features. > > 1/ Issue #1 : muti view demonstration test is not available from Futon > > We can see it is included in the tests ( file share/couchdb/www/script/co= uch_tests.js ), but not shown in Futon. > > This can be fixed by copying the multiview.js file in the share/couchdb/w= ww/script/tests directory on install time. > > Adding the file in the share/Makefile.am should fix the build process. > > > 2/ Issue #2 : the test fails > > When we finally add it the test fails with the following errors : > > 1.Assertion failed : results.row > 2.Assertion failed : results.row > > The log is pretty verbose (with debug level), but basicaly there seems to= be a 400 error when views URL is queried. > > Here is an extract of the log, full log is attached (and gzipped) : > > [Mon, 20 Sep 2010 11:01:46 GMT] [debug] [<0.155.0>] httpd 400 error respo= nse: > =A0{"error":"bad_request","reason":"Only reserved document ids may start = with underscore."} > > [Mon, 20 Sep 2010 11:01:46 GMT] [debug] [<0.599.0>] 'POST' /test_suite_db= /_multi {1,1} > Headers: [{'Accept',"application/json"}, > =A0 =A0 =A0 =A0 =A0{'Accept-Charset',"ISO-8859-1,utf-8;q=3D0.7,*;q=3D0.7"= }, > =A0 =A0 =A0 =A0 =A0{'Accept-Encoding',"gzip,deflate"}, > =A0 =A0 =A0 =A0 =A0{'Accept-Language',"en-us,en;q=3D0.5"}, > =A0 =A0 =A0 =A0 =A0{'Cache-Control',"no-cache"}, > =A0 =A0 =A0 =A0 =A0{'Connection',"keep-alive"}, > =A0 =A0 =A0 =A0 =A0{'Content-Length',"52"}, > =A0 =A0 =A0 =A0 =A0{'Content-Type',"application/json; charset=3DUTF-8"}, > =A0 =A0 =A0 =A0 =A0{'Host',"127.0.0.1:5985"}, > =A0 =A0 =A0 =A0 =A0{'Keep-Alive',"115"}, > =A0 =A0 =A0 =A0 =A0{'Pragma',"no-cache"}, > =A0 =A0 =A0 =A0 =A0{'Referer',"http://127.0.0.1:5985/_utils/couch_tests.h= tml?script/couch_tests.js"}, > =A0 =A0 =A0 =A0 =A0{'User-Agent',"Mozilla/5.0 (X11; U; Linux x86_64; en-U= S; rv:1.9.2.10) Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10"}] > [Mon, 20 Sep 2010 11:01:46 GMT] [debug] [<0.599.0>] OAuth Params: [] > [Mon, 20 Sep 2010 11:01:46 GMT] [debug] [<0.599.0>] Minor error in HTTP r= equest: {bad_request, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 <<"Only r= eserved document ids may start with underscore.">>} > [Mon, 20 Sep 2010 11:01:46 GMT] [debug] [<0.599.0>] Stacktrace: [{couch_d= oc,validate_docid,1}, > =A0 =A0 =A0 =A0 =A0 =A0 {couch_httpd_db,db_doc_req,3}, > =A0 =A0 =A0 =A0 =A0 =A0 {couch_httpd_db,do_db_req,2}, > =A0 =A0 =A0 =A0 =A0 =A0 {couch_httpd,handle_request_int,5}, > =A0 =A0 =A0 =A0 =A0 =A0 {mochiweb_http,headers,5}, > =A0 =A0 =A0 =A0 =A0 =A0 {proc_lib,init_p_do_apply,3}] > > > 3/ The demo test script is not clear > > Our understanding is that this feature returns =A0an intersection (on doc= id) from several view queries. At least this is what we read on the mailing= list. > > However, it is not cleat at all how keys are sent to the distinct views. = Especially, how can we use the multi view and send different keys for the d= ifferent views. > > Let's say that : > > we have a view using =A0doc creation date as a key > another view using doc author as =A0key > > We would like to get all the documents created by a particular author for= a given time range, how do we provide the appropriate key. > > A clear example would really be appreciated because currently, there are = no keys provided in =A0the js example code. > > ( BTW we know that this particular example can be resolved using collatio= n, however it seemed the simplest example we can find for the multi view cr= iteria selection ). > > Regards, > > cdrx > >