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 Mon, 06 Dec 2010 21:22:33 GMT
On Fri, Dec 3, 2010 at 1:41 AM, Robert Newson <robert.newson@gmail.com>wrote:

> You can't reduce your way out of that, I think. What you can do instead is;
>

Thanks--kind of where I wound up (key including everything, value being
null) but very helpful to get confirmation on that. Sorry if my generic
examples weren't accurate with what I was trying to accomplish.

This brings to mind a follow-up question. Let's say I have the following
arrays as my keys in some records:
["foo","value1","value2"]
["foo","value3","value4"]
["bar","value5","value6"]
["bar","value7","value8"]

I'm currently getting back things like that, which is fine. But, let's say I
wanted to return only the records with "foo" as the first element of the
array. How would I go about doing that?

I started looking at the "lookup by prefix" example here:
http://guide.couchdb.org/draft/cookbook.html

And I'm still messing with that in the context of my data but haven't hit on
the right combination to get it working correctly quite yet, so figured I'd
ask yet again. ;-)

Thanks.

-- 
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