couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Muti-View support : feedback,issues, and question
Date Mon, 20 Sep 2010 11:27:05 GMT


We successfully installed the multiview couchdb from the git, and there seems 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/couch_tests.js ), but
not shown in Futon.

This can be fixed by copying the multiview.js file in the share/couchdb/www/script/tests directory
on install time.

Adding the file in the share/ 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 response:
 {"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"},
          {'Content-Type',"application/json; charset=UTF-8"},
          {'User-Agent',"Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: 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 request: {bad_request,
                                 <<"Only reserved document ids may start with underscore.">>}
[Mon, 20 Sep 2010 11:01:46 GMT] [debug] [<0.599.0>] Stacktrace: [{couch_doc,validate_docid,1},

3/ The demo test script is not clear

Our understanding is that this feature returns  an intersection (on docid) 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 different views.

Let's say that :

we have a view using  doc creation date as a key
another view using doc author as  key

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  the js example code.

( BTW we know that this particular example can be resolved using collation, however it seemed
the simplest example we can find for the multi view criteria selection ).



View raw message