Is it possible to retrieve the value of the "_rev" element of a document?
I'm using the Java SDK primarily.
Wed, 09/19/2012 - 08:51
dipti
Offline
Joined: 11/02/2011
Groups:
I don't think there is a way to access _rev using the Java SDK. That said, the _rev ID is only used internally, one of the places being cross data center replication for conflict resolution.
It is however accesible via a view. The metadata elements like id, rev, etc are a part of the "meta" object. you can create a view over them by emitting meta.rev.
I don't think there is a way to access _rev using the Java SDK. That said, the _rev ID is only used internally, one of the places being cross data center replication for conflict resolution.
It is however accesible via a view. The metadata elements like id, rev, etc are a part of the "meta" object. you can create a view over them by emitting meta.rev.
Map function can be
function (doc,meta) {
emit(meta.rev, null);
}
more information here:
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-server-rn_2...