thanks for those! I was googling trying to find example reduce functions, in
vain.
It seems my view (w/ reduce function removed) is still timing out.
curl: (52) Empty reply from server
real 85m15.699s
I'm not sure what's going on. The map function isn't that complicated. Any
ideas on how I could find out what's going on?
Thanks,
Will
On Thu, Sep 11, 2008 at 1:08 AM, Chris Anderson <[EMAIL PROTECTED]> wrote:
> On Wed, Sep 10, 2008 at 7:25 PM, william kinney
> <[EMAIL PROTECTED]> wrote:
> > reduce function:
> > function(keys, values) {
> > return values;
> > }
> >
>
> The problem is with your reduce function (and the existing
> documentation for reduce, which should make this clear, but doesn't).
>
> Reduce should only be used to emit scalar values. In your case, you
> would be better not to define a reduce function at all, and just query
> the map with startkey and endkey ranges. For example reduce functions,
> see couch_tests.js's reduce test here:
>
>
> http://svn.apache.org/repos/asf/incubator/couchdb/trunk/share/www/script/couch_tests.js
>
> There are also some examples in various blog posts I've written about
> reduce:
>
> Google search for those posts: http://tinyurl.com/couchdb-reduce
>
> Hope this helps!
>
> Chris
>
>
>
>
>
>
>
>
>
> --
> Chris Anderson
> http://jchris.mfdz.com
>