每this doc,您必须在调用删除时指定分区键 .
因此,如果您创建的集合没有分区键,这是否意味着您无法删除任何文档?
该要求仅适用于分区集合 .
如果您只是使用单分区(10GB)集合,只需调用 DeleteDocumentAsync() 而不使用 RequestOptions 属性(因为它将默认为null),或者如果您正在设置其他选项,则从 RequestOptions 取消 PartitionKey ,因为 RequestOptions 用于指定分区键 .
DeleteDocumentAsync()
RequestOptions
PartitionKey
DeleteDocumentAsync() 的文档是here .
1 回答
该要求仅适用于分区集合 .
如果您只是使用单分区(10GB)集合,只需调用
DeleteDocumentAsync()
而不使用RequestOptions
属性(因为它将默认为null),或者如果您正在设置其他选项,则从RequestOptions
取消PartitionKey
,因为RequestOptions
用于指定分区键 .DeleteDocumentAsync()
的文档是here .