From dda40ddaffc14804ec9e410c10d0cfb76cb76345 Mon Sep 17 00:00:00 2001 From: heibaiying <31504331+heibaiying@users.noreply.github.com> Date: Mon, 30 Dec 2019 17:04:46 +0800 Subject: [PATCH] =?UTF-8?q?Update=20MongoDB=5F=E5=88=86=E7=89=87.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes/MongoDB_分片.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/MongoDB_分片.md b/notes/MongoDB_分片.md index ac524fc..c75ebff 100644 --- a/notes/MongoDB_分片.md +++ b/notes/MongoDB_分片.md @@ -290,7 +290,7 @@ db.runCommand({ addshard : "rs1/hadoop001:37018,hadoop002:37018,hadoop003:37018" #### 1. 开启分片功能 -连接到 mongos ,对 testdb 数据库开启分片功能,同时设置集合 users 的分片键为用户 id,后面的`1`表示范围分片,如果想要采用哈希分片,则对应的写法为: `{uid:"hashed"}` 。 +连接到 mongos ,对 testdb 数据库开启分片功能,同时设置集合 users 的分片键为用户 id,后面的 `1` 表示范围分片,如果想要采用哈希分片,则对应的写法为: `{uid:"hashed"}` 。 ```shell db.runCommand({ enablesharding : "testdb" })