There is a gamers collection in your database with the following document structure: { _id: 1, level: 15, is_active: true }, { _id: 2, level: 14, is_active: true }, { _id: 3, level: 7, is_active: false } How do you increase the value of the level field by 20 for a player with id = 3?
Expected result:
{ _id: 1, level: 15, is_active: true }, { _id: 2, level: 14, is_active: true }, { _id: 3, level: 27, is_active: false }
Suppose we have a shipwrecks collection with the following document structure: { _id: ObjectId("578f6fa2df35c7fbdbaed8ce"), feature_type: 'Wrecks - Visible', watlev: 'always dry', coordinates: [ -79.9469681, 9.3729954 ] } You ran the command below: db.shipwrecks.getIndexes() And you got the following output: [ { v: 2, key: { _id: 1 }, name: '_id_' }, { v: 2, key: { coordinates: '2dsphere' }, name: 'coordinates_2dsphere', '2dsphereIndexVersion': 3 } ] How can you remove the geospatial index on the coordinates field?
In your database a movies collection is given where each document has the following structure: { _id: ObjectId("573a1391f29313caabcd9264"), genres: [ 'Romance', 'Drama' ], title: 'The Divorcee', languages: [ 'English', 'French' ], year: 1930, imdb: { rating: 6.9, votes: 1740, id: 20827 }, countries: [ 'USA' ] } Which of the following queries will return all movies that are in the Fantasy and Drama (both) genre?
You have the following replica set configuration: conf = { "_id": "replset", "version": 1, "protocolVersion": 1, "members": [ { "_id": 0, "host": "192.168.120.24:27017", "priority": 2, "votes": 1 }, { "_id": 1, "host": "192.168.120.24:27018", "priority": 1, "votes": 1 }, { "_id": 2, "host": "192.168.120.24:27018", "priority": 1, "votes": 1 } ] } Select all true statements about this configuration.
Which command do you use to display all indexes in routes collection?