First, does anyone have any very simple resources for learning how to use views? Coming from a limited SQL background, I'm so confused. What I am really having trouble with is how to query subvalues. (Also, is "subvalue" the right word?) For example, say I have: { "_id" : "bc2a41170621c326ec68382f846d5764", "_rev" : "2612672603", "item" : "apple", "prices" : { "Fresh Mart" : 1.59, "Price Max" : 5.99, "Apples Express" : 0.79 } }
(example from 
http://answers.oreilly.com/topic/1396-running-a-couchdb-query-using-mapreduce/)
How would I only return the price associated with "Fresh Mart" for every ID containing a Freshmart price?

Second of all, I wanted to thank Manokaran K for pointing me in the right direction. I don't know how many Amazon datasets are in couchdb (who knows, it might only be the one I'm interested in), but in case any other people are searching for how to get access to an Amazon public dataset in couchdb over EC2, I thought I would post what was successful for me. I tried to change the default directory in local.ini to where I had mounted the volume, but this resulted in couchdb hanging indefinitely at the startup. I ended up mounting the volume into the default directory and then using chown to change permissions on the directory to couchdb. This worked for me.

On Feb 14, 2012, at 12:33 AM, Manokaran K wrote:

On Tue, Feb 14, 2012 at 11:00 AM, Manokaran K <[email protected]> wrote:


On Tue, Feb 14, 2012 at 10:55 AM, Lauren Dahlin <[email protected]
wrote:

I am very new to couchdb. I need it to access an Amazon public dataset using EC2. I am running an Ubuntu instance, have successfully mounted the file, and can view the couchdb browser interface. However, I can't figure out how to get access to the existing databases which are in .couch format. I have several couch files in a folder ("/db") in the instance. I've tried:
curl -X GET http://localhost:5984/db
{"error":"not_found","reason":**"no_db_file"}
curl -X GET http://localhost:5984/db/**filname.couch<http://localhost:5984/db/filname.couch >
{"error":"not_found","reason":**"no_db_file"}


You'll have to do curl -X GET http://localhost:5984/name_of_db.

Hope that helps.

best,
mano



Your .couch files should be under /usr/local/var/lib/couchdb if you
installed couchdb in /usr/local. I don't think it'll work if you have it
under 'db' directory!

Reply via email to