How do I change the database file location for couchdb?
That is in local.ini [couchdb] database_dir = /path/to/the/databases view_index_dir = /path/to/the/views Good luck!
That is in local.ini [couchdb] database_dir = /path/to/the/databases view_index_dir = /path/to/the/views Good luck!
The example function in-place is not the same as “in-place” updates in other databases. CouchDB still uses an append-only architecture; document update handlers still create a new doc revision, etc. Still, update handlers are quite convenient and worth learning. Suppose you have a document with an accumulator. You want to accumulate an integer in a … Read more
Thank you! This is a great example to show off CouchDB 0.11’s new features! You must use the fetch-related-data feature to reference documents in the view. Optionally, for more convenient JSON, use a _list function to clean up the results. See Couchio’s writeup on “JOIN”s for details. Here is the plan: Firstly, you have a … Read more
CouchDB has released a simple authentication api but has no in built authentication mechanisms as of yet. The simplest and easiest way to do this is to use an http proxy for authentication. However this has limitations on how much you can restrict access on a per document basis. When CouchDB gets some more support … Read more
The upcoming book by O’Reilly is free to read online: http://books.couchdb.org/relax/ Just install and play around – you can do straight http requests using curl on the command line, or use the built-in web interface called futon. Storing and retrieving data is really easy, the hardest part is thinking in terms of map/reduce-views instead of … Read more
Get the revision number of the document to be updated if there is a conflict during attachment and recursively call in-case of a conflict, $url = “http://couchdb/DATABASE/DOCID/ATTACHMENTNAME?rev=$rev”; curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt( $ch, CURLOPT_PUT, true ); curl_setopt( $ch, CURLOPT_URL, $url ); curl_exec( $ch );
First you put the user in _users database. The ID of the document must be org.couchdb.user:username, e.g. With CouchDB 1.2.0 or later use this: { “_id”: “org.couchdb.user:dbreader”, “name”: “dbreader”, “type”: “user”, “roles”: [], “password”: “plaintext_password” } CouchDB will hash & salt the password for you on the server side and save the values in the … Read more
CouchDB is a document store. You put documents (JSON objects) in it and define views (indexes) over them. The objects can be arbitrarily complex with potentially deep structure. Further, they are not constrained to following some consistent schema. Cassandra is a ragged-table key-value store. It just stores rows, each of which has a set of … Read more
There have been some great answers to this already, but I wanted to add some more recent CouchDB features to the mix of options for working with the original situation described by viatropos. The key point at which to split up documents is where there might be conflicts (as mentioned earlier). You should never keep … Read more