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: Doubts with multiple keys!
Date Fri, 21 Jan 2011 17:19:40 GMT
On Fri, Jan 21, 2011 at 12:12 PM, Fabio Batalha Cunha dos Santos
<fabio.batalha@scielo.org> wrote:
> Hello All,
>
> I'm doing a lot of tests with views with multiple keys. I'd like to know if
> is it possible to ignore the content of the first key when fetching a view.
> For example:
>
> I have this view:
>
> {"rows":[
> {"key":["arg","h"],"value":10721},
> {"key":["arg","i"],"value":855},
> {"key":["arg","t"],"value":71},
> {"key":["chl","h"],"value":28129},
> {"key":["chl","i"],"value":2158},
> {"key":["chl","t"],"value":92},
> {"key":["col","h"],"value":13696},
> {"key":["col","i"],"value":1156},
> {"key":["col","t"],"value":96},
> ]}
>
> I'd like to with the startkey + endkey parameter filter the result to:
>
> {"rows":[
> {"key":["arg","i"],"value":855},
> {"key":["chl","i"],"value":2158},
> {"key":["col","i"],"value":1156},
> ]}
>
> Is it possible?
>

Nope. If you want to do that you'll need to create a second view with
a reordered key, or a key that doesn't include what you want to skip.

>
> Thanks in advance,
>
> *Fabio Batalha C. Santos*
> Colegiado SciELO
> www.scielo.org
> FAPESP - CNPq - BIREME - FapUNIFESP
>

Mime
View raw message