couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: Matching docs which values ending with a specific string
Date Thu, 13 Feb 2014 16:34:23 GMT

On Feb 13, 2014, at 8:24 AM, Tito Ciuro <tciuro@mac.com> wrote:

> This works as expected. However, if I issue the same command with curl I get more than
I expected:
> 
> curl http://127.0.0.1:5984/test/_design/test/_view/test-byTown?startkey=%5B%22foo%20ca%22%5D&endkey=%5B%22foo%20ca%22,%7B%7D%5D

I don't think that's the exact command line you used, because without quotes the shell's going
to interpret the '?' character as a wildcard. Could you post the exact command line?

(Also, could you show what the startkey and endkey expand to? I'm not good at doing URL-unescaping
in my head.)

—Jens

PS: I've found that the 'httpie' tool saves a lot of sanity when sending command-line requests
to CouchDB. It's similar to curl but a lot friendlier, and makes it very easy to add custom
queries and JSON body properties without doing a ton of quoting.
Mime
View raw message