diff --git a/README.md b/README.md index 4c74900..5b397fa 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
Query -``` +```bash db.movies.find({ "genres": "Thriller" }).count() ``` @@ -12,7 +12,7 @@ db.movies.find({ "genres": "Thriller" }).count()
Result -``` +```bash 2658 ```
@@ -21,14 +21,14 @@ db.movies.find({ "genres": "Thriller" }).count()
Query -``` +```bash db.movies.find({ "title": { "$regex": /ghost/i } }) ```
Result -``` +```bash [ { _id: ObjectId("573a1392f29313caabcda826"), @@ -84,14 +84,14 @@ ain Stone. At first things look good, Stone sees Merriam as a younger version of
Query -``` +```bash db.movies.find({ "title": { "$regex": /ghost/i }, "year": { "$gt": 2013 } }) ```
Result -``` +```bash [ { _id: ObjectId("573a13ddf29313caabdb3f4b"), @@ -138,7 +138,7 @@ sten that a whale killed his beautiful Annabel Lee, but even he doesn't quite re
Query -``` +```bash db.movies.aggregate([ { "$sort": { "awards.wins": -1 } }, { "$limit": 1 } @@ -148,7 +148,7 @@ db.movies.aggregate([
Result -``` +```bash [ { _id: ObjectId("573a13d5f29313caabd9cae7"), @@ -203,7 +203,7 @@ ity. In the twelfth year of his unforgettable odyssey, Solomon's chance meeting
Query -``` +```bash db.movies.aggregate([ { "$match": { "runtime": { "$gt": 120 }, "imdb.rating": { "$lt": 2.0 }}}, { "$sort": { "year": 1 } }, @@ -215,7 +215,7 @@ db.movies.aggregate([
Result -``` +```bash [ { _id: ObjectId("573a13dbf29313caabdaf3c6"), @@ -271,7 +271,7 @@ l landlord. The son flees the village and travels to Mumbai to make a life, but
Query -``` +```bash db.movies.aggregate([ { "$match": { "runtime": { "$gt": 120 }, "imdb.rating": { "$lt": 2.0 } } }, { "$sort": { "year": 1 } }, @@ -289,7 +289,7 @@ db.movies.aggregate([
Result -``` +```bash [ { _id: ObjectId("573a13dbf29313caabdaf3c6"), @@ -346,7 +346,7 @@ l landlord. The son flees the village and travels to Mumbai to make a life, but
Query -``` +```bash db.movies.aggregate([ { "$unwind": "$countries" }, { @@ -373,9 +373,9 @@ db.movies.aggregate([
Result -It's very long. Here's part of the 2nd entry: +It's very long. Here's part of the 2nd document: -``` +```bash ... 'La Sapienza', 'The New Girlfriend', @@ -503,7 +503,7 @@ It's very long. Here's part of the 2nd entry: ### BONUS/ Trouver les cinémas aux alentours (5km maxi) de New York (x = -73.983487 et y = 40.76078)
Query -``` +```bash db.theaters.createIndex({ "location.geo": "2dsphere" }) db.theaters.aggregate([ @@ -523,7 +523,7 @@ db.theaters.aggregate([
Result -``` +```bash [ { _id: ObjectId("59a47287cfa9a3a73e51e8e2"),