第一步打开你的mongoDb的安装路径
进入C:\Program Files\MongoDB\Server\3.6\bin
然后打开命令行窗口show dbs
创建你的数据库
退出mongo crl+c
然后
-db 数据库名字
-c 集合名字
mongodbimport --db text -c user --type json C:Users\users.json
成功Get
array(2) { ["docs"]=> array(0) { } ["count"]=> int(0) } 111string(0) "" int(1) int(10) int(70) int(8640000) string(13) "likecs_art_db" array(1) { ["query"]=> array(1) { ["match_all"]=> object(stdClass)#31 (0) { } } } array(1) { ["createtime.keyword"]=> array(1) { ["order"]=> string(4) "desc" } } int(10) int(0) int(8640000) array(2) { ["docs"]=> array(0) { } ["count"]=> int(0) }
第一步打开你的mongoDb的安装路径
进入C:\Program Files\MongoDB\Server\3.6\bin
然后打开命令行窗口show dbs
创建你的数据库
退出mongo crl+c
然后
-db 数据库名字
-c 集合名字
mongodbimport --db text -c user --type json C:Users\users.json
成功Get
相关文章: