| Method | POST /db/_compact/design-doc | |
| Request | None | |
| Response | JSON success statement | |
| Admin Privileges Required | yes | |
| Return Codes | ||
| 202 | Compaction request has been accepted | |
| 404 | The requested content could not be found. The returned content will include further information, as a JSON object, if available. | |
Compacts the view indexes associated with the specified design document. You can use this in place of the full database compaction if you know a specific set of view indexes have been affected by a recent database change.
      For example, to compact the views associated with the
      recipes design document:
    
POST http://couchdb:5984/recipes/_compact/recipes Content-Type: application/json
CouchDB will immediately return with a status indicating that the compaction request has been received (HTTP status code 202):
{
   "ok" : true
}