[MB-6942] Spatial views return debug information and wrong number of total_rows Created: 17/Oct/12  Updated: 15/Nov/12  Resolved: 19/Oct/12

Status: Resolved
Project: Couchbase Server
Component/s: view-engine
Affects Version/s: 2.0-beta
Fix Version/s: 2.0-beta-2
Security Level: Public

Type: Bug Priority: Major
Reporter: Volker Mische Assignee: Volker Mische
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Current checkout


 Description   
When you query a spatial view, e.g:

curl -X GET 'http://cato:9500/default/_design/dev_foo/_spatial/bar'

The result contain a "node" key, which should only be the case when you use debug=true.

The results also always return total_rows=0 (not sure if that ever worked :)

 Comments   
Comment by Volker Mische [ 17/Oct/12 ]
Spatial views don't return a total_rows property, but it is needed for the view merging. Hence the output it simply "0".
Comment by Volker Mische [ 17/Oct/12 ]
Here's a fix: http://review.couchbase.org/21717
Comment by kzeller [ 12/Nov/12 ]
Added to RN: For geo/spatial indexes, which are experimental
features in Couchbase 2.0, we had
returned the wrong number of rows in a result set
by including the node key. We now exclude this key.
Comment by Volker Mische [ 12/Nov/12 ]
This is not fully correct. The "node" key is separate from the wrong number of "total_rows". Let me explain it a bit.
The "node" key was a bug and is now fully gone.
The "total_rows" is always 0 for spatial views. This is still the case and won't be changed in the near future.
Comment by kzeller [ 15/Nov/12 ]
For geo/spatial indexes, which are experimental
features in Couchbase 2.0, we had
erroneously returned a 'node' key in the result set which is
debug information. This is now fixed.
Generated at Thu Dec 18 16:46:58 CST 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.