- Reference >
mongoShell Methods >- Sharding Methods >
- sh.addShardTag()
sh.addShardTag()¶
On this page
Definition¶
-
sh.addShardTag(shard, tag)¶ New in version 2.2.
Associates a shard with a tag or identifier. MongoDB uses these identifiers to direct chunks that fall within a tagged range to specific shards.
sh.addTagRange()associates chunk ranges with tag ranges.Parameter Type Description shardstring The name of the shard to which to give a specific tag. tagstring The name of the tag to add to the shard. Only issue
sh.addShardTag()when connected to amongosinstance.