MongoDB Documentation, Release 3.0.4 Changed in version 2.2: The index on the shard key no longer needs to be only on the shard key. This index can be an index of the shard key itself, or a compound index where the shard key is a prefix of the index. Important: The index on the shard key cannot be a multikey index (page 491). A sharded collection named people has for its shard key the field zipcode . It currently has the index { zipcode: 1 } . You can replace this index with a compound index { zipcode: 1, username: 1 } , as follows: db.people.createIndex( { zipcode: 1, username: 1 } ); db.people.dropIndex( { zipcode: 1 } ); Since the index on the shard key cannot be a multikey index, the index { zipcode: 1, username: 1 } can only replace the index { zipcode: 1 } if there are no array values for the username field. If you drop the last valid index for the shard key, recover by recreating an index on just the shard key. Config servers (page 670) store the metadata for a sharded cluster. The metadata reflects state and organization of the sharded data sets and system. The metadata includes the list of chunks on every shard and the ranges that define the chunks. The mongos instances cache this data and use it to route read and write operations to shards. Config servers store the metadata in the Config Database (page 737). Important: Always back up the config database before doing any maintenance on the config server. To access the config database, issue the following command from the mongo shell: use config In general, you should never edit the content of the config database directly. The config database contains the following collections: Sharded Cluster Metadata For more information on these collections and their role in sharded clusters, see Config Database (page 737). See Read and Write Operations on Config Servers (page 670) for more information about reads and updates to the metadata. 689 10.2. Sharding Concepts • changelog (page 738) • chunks (page 739) • collections (page 740) • databases (page 740) • lockpings (page 740) • locks (page 740) • mongos (page 741) • settings (page 741) • shards (page 742) • version (page 742) 1. Create an index on { zipcode: 1, username: 1 } : 2. When MongoDB finishes building the index, you can safely drop the existing index on { zipcode: 1 } : For restrictions on shard key indexes, see limits-shard-keys .