11. Which of the following is/are true of single field indexes? Check all that apply:
题目选项
- A.Single field indexes can only index the top-level fields in documents.
- B.Single field indexes can be sorted in ascending or in descending order.
- C.Single field indexes cannot index embedded documents or nested fields.
答案置信度:高
正确答案:B
解析语言:中文
单字段索引既可用升序(1)也可用降序(-1)创建,查询的排序方向可以由索引正/反向扫描来满足,所以 B 正确。A、C 错:单字段索引可以建在嵌套字段或整个内嵌文档上,例如 {"address.city": 1},并不是只能索引顶层字段,也不是不能索引嵌套字段。