4Manuals

  • PDF Cloud HOME

Cosmos DB:错误综合索引(使用数组) Download

    字符串数组在for循环中初始化时忽略索引0 在postgres中,非唯一列存储的值范围很广,是否可以对其进行索引并提高性能? 使用Cosmos DocumentDB生成选择列表 什么时候在小参考表上证明索引合理? Python Mongodb排序太大,如何使用索引? 如何为python pandas数据框创建索引?

当我运行以下查询时,我的cosmos数据库要求我提供综合索引:

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

我尝试如下创建复合索引:

  

{“ 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'附近失败。请确保该路径是有效路径。

我在做什么错了?

0 个答案:

没有答案



Similar searches
    Selenium-EventFiringWebDriver beforeFindBy和afterFindBy方法多次触发同一事件 NSOperationQueue操作和operationsCount已弃用。如何取消特定类别的操作? 在IntelliJ IDEA中进行调试 如何将类型安全对象转换为JComboBox <String>? 如果在该范围内有事件,如何停止在odoo中创建事件?