taskMap: {
key1 : value,
key2 : value,
...
}
And the index will be created on taskMap, not taskMap.* (which isn't
supported on the server), and indexes the complete embedded doc.
I think you want this structure:
taskMap : [
{name: key1, value: value },
{name: key1, value: value },
...
]
And then you can index the "name" field so you can quickly find the
docs with a certain name (key in the map example).
Also, your terminology "for fast retrieval" is confusing. What do you
mean by that? Is there some query you want to perform well?