azure-cosmosdb - Cosmos 中可选字段的复合索引
问题描述
我在 Cosmos DB 中有一个集合,其中包含不同类型(和模式)的文档:
{
"partKey": "...",
"type": "type1",
"data": {
"field1": 123,
"field2": "sdfsdf"
}
}
{
"partKey": "...",
"type": "type2",
"data": {
"field3": ["123", "456", "789"]
}
}
我正在尝试创建一个复合索引[/type, /data/field3/[]/?]
,但遇到了一个问题:
The indexing path '\\/data\\/field3\\/[]\\/?' could not be accepted, failed near position '15'. Please ensure that the path is a valid path. Common errors include invalid characters or absence of quotes around labels
解决方案
推荐阅读
- database - 设置 datestyle = 'SQL, DMY' 失败
- c# - 在 xamrin 表单上复制工具栏
- javascript - 如何在另一个函数中调用reduce函数
- c# - 为什么将 SelectedItem 作为自定义对象传递到新页面后没有内容显示?
- javascript - 使用 JavaScript 在后台播放 Spotify 客户端上的 Spotify 歌曲
- package-managers - LXC - 无法从 linux 容器访问包管理器
- javascript - 正文中的 HTML 代码
- bash - 这个 bash 命令有什么作用?
- r - 如何将一组 Unicode .txt 转换为 ANSI 以在 R 中进行文本分析
- css - CSS:圆形图像