incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex P <apede...@kolosy.com>
Subject Re: Duplicate keys in a view
Date Tue, 08 Dec 2009 19:05:49 GMT
that's pretty odd, the first request should do what you need. it might be
the quotes around the array, if that's how you're submitting it.

On Tue, Dec 8, 2009 at 1:00 PM, Timothy Baldridge <tbaldridge@gmail.com>wrote:

>  I've been working with CouchDB for several weeks now, and love it, but
>  I've got a bug that's giving me issues.
>
>  I have a map function in a View that generates many duplicate keys.
>  Let's say these keys are thus:
>
>  [ "foo", "bar"],
>  [ "foo", "barr"],
>  [ "foo", "bar"],
>
>  Now I want to query the two duplicate rows above. However here's where
>  I hit an issue. If I use: ?key="['foo', 'bar']"
>
>  Couchdb replies:
>
>  {"total_rows":3,"offset":0,"rows":[]}
>
>  I assume this is because we have duplicate keys. However, if I do this:
>
>  ?start_key="['foo', 'bar']"&end_key="['foo', 'bar']"
>
>  I get all three docs returned (instead of the two I wanted), because
>  barr is considered a subset of bar.
>
>  So how do I get the view to return multiple rows?
>
>  Thanks.
>
>  Timothy Baldridge
>
>
>
>
> --
> “One of the main causes of the fall of the Roman Empire was
> that–lacking zero–they had no way to indicate successful termination
> of their C programs.”
> (Robert Firth)
>

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