2
假设我有三个文档,其中存在“B”字段。所有这三者都有3种不同的数据类型。索引BTREE如何存储?将“B”作为索引键是否有效?对同一个键的不同数据类型的MongoDB索引
例子。
{_id:"1",a:1,b:"abc" } //B is string here
{_id:"1",a:1,b:[1,2,3] } //B is array of numbers
{_id:"1",a:1,b:{x:1,y:"a"} } //B is another nested document
完美。非常感谢。 因此,即使在BTREE节点布置中也存在SORT机制 – user3151330 2014-09-01 16:44:26