incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: 0.9 to 0.10 breaking changes
Date Fri, 28 Aug 2009 19:55:53 GMT
> in this case I'm reducing the result, but the output is greater the
> half the size of the input. For what I've understood this would fail,
> wouldn't it?

Yep. And this is a poster child of the sort of thing this patch was
trying to catch. The CouchDB-y way to do this would be to emit like
such:

Doc1
[k1, id(F1)] -> F1
[k1, id(F2)] -> F2
[k1, id(F3)] -> F3
[k1, id(F4)] -> F4
[k1, id(F5)] -> F5

Doc2
[k1, id(F1)] -> F1
[k1, id(F3)] -> F3

And then call your reduce with a group=true.

HTH,
Paul Davis

Mime
View raw message