Details
-
Bug
-
Resolution: Fixed
-
None
-
*Location*: http://developer.couchbase.com/documentation/server/4.5-dp/indexing-arrays.html
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
*Referrer*: https://www.google.com/
*Screen Resolution*: 3840 x 2160
Description
The select statement in the examples fails even though I have all of the indexes created prior to it in the example section.
"SELECT stops, ( DISTINCT ARRAY v.flight FOR v IN schedule end) FROM `travel-sample`
WHERE type = "route" AND stops >= 0 GROUP BY stops; "
Errors with the following error when I run it against the travel-sample bucket.
[
{ "code": 4210, "msg": "Expression must be a group key or aggregate: (distinct (array (`v`.`flight`) for `v` in (`travel-sample`.`schedule`) end))", "query_from_user": "SELECT stops, ( DISTINCT ARRAY v.flight FOR v IN schedule end) FROM `travel-sample` WHERE type = \"route\" AND stops >= 0 GROUP BY stops;" }]