If compactation was not run you can restore the contents of the doc as
follows:
1. Query changes feed and find revision of the deletion, eg
{"seq":2,"id":"_design/myapp","changes":[{"rev":"2-
5c74cc55cca23ecd5e0574c1a20ff419"}],"deleted":true}
2. Get doc with that rev and revs=true, eg
curl "http://localhost:5984/test-deletion/_design/myapp?rev=2-5c74cc55c
ca23ecd5e0574c1a20ff419&revs=true"
This returns the deletion stub along with its revision history, eg
{"_id":"_design/myapp","_rev":"2-
5c74cc55cca23ecd5e0574c1a20ff419","_deleted":true,"_revisions":{"start"
:2,"ids":["5c74cc55cca23ecd5e0574c1a20ff419","8b7efd2c9d65e235d0f42919b
f57678f"]}}
3. Now you have all information to retrieve the doc in its revision
before the deletion:
curl "http://localhost:5984/test-deletion/_design/myapp?rev=1-8b7efd2c9
d65e235d0f42919bf57678f"
Greetings
Johannes
Am Mittwoch, den 14.09.2016, 14:30 -0400 schrieb [email protected]:
> Hi there,
> I accidentally removed some view in my design doc, is there anyway to
> retrieve that at all given that I haven't run view clean up?
>
> Sent from my iPhone