I, In Lab Facet I do not understantd the question, as for exemple for metacritic field there are 11 fields at max value 100, so not 'Top ten" !
Why are you concerned with how many values of 100 there are That wasn’t in the question, it’s actually even simpler than you think. Remember if you sort there will always be an order of sorts, and you are asked for the top ten… good luck!
You can follow this thread
The algorithm w/o details:
- Find all docs with “correct” imdb.rating and metacritic values.
- Create a facet:
2.1. imdb.rating: Sort and Limit
2.2. metacritic: Sort and Limit
- Find intersection.
The algorithm above is valid to get correct answer but it seems it’s not valid for task as it’s described.
For example, you have 11 documents with metacritic=100 and 4 documents with metacritic=99, in “movies” collection. there is no difference between 11 documents that have metacritic=100 - they are all top 1, but to get correct answer we have to suggest that 10 of this 11 documents are top 10 and the left document is in 11-th position in rating.
For the provided task description the algorithm should be as follows:
- group by metacritic and sort in descending order
- group by imdb.rating and sort in descending order
- get all documents where metacritic is greater or equal to minimum value from step 1 + imdb.rating is greater or equal to minimum value from step 2
It seems task description has to be specified more exactly.
To be a top 10 movie you need to be rated in metacritic and imdb.rating.
You could be the best metacritic movie but you will not be a top 10 movie if you do not have an imdb.rating.
The problem is that is not made clear by the question. It literally asks how many movies are in both top ten lists. From the information given, it could be read either way. The question is badly worded and needs to be modified to clarify the problem.
It especially problematic because these lists are independent - it is not logical to assume that the “Metacritic Top Ten” list only includes movies that have an IMDB rating, since that implies a dependency.
There is also the issue, especially for the metacritic list, that there may be more than ten movies in the “top ten”.
If you think the question is unclear (I don’t but that’s not the issue) then use the “Report an issue” tab at the bottom of the display to direct your comments to the curriculum team, preferably with suggested changes for clarity. Good luck.
The lecture was all about faceting, but then the lab answer can be found far more directly just using a single match statement. The lab question, while fun and interesting, might be better served with a problem that actually needs facets.
How would you interpret the question?
I can’t make heads or tails of it.
It’s a year old thread and I haven’t seen DHz create any posts for many months. So it would have been better to create a new thread.
What are you struggling with? Does this post help?
Thanks for your reply.
After reading more than five threads on this subject, each written by someone with the same problem I had, I made a correct guess and I moved on.
The post you linked to does indeed explain the problem in understanding that everyone is having.
Given that that post was written in October 2018, it’s discouraging that the lab question has not yet been updated.
Usually when a question has a minor error, we can fill in the gaps.
But in this case, the concept behind the question is not natural.
What the question is asking is “What are the Top 10 movies according to IMDB rating which also have a Metacritic score” and “What are the Top 10 movies according to Metacritic score which also have an IMDB rating” and “What movies are in the answers to both these questions”.
These are uninteresting questions in my opinion, as well as those of many other people who don’t understand the concept of the question.
We don’t care if the Top 10 IMDB movies have a Metacritic score or not. The Top 10 IMDB movies are just that, the top ten movies according to one single rating: the IMDB rating. And the same concept goes for the Metacritic Top 10.
Hope that this gets fixed in the future to save other MongoDB University students the rather big headache that we’ve all gone through with this.
In real world you’ll be needing to find only results that are Top X in multiple categories. movies may not be your thing - but the intersect concept needed to answer the question is pretty core.
I can relate a bit to the original question/confusion on asking for the top 10 and there are more than 10 all with a top score - - but in the end you realize that it is ok that way and the intersect is going to find within that pool of top docs…
I noticed the same thing. The “top ten” of Metacritic are randomly selected from a group of 11, all having a score of 100. There is no guarantee that the one that is left out is not the one that intersects with the IMDB top ten. To ease my mind on this, I used “imdb.rating” as a secondary sort field when selecting the top ten Metacritic. In a real world situation with dynamic data, I would think a secondary sort on both subpipelines would be a minimum precaution to take to mitigate the possibility of producing disjunct groups.
Don’t mean to nitpick the lab. At least we are taking these exercises seriously enough to think through them.
Thanks for sharing this feedback!!
We will definitely consider your feedback and make the necessary updates in the lab.