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 22:50:10 GMT
On Mon, Dec 6, 2010 at 2:32 PM, Zachary Zolton <zachary.zolton@gmail.com>wrote:

> Mathew,
>
> So, for instance, your view emits keys like:
>
> ["Bush", "George", "H", "W"]
> ["Bush", "George", "W"]
> ["Clinton", "William", "J"]
> ["Obama", "Barack", "H"]
> ["Reagan", "Ronald", "W"]
>
> And you just want both rows with the last name of "Bush"?
>

Exactly! Thanks.


>
> Then you'll want to use a range query:
>
> startkey=["Bush"]&endkey=["Bush",{}]
>
> But, you have to URL encode the key parameter values, so it actually
> ends up as this:
>
> startkey=%5B%22Bush%22%5D&endkey=%5B%22Bush%22%2C%7B%7D%5D
>

Ah-ha! Figured it was something simple. I'll give that a shot!

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