How to get document Info of history version on CBL?

59 views
Skip to first unread message

atom992

unread,
Sep 10, 2015, 8:39:17 AM9/10/15
to Couchbase Mobile


I am using CBL 1.1.0 android, and I modify the doc many times from CBL. Can I get the history version of Doc info?
I can query doc by rev=<version_number> ,but I can only get _id and _rev info.
and when I query doc with revs=true&revs_info=true, I can get history version info, but 
"status" : "missing"
Is there some way to keep history version doc info, So I can get it?

atom992

unread,
Sep 10, 2015, 10:19:07 AM9/10/15
to Couchbase Mobile
I can get old doc info by create bucket with _revs_limit =5 now.
but I found I can get doc info with rev >= 1000 .
Is this a bug?

Jens Alfke

unread,
Sep 10, 2015, 11:18:22 AM9/10/15
to mobile-c...@googlegroups.com

On Sep 10, 2015, at 5:39 AM, atom992 <yangzi...@gmail.com> wrote:

I can query doc by rev=<version_number> ,but I can only get _id and _rev info.
and when I query doc with revs=true&revs_info=true, I can get history version info, but 
"status" : "missing"
Is there some way to keep history version doc info, So I can get it?

Couchbase Lite* only guarantees to keep the properties of a document’s current revision(s). Old revision bodies get removed during database compaction.

If you need to keep older versions of documents around, you’ll have to put them somewhere else; for example you could use local documents (/db/_local/xxx).

—Jens

* and Sync Gateway, and CouchDB
Reply all
Reply to author
Forward
0 new messages