incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Woodward <m...@mattwoodward.com>
Subject Re: Map/Reduce Question
Date Thu, 02 Dec 2010 15:19:21 GMT
On Thu, Dec 2, 2010 at 3:46 AM, Robert Newson <robert.newson@gmail.com>wrote:

> The simplest means to dedupe this is;
>
> function(keys, values, rereduce) {
>  return values[0];
> }
>
>
Thanks! I'm sure I'm missing something, but I stuck this in as my reduce
function and I'm only getting one result back total. Do I do some sort of
for/each loop in there to get unique values for each key?

Also this doesn't include the key in what's returned (key comes back null)
and I'd like to have that in there. I haven't messed with that piece of
things at all so I'll see if I can get that sorted out.

Really appreciate the input.
-- 
Matthew Woodward
matt@mattwoodward.com
http://blog.mattwoodward.com
identi.ca / Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint,
etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message