通配符索引限制
最后更新于
db.inventory.find( {"product_attributes" : { $exists : false } } )
db.inventory.aggregate([
{ $match : { "product_attributes" : { $exists : false } } }
])db.inventory.find({ "product_attributes" : { "price" : 29.99 } } )
db.inventory.find({ "product_attributes.tags" : [ "waterproof", "fireproof" ] } )
db.inventory.aggregate([{
$match : { "product_attributes" : { "price" : 29.99 } }
}])
db.inventory.aggregate([{
$match : { "product_attributes.tags" : ["waterproof", "fireproof" ] } }
}])db.inventory.find( { $ne : [ "product_attributes", { "price" : 29.99 } ] } )
db.inventory.find( { $ne : [ "product_attributes.tags", [ "waterproof", "fireproof" ] ] } )
db.inventory.aggregate([{
$match : { $ne : [ "product_attributes", { "price" : 29.99 } ] }
}])
db.inventory.aggregate([{
$match : { $ne : [ "product_attributes.tags", [ "waterproof", "fireproof" ] ] }
}])db.inventory.find( { $ne : [ "product_attributes.tags", null ] } )
db.inventory.aggregate([{
$match : { $ne : [ "product_attributes.tags", null ] }
}])