October 2017
Intermediate to advanced
226 pages
6h 56m
English
db.mockdata.count()
The preceding command should return 100000:
db.mockdata.find({language: {$eq:null}}).count()
The preceding command should return 12704.
> db.mockdata.createIndex( {first_name:1}, {partialFilterExpression: { language: {$exists: true}}})
This should give you output similar to this:
{ "createdCollectionAutomatically" : false, "numIndexesBefore" : 1, "numIndexesAfter" : 2, "ok" : 1}
db.mockdata.getIndexes()
The preceding command should give you output similar to this:
[ { "key": { "_id": 1 }, "name": "_id_", "ns": "mydb.mockdata", ...Read now
Unlock full access