couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdr...@free.fr
Subject Re: Muti-View support : feedback,issues, and question
Date Mon, 20 Sep 2010 16:36:56 GMT
Hi,

Thanks for your answer,
>
> 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 = {multiview_httpd, handle_request}
>
> I will look into this and make sure it gets added.

I'll try to change the config on our side and give it a try.
>
> In the test scripts the following code
>
>     var ddocThree = {
>       _id:"_design/three",
>       views: {
>         "test" : {map: "function (doc) {if (doc.integer % 3 == 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.
Actually I did understand what the example does ;).

However what I'd like to know if it is possible to pass parameters (keys, ranges)  to the
"called views" map functions ( in this example views "test" in _design/three and _design/four
) ?

Something like : return all documents which id is a multiple of N _and_ ,  for instance ,
is created in a given time range (assuming we have a creation date field in the doc).

Is this case covered by the multiview feature ?


Regards,

cdrx

Mime
View raw message