Currently the shard key maximum (512 bytes) is less than the index key maximum (1024 bytes) hence an error is thrown when you attempt to shard on an index key that is greater than 512 bytes. Consequently it may become impossible to shard on the most appropriate index key for your application if the size is above the 512 byte maximum of the shard key.
Error returned is "Shard Key must be less than 512 bytes".
Increasing the shard key maximum to 1024 bytes would solve this problem.
- related to
-
SERVER-5290 fail to insert docs with fields too long to index, and fail to create indexes where doc keys are too big
- Closed