摘要:
删除多个和一个 db.collection.remove() 默认可以删除符号条件的所有文档 db.stus.remove({_id:"9527"}); 利用remove(对象,true)删除一个 db.stus.remove({age:18},true) 删除一个 db.collection.de 阅读全文
摘要:
db.collection.update(查询条件,新对象) update()默认情况下会使用新对象替换就对象,容易丢失数据。 执行修改前数据 执行命令 db.stus.update({name:"shaheshang"},{age:28}) 执行后数据丢失!!! 如果需要修改指定的属性,而不是替换 阅读全文
摘要:
find()方式 返回一个数组。 1.查询全部 db.stus.find(); 或者 db.stus.find({}); 2.带条件的查询 例如:查询_id=9527的数据。 db.stus.find({_id:"9527"}); 3.带多个参数的查询 例如:name为zhubajie,age为 1 阅读全文
摘要:
1.进入ES官网:https://www.elastic.co/ 2.点击【即刻体验】 3.点击Elasticsearch【下载】 4.选择对应的服务器版本 5.开始下载了 6.解压即可 启动ElasticSearch,bin目录下的elasticsearch.bat启动。 在浏览器访问测试: 7. 阅读全文
摘要:
插入一行数据 db.stus.insert({name:"zhubajie",age:18,gender:"male"}); 插入多行数据 db.stus.insert([ {name:"shaheshang",age:18,gender:"male"}, {name:"tangseng",age: 阅读全文
摘要:
官网:https://www.mongodbmanager.com/download-mongodb-manager-free 下载后傻瓜式下一步即可。 点击黑色小窗口,弹出操作界面。 单行执行键(F6) 执行所有键(F5) 执行选择行语句(F9) 阅读全文