CouchDB: setting the maximum revision limit per document

Translation of the original in Catalan. Read it in: CatalàCastellano

couchdb logo
couchdb logo

By default and until the CouchDB database is compacted it allows up to 1000 revisions of a document, which often is not necessary. So, if we want to change this parameter, finally in version 0.11 we can already change it.

Set _revs_limit of a particular database:

curl -X PUT -d "1500" http://localhost:5984/test/_revs_limit
#=> {"ok":true}

Read _revs_limit of a particular database:

curl -X GET http://localhost:5984/test/_revs_limit
#=> 1500

original information from: accessing database specific options.

Acknowledgements: thanks @marcos ;)