Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.0-developer-preview-3
-
Fix Version/s: 2.0-developer-preview-4
-
Component/s: ns_server
-
Security Level: Public
-
Labels:
Description
(update by alk):
As can be seen in comments we think we should always expose $flags and $expiration in json docs we expose either via CAPI CRUD or view map/reduce. So going to change CAPI CRUD code instead.
was:
(originally reported at http://www.couchbase.org/forums/thread/magic-flags-and-expiration-vars-show-view-not-doc)
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"}
As can be seen in comments we think we should always expose $flags and $expiration in json docs we expose either via CAPI CRUD or view map/reduce. So going to change CAPI CRUD code instead.
was:
(originally reported at http://www.couchbase.org/forums/thread/magic-flags-and-expiration-vars-show-view-not-doc)
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"}