使用Cosmos DB中的TablesDB表,我尝试只对PartitionKey和RowKey进行索引。
下面的CosmosDB索引可以正确编译,但是当我在分区键/行键上运行查询时,我收到了错误消息"An invalid query has specified with filters a a path(s) excluded from index .考虑在请求中添加allow scan header。“
有人知道如何使用只对PartitionKey和RowKey进行索引而不对其他内容进行索引的CosmosDB TablesDB吗?
{
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/PartitionKey/?",
"indexes": [
{
"kind": "Hash",
"dataType": "String",
"precision": -1
},
{
"kind": "Range",
"dataType": "Number",
"precision": -1
}
]
},
{
"path": "/RowKey/?",
"indexes": [
{
"kind": "Range",
"dataType": "String",
"precision": -1
},
{
"kind": "Range",
"dataType": "Number",
"precision": -1
}
]
}
],
"excludedPaths": [
{
"path": "/*"
}
]
}
https://stackoverflow.com/questions/53439991
复制相似问题