If you shard an empty collection using a hashed shard key, MongoDB
automatically creates and migrates empty chunks so that each shard
has two chunks. To control how many chunks MongoDB creates when
sharding the collection, use shardCollection with the
MongoDB 2.4 adds support for hashed shard keys. After
sharding a collection with a hashed shard key, you must use the
MongoDB 2.4 or higher mongos and mongod
instances in your sharded cluster.
MongoDB hashed indexes truncate floating point numbers to 64-bit integers
before hashing. For example, a hashed index would store the same
value for a field that held a value of 2.3, 2.2, and 2.9.
To prevent collisions, do not use a hashed index for floating
point numbers that cannot be reliably converted to 64-bit
integers (and then back to floating point). MongoDB hashed indexes do
not support floating point values larger than 253.