Skip to content

Instantly share code, notes, and snippets.

@mchernyavskaya
Created October 3, 2022 13:08
Show Gist options
  • Save mchernyavskaya/af9ed2041e041b3425bf68c71c47a23c to your computer and use it in GitHub Desktop.
Save mchernyavskaya/af9ed2041e041b3425bf68c71c47a23c to your computer and use it in GitHub Desktop.
db.movies.find( { $text: { $search: "\"cafe\" \"restaurant\"" }, "imdb.rating": { $ne: "" } }, { "title": 1, "plot": 1, "fullplot": 1, "genres": 1, "cast": 1, "imdb.rating": 1, "_id": 0 }). limit(5).sort({ "imdb.rating": -1 })
[
{
plot: 'A famous jazz saxophonist whose life is forever changed after he is accidentally shot.',
genres: [ 'Drama', 'Music', 'Mystery' ],
cast: [ 'Harvey Keitel', 'Richard Edson', 'Don Byron', 'Kevin Corrigan' ],
title: 'Lulu on the Bridge',
fullplot: 'A jazz saxophonist loses his capability to play when he is injured in a shooting at a cafè where he was playing. He sinks into depression when everyone charges in to take care of him, including his ex-wife. However, he discovers a stone with a telephone number attached. Returning the stone, he meets a young aspiring actress who in one of those film coincidences is listening to his music. Soon the two begin an affair which is fouled by his over-obsessiveness with her which costs them both a job at a restaurant.',
imdb: { rating: 6.3 }
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment