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

magic $flags and $expiration vars show up in view but not doc

3 replies [Last post]
  • Login or register to post comments
Fri, 12/16/2011 - 10:18
72squared
Offline
Joined: 12/14/2011
Groups: None

i noticed that if you query a view that emits the document, you get properties like $flag and $expiration, but if you query the http interface for the document url itself, it only shows _rev and _id, not any of the dollar sign magic variables. is there a reason behind that difference?

curl "http://192.168.96.128:8092/default/_design/test/_view/all?key=%22test%2Fquery-1324052106.5247-11152826%22"
{"total_rows":39,"rows":[
{"id":"test/query-1324052106.5247-11152826","key":"test/query-1324052106.5247-11152826","value":{"_id":"test/query-1324052106.5247-11152826","_rev":"1-00009fddf9213ed70000000d00000000","$flags":0,"$expiration":1324055706,"foo":"bar"}}
]}

curl "http://192.168.96.128:8092/default/test%2Fquery-1324052106.5247-11152826"
{"_id":"test/query-1324052106.5247-11152826","_rev":"1-00009fddf9213ed70000000d00000000","foo":"bar"}

Top
  • Login or register to post comments
Sun, 12/18/2011 - 00:51
ingenthr
Offline
Joined: 03/16/2010
Groups:

That's a situation where you're emitting the whole document in the view, is that correct?

It probably shouldn't do so, but it's pretty harmless. Thanks for raising it.

Top
  • Login or register to post comments
Mon, 01/02/2012 - 06:04
alkondratenko
alkondratenko's picture
Offline
Joined: 12/01/2010
Groups: None

Matt have opened bug on that: http://www.couchbase.org/issues/browse/MB-4549

We're going to fix it by always returning memcached-level metadata in reply. Also note that memcached API is main CRUD (create, read, update, delete) API. CouchAPI for CRUD is not fully supported.

Top
  • Login or register to post comments
Tue, 01/17/2012 - 08:18
72squared
Offline
Joined: 12/14/2011
Groups: None

Thanks, that's the behavior I would have expected.

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