Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 2.0

Retrieve document "_rev" value

1 reply [Last post]
  • Login or register to post comments
Thu, 09/06/2012 - 03:24
Kynth
Offline
Joined: 11/10/2010
Groups: None

Is it possible to retrieve the value of the "_rev" element of a document?

I'm using the Java SDK primarily.

Top
  • Login or register to post comments
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.

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...

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker