Indexing on several fields in mongoDB
问题 I need to store information per object in MongoDB. Each object can have a variable number of attributes, each attribute name may also be different. Object 1: name : "Cupboard Number 1" type: "Cupboard" material : "Wood" dimensions : "12X15" built on : "2nd oct 2014" id : 12212 Object 2: name : "Tommy" type : "Pet" owner : "Tom" born : "1 June 2010" id : 12321 So each object may have different attributes/fields. I'd like to have the flexibility to query on this database by filtering on any