A. How do I index nested
and all of it's values?
B. How do I index valuetwo
?
{
id: 00000,
attrs: {
nested:{
value: value1,
valuetwo: value2,
}
}
}
I've looked here: http://www.mongodb.org/display/DOCS/Indexes, and the docs to my knowledge, aren't clear about indexing things that aren't nested.
value
andvaluetwo
. The second creates a single compound index on both of these values. This index can only be used for queries which specify a value forvalue
. That is, it's not useful for queries onvaluetwo
alone. – Casuistry