Lab-$facets Wrong solution query: More than 10 movies with max metacritic score of 100

The result is correct but the provided query solution is not : there are more than 10 movies with the maximal metacritic score of 100 (11 exactly). Nowhere says that you should select the 10 best by score and “title order”. Therefore you cannot order decreasing by metacritic score and select the first 10 since there are more than 10 with the same score.

In summary, one cannot select a top 10 by metacritic score because there are 11 movies with the same max score of 100.

Please reformulate the question, I wasted a lot of time because of this.

Hi @Lucia_de_Espona i just solved the problem, and i spend a lot of time with this too, in my case there was a bad data in one field, removing the records with bad values before the $facet should help you, Compass can get this bad data explicit too.

Hi @Joao_Leonardo_Lemos, maybe I did not explain well the issue. The problem is that before you apply limit 10, when sorting by metacritic score, there are 11 movies with the same 100 score and there is no other sorting criteria specified in the question. Therefore one cannot know which 10 are going to be taken by the limit operator. As far I remember I tried also the query provided as a solution and there were still 11 movies with metacritic score 100 before applying the limit 10. In the solution they sort by score and title which is nowhere mentioned in the assignment instructions. Luckily I got the right answer anyway, I’ll give it another try when I have time. Thanks a lot for your answer! :slightly_smiling_face:

So, question for @Lucia_de_Espona: if you take those 11 as the first pipeline stage, then do your faceted query in the second stage, you can see the imdb.rating and count of how many had that imdb rating for each of those 11. Would this not also tell you the correct answer?

Sure, you can get the right result by taking the best 11 but that is not what was asked in the question or performed by the proposed query.

In my opinion it is not correct to ask for the first best 10 movies by metacritic score if there are 11 with the maximal score. It is also not correct to select 10 in the proposed solution query by sorting by metacritic score and title when that kind of sorting it is not mentioned in the assignment text.

Just to clarify, I got the correct result right away but was very confused about getting 11 top movies and spent quite some time reviewing my solution for nothing.

Anyway, please consider this discussion closed, I only intended to make the teachers aware of this issue. Thanks for your response!

1 Like

I understand, i got confused too, but they dont seem very willing to fix the course issues, then we need to guess… hahaaha but you are right!!

But even with the issues the course is nice.