Hi Flo, Exactly, you can't rely on prev versions - you'die have to keep your own deleted and history 4 that...
Good luck Sebastian Von meinem iPhone gesendet > Am 21.02.2016 um 17:08 schrieb Florian Lohoff <[email protected]>: > >> On Sun, Feb 21, 2016 at 03:27:38PM +0100, Sebastian Rothbucher wrote: >> Hi Flo, >> >> if I'm not completely mistaken, the changes feed does contain the last >> revision of a modified document or a deletion stub. See the following >> example: >> $ curl -X GET ' >> http://localhost:5984/test/_changes?feed=continuous&heartbeat=3000' >> # (some changes) >> # fire foff >> $ curl -X PUT 'http://localhost:5984/test/bla' -d '{}' >> {"ok":true,"id":"bla","rev":"1-967a00dff5e02add41819138abb3284d"} >> # produces changes feed >> {"seq":4,"id":"bla","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]} >> # fire off >> $ curl -X DELETE ' >> http://localhost:5984/test/bla?rev=1-967a00dff5e02add41819138abb3284d' >> {"ok":true,"id":"bla","rev":"2-eec205a9d413992850a6e32678485900"} >> # produces changes feed >> {"seq":5,"id":"bla","changes":[{"rev":"2-eec205a9d413992850a6e32678485900"}],"deleted":true} >> >> 2-eec205a9d413992850a6e32678485900 is in fact the deletion stub's revision >> ID >> >> hope if helps - otherwise pls. let us know > > Yes - but 2-eec205a9d413992850a6e32678485900 is only the deletion stub > not the last valid document. I'd like to have the last document before > the deletion stub. > > e.g. the pre-delete or pre-change/update document. I'd like to process > differences in objects so i need to have a look at document changes for > which i need the new and the old document. > > Reading from the semantics of revisions i should not even rely on them > beeing existant (I now they disappear on compaction). > > Flo > -- > Florian Lohoff [email protected] > We need to self-defend - GnuPG/PGP enable your email today!
