I'm using the C# mongodb driver to serialize a Dictionary into an embedded document. The embedded document looks something like:
"Lookup" : [[1234, {
"Name" : "bob",
"Age" : 25,
}], [4567, {
"Name" : "fred",
"Age" : 31,
}]]
Is it possible to create an index just on the "key" (i.e. 1234, 4567 etc) of the list? I've created an index on Lookup but I'm not sure what it's created an index on.
I'm guessing it's indexed the whole document because the query:
find ( {"Lookup" : { "$in" : [1234] } } )
Doesn't match anything.
Thanks,