indexing - How to Create an index of a key in a map or item in a list in MongoDB -
the following questions refer example. how create index ids in idsandnames map? i want search these numbers: 7065362, 7064458, 7065003, 7064286... how create index strings in subtargets list? i want search these strings: all, action, drama... my example : { "_id" : objectid("sdfsdfsdfsdfsdfsd910d41ad9"), "targets" : { "superheroes" : { "idsandnames" : { "7065362" : "doctor strange", "7064458" : "dr. manhattan", "7065003" : "captain atom", "7064286" : "hulk" }, "subtargets" : [ "all", "action", "drama" ] } "bestsuperheroes" : { "idsandnames" : { "7065362" :