db.tdemo.find({$text:{$search:"aa bb cc"}},{score:{$meta:"textScore"}}).sort({score:{$meta:"textScore"}})
{ "_id" : ObjectId("561b2efa1d7564ee57e78246"), "article" : "aa bb cc df", "score" : 1.875 }
{ "_id" : ObjectId("561b2f021d7564ee57e78247"), "article" : "aa rr cc df", "score" : 1.25 }
{ "_id" : ObjectId("561b2efa1d7564ee57e78246"), "article" : "aa bb cc df", "score" : 1.875 }
{ "_id" : ObjectId("561b2f021d7564ee57e78247"), "article" : "aa rr cc df", "score" : 1.25 }
2015-10-12
use person
switched to db person
> for(var i=0;i<1000000;i++){var rand=parseInt(i*Math.random());db.person.insert({"name":"tb"+i,"age":i})}
switched to db person
> for(var i=0;i<1000000;i++){var rand=parseInt(i*Math.random());db.person.insert({"name":"tb"+i,"age":i})}
2015-10-12
db.serverStatus()
{
"host" : "tb:12345",
"version" : "3.0.6",
"process" : "mongod",
"pid" : NumberLong(1498),
"uptime" : 1163,
"uptimeMillis" : NumberLong(1162972),
"uptimeEstimate" : 1107,
"localTime" : ISODate("2015-10-12T02:24:29.044Z"),
{
"host" : "tb:12345",
"version" : "3.0.6",
"process" : "mongod",
"pid" : NumberLong(1498),
"uptime" : 1163,
"uptimeMillis" : NumberLong(1162972),
"uptimeEstimate" : 1107,
"localTime" : ISODate("2015-10-12T02:24:29.044Z"),
2015-10-12
./bin/mongod: error while loading shared libraries: libc++.so.1: cannot open shared object file: No such file or directory
2015-10-10