When I issue a linq count against DocumentDb. The first POST web request results in a 400 Bad request
Request json:
{"query":"SELECT VALUE Count(1) FROM root
WHERE ((((root[\"docType\"] = \"Whatever\")
AND (root[\"field1\"] = false))
AND (root[\"field2\"] = true))
AND (root[\"field3\"] = 1)) "}
Message: Query that expects full results from aggregate functions is not supported
This is followed by a GET partition key ranges.
Then another POST web request for the count query which works:
Request json:
{"query":"SELECT VALUE [{\"item\": Count(1)}]\r\nFROM root\r\n
WHERE ((((root[\"docType\"] = \"Whatever\")
AND (root[\"field1\"] = false))
AND (root[\"field2\"] = true))
AND (root[\"field3\"] = 1))"}
Am I doing something wrong/silly here or is this expected behaviour for documentDb.
Thanks
Donal

