couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
Subject Re: HTTP view API param question
Date Fri, 17 Jul 2009 18:05:00 GMT
On Thu, Jul 16, 2009 at 11:50 PM, Nitin Borwankar<nitin@borwankar.com> wrote:
> Hello all,
>
> I have a view running fine in Futon and also with group=true via CURL.
> However when I add descending=true along with group=true, the descending
> part doesn't take.
> In fact even limit=100 doesn't take.  Is there anything else I need to
> incant so I can get a grouped output that is descending and gives me top 100
> results.
>
> my current incantation is
>
> curl -X GET http://localhost:5984/<dbname>/_design/<designdocname>/_view/<viewname>?group=true
> <---- this works
>
> curl -X GET http://localhost:5984/<dbname>/_design/<designdocname>/_view/<viewname>?descending=true&group=true
> <---- this doesn't work

try:

curl -X GET "http://localhost:5984/<dbname>/_design/<designdocname>/_view/<viewname>?descending=true&group=true"

the quotes are necessary or else the shell treats the ampersand as a
flag to run the process in the background, so couch never sees
anything after the &, without the "s


>
> curl -X GET http://localhost:5984/<dbname>/_design/<designdocname>/_view/<viewname>?limit=100&group=true
> <---- this doesn't work
>
> the second and third give the same result as first incantation.
>
> Anything I am missing ?
>
> All of this is on CouchDBX 0.9 on Leopard on an Intel MacBook Pro
>
>
> Thanks much,
>
> Nitin
>
>
> 37% of all statistics are made up on the spot
> -------------------------------------------------------------------------------------
> Nitin Borwankar
> nborwankar@gmail.com
>



-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Mime
View raw message