Created
October 3, 2022 12:31
-
-
Save mchernyavskaya/715e4d1d73ef667d29355ce4f48b04a7 to your computer and use it in GitHub Desktop.
harry-potter-1-mongo
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: "harry potter" }, "imdb.rating": { $ne: "" } }, { "title": 1, "plot": 1, "genres": 1, "imdb.rating": 1, "_id": 0 }). limit(5).sort({ "imdb.rating": -1 }) | |
[ | |
{ | |
plot: 'A comprehensive survey of the American Civil War.', | |
genres: [ 'Documentary', 'History', 'War' ], | |
title: 'The Civil War', | |
imdb: { rating: 9.4 } | |
}, | |
{ | |
plot: 'A comprehensive survey of the American Civil War.', | |
genres: [ 'Documentary', 'History', 'War' ], | |
title: 'The Civil War', | |
imdb: { rating: 9.4 } | |
}, | |
{ | |
plot: 'An aspiring supervillain must balance his career and his pursuit of a beautiful do-gooder.', | |
genres: [ 'Comedy', 'Musical', 'Sci-Fi' ], | |
title: "Dr. Horrible's Sing-Along Blog", | |
imdb: { rating: 8.7 } | |
}, | |
{ | |
plot: 'An angel helps a compassionate but despairingly frustrated businessman by showing what life would have been like if he never existed.', | |
genres: [ 'Drama', 'Family', 'Fantasy' ], | |
title: "It's a Wonderful Life", | |
imdb: { rating: 8.6 } | |
}, | |
{ | |
plot: 'With the aid of a wealthy erratic tippler, a dewy-eyed tramp who has fallen in love with a sightless flower girl accumulates money to be able to help her medically.', | |
genres: [ 'Comedy', 'Drama', 'Romance' ], | |
title: 'City Lights', | |
imdb: { rating: 8.6 } | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment