MongoDB
C100DBA · Question #46
C100DBA Question #46: Real Exam Question with Answer & Explanation
Sign in or unlock C100DBA to reveal the answer and full explanation for question #46. The question stem and answer options stay visible for context.
Question
Given a collection posts as shown below having a document array comments, which of the following command will create an index on the comment author descending?
Exhibit
Options
- Adb.posts.createIndex({^comments.$.author":-l});
- Bdb. posts.createIndex({^comments.author" :1});
- Cdb.posts.createIndex({^commerits.author";-!});
Unlock C100DBA to see the answer
You've previewed enough free C100DBA questions. Unlock C100DBA for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
