A. How do I index nested and all of it\'s values?
nested
B. How do I index valuetwo?
valuetwo
{ id: 00000, attrs: { nested:{
You'd create them just as if you were creating an index on a top level field:
db.collection.ensureIndex({"attrs.nested.value": 1})
You do need to explicitly create indexes on each field.