Created
September 30, 2022 17:21
-
-
Save mchernyavskaya/05ffc41430a5a786d75c957818df9980 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.movies.find( | |
{$text: {$search: "drama"}, "imdb.rating": {$ne: ""}}, | |
{"title": 1, "plot": 1, "genres": 1, "imdb.rating": 1, "_id": 0}) | |
.limit(5) | |
.sort({ "imdb.rating": -1 } | |
) | |
[ | |
{ | |
plot: 'The story of Easy Company of the US Army 101st Airborne division and their mission in WWII Europe from Operation Overlord through V-J Day.', | |
genres: [ 'Action', 'Drama', 'History' ], | |
title: 'Band of Brothers', | |
imdb: { rating: 9.6 } | |
}, | |
{ | |
imdb: { rating: 9.3 }, | |
plot: 'Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.', | |
genres: [ 'Crime', 'Drama' ], | |
title: 'The Shawshank Redemption' | |
}, | |
{ | |
imdb: { rating: 9.3 }, | |
plot: 'Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.', | |
genres: [ 'Crime', 'Drama' ], | |
title: 'The Shawshank Redemption' | |
}, | |
{ | |
imdb: { rating: 9.2 }, | |
plot: 'The aging patriarch of an organized crime dynasty transfers control of his clandestine empire to his reluctant son.', | |
genres: [ 'Crime', 'Drama' ], | |
title: 'The Godfather' | |
}, | |
{ | |
plot: 'Ten television drama films, each one based on one of the Ten Commandments.', | |
genres: [ 'Drama' ], | |
title: 'The Decalogue', | |
imdb: { rating: 9.2 } | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment