目录
多键索引
多键索引用于为数组中的元素创建索引
先创建集合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: "food", item: "dd
版权声明:本文为博主作者:童小纯原创文章,版权归属原作者,如果侵权,请联系我们删除!
原文链接:https://blog.csdn.net/m0_58719994/article/details/131585087