当我运行以下查询时,我的cosmos数据库要求我提供综合索引: 我尝试如下创建复合索引: {“ indexingMode”:“ consistent”,“ automatic”:true,“ includedPaths”:[{“ path”:“ / ”}}],“ excludedPaths”:[{“ path”:“ / rawResource /"},{"path":"/\"_etag\"/?"}],"compositeIndexes":[[{"path":"/searcharray[0].a","order“ :“ ascending”},{“ path”:“ / searcharray [1] .b”,“ order”:“ descending”}]]}} 但是服务器显示错误: 未能更新容器:{“代码”:400,“正文”:{“代码”:“ BadRequest”,“消息”:“消息:{\”错误\“:[\”索引路径'\ /searcharray[0].a'无法接受,在位置'14'附近失败。请确保该路径是有效路径。 我在做什么错了?SELECT c.searcharray[0].a, c.searcharray[1].b
FROM c
JOIN f IN c.searcharray
JOIN d IN c.searcharray
where
and (f.type='param1' and (f.date >= '2019-01-01' and f.date <= '2019-12-02'))
and (d.type='param2' and d.c = 'selected')
order by c.searcharray[0].a ASC, c.searcharray[1].b DESC
0 个答案:
没有答案