目录
多键索引
多键索引用于为数组中的元素创建索引
先创建集合inventory,使用下面的数据来创建多键索引
[{ _id: 5, type: "food", item: "aaa", ratings:[ 5, 8, 9 ] },
{ _id: 6, type: "food", item: "bbb", ratings: [ 5, 9 ] },
{ _id: 7, type: "food", item: "ccc", ratings: [ 9, 5, 8 ] },
{ _id: 8, type: "fo