CouchDB + Django + Couchdbkit
Just some notes for future use.
Installing CouchDB:
- sudo apt-get install couchdb
Couchdbkit:
- Searching by key: Document.view('document/all’, key=’’, startkey=’’, endkey=’’)
- Pushing the view: push(’/path/to/view’, db)
- When pushing make sure not to include the view/all folder, only include the name of the document itself. For example, if you have a document named Greeting and wanted to create a map.js file for the 'all’ view then the path has to look like this:
/path/_design/Greeting/views/all
/path/_design/Greeting/views/all/map.js
Then you would push it like this:
push(’/path/_design/Greeting’, db)
CouchDB:
- /etc/couchdb/default.ini
- Cannot bind to more than one IP address (look into using proxies)
- Key can be a list, not just a value
- Can use emit() multiple times in the same map function