【发布时间】:2017-06-16 13:34:34
【问题描述】:
当我针对 DocumentDb 发出 linq 计数时。 第一个 POST Web 请求导致 400 Bad 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)) "}
消息: 不支持期望来自聚合函数的完整结果的查询
这后面是 GET 分区键范围。
然后是另一个有效的计数查询的 POST 网络请求:
请求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))"}
我在这里做错了什么/愚蠢还是 documentDb 的预期行为。
谢谢
唐纳
【问题讨论】:
标签: azure-cosmosdb