Here are all the actual test exam dumps for IT exams. Most people prepare for the actual exams with our test dumps to pass their exams. So it's critical to choose and actual test pdf to succeed.

Exam C100DEV Topic 4 Question 162 Discussion

Actual exam question for MongoDB's C100DEV exam
Question #: 162
Topic #: 4
You have the following index in a movies collection: { "title": 1, "imdb.rating": -1, "imdb.votes": -1, "type": 1 } Can the following query use the given index for both filtering and sorting?
db.movies.find( { "title": "James Bond", "imdb.rating": { "$gt": 8} } ).sort( { "imdb.rating": 1 } )

Suggested Answer: A Vote an answer

Yes, although this query does not use equality in the "imdb.rating" field of the index prefix, it does use the same field for sorting. https://docs.mongodb.com/manual/indexes/

by ariharasuthan0105 at Aug 24, 2025, 12:09 PM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
ariharasuthan0105
2025-08-24 12:09:31
Selected Answer: B
No, the given index cannot be used for both filtering and sorting in this query.
upvoted 1 times
...
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.