Details
-
Improvement
-
Resolution: Duplicate
-
Minor - P4
-
None
-
1.8.0-rc1
-
None
-
None
Description
When using shardcollection with a key that is a prefix of an existing compound index, one gets a message 'please create an index over the sharding key before sharding.', even though the compound index could have been used for sharding.
For instance:
db.Test.save(
{ a:1, b:2, c: 3})
db.Test.ensureIndex (
)
db.runCommand({shardcollection: "test.Test", key: {a:1}}) << use compound index on a,b here instead of giving error message