New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

MongoDB C100DBA Exam - Topic 1 Question 64 Discussion

Actual exam question for MongoDB's C100DBA exam
Question #: 64
Topic #: 1
[All C100DBA Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: A, B, C

Contribute your Thoughts:

0/2000 characters
Michael
4 months ago
Wait, are we sure about the index direction?
upvoted 0 times
...
Adell
4 months ago
I agree, A seems to be the best choice!
upvoted 0 times
...
Veronika
4 months ago
C has too many errors, definitely not it.
upvoted 0 times
...
Margurite
4 months ago
I think B is correct, but I'm not sure.
upvoted 0 times
...
Lang
4 months ago
Option A looks like the right syntax.
upvoted 0 times
...
Lorita
5 months ago
I thought the index command needed to be formatted correctly, but I'm confused by the extra characters in the options.
upvoted 0 times
...
Youlanda
5 months ago
I practiced a similar question, and I feel like the correct option should have 'comments.author' in it, but I can't remember the exact format.
upvoted 0 times
...
Nan
5 months ago
I remember something about using a negative value for descending order, but I can't recall the exact command.
upvoted 0 times
...
Dallas
5 months ago
I think the index should be created on the comments array, but I'm not sure about the syntax.
upvoted 0 times
...
Oretha
5 months ago
I'm a bit unsure on this one. I know the "advertise-label ipv4" command is related to distributing labeled IPv4 routes, but I'm not 100% sure of the exact placement in an inter-AS VPRN setup. I'll have to think it through carefully.
upvoted 0 times
...
Marlon
5 months ago
The question is asking about the customer environment, so I'm thinking SAN performance, storage capacity, and network performance would be the best choices to assist with that.
upvoted 0 times
...
Helga
5 months ago
This seems pretty straightforward. I'd go with creating a footer to display the page number on each page.
upvoted 0 times
...
Cora
9 months ago
I'm going with B. db.posts.createIndex({\'comments.author\':1}). It's the only one that looks like it actually creates an index on the 'comments' subdocument. The others seem a bit... creative.
upvoted 0 times
...
Gerardo
9 months ago
Hmm, this one's tricky. Is the answer B? db.posts.createIndex({\'comments.author\':1})? I hope I'm not just making a comment on the wrong post!
upvoted 0 times
...
Lashawn
9 months ago
I'm pretty sure the correct answer is C. db.posts.createIndex({\'^commerits.author\':-1}). Oops, my bad, I misspelled 'comments'!
upvoted 0 times
Quentin
8 months ago
Lamar: Oops, my bad, I misspelled 'comments'! So, the correct answer is C) db.posts.createIndex({'comments.author':-1}).
upvoted 0 times
...
Nieves
8 months ago
User 3: Actually, I think it's C) db.posts.createIndex({'comments.author':-1}).
upvoted 0 times
...
Elmira
8 months ago
User 3: Oops, my bad, I misspelled 'comments'! The correct answer is B) db.posts.createIndex({^comments.author\' :1});
upvoted 0 times
...
Lamar
8 months ago
User 2: No, I believe the correct answer is B) db.posts.createIndex({'comments.author':1}).
upvoted 0 times
...
Chandra
8 months ago
User 2: No, it's actually B) db.posts.createIndex({^comments.author\' :1});
upvoted 0 times
...
Gennie
9 months ago
User 1: I think the correct answer is A) db.posts.createIndex({^comments.$.author\':-1});
upvoted 0 times
...
Isaiah
9 months ago
User 1: I think the correct answer is A) db.posts.createIndex({'comments.$.author':-1}).
upvoted 0 times
...
...
Rosalyn
10 months ago
I think the answer is A. db.posts.createIndex({\'^comments.$.author\':-1}). It seems to create an index on the 'author' field of the 'comments' subdocument in descending order.
upvoted 0 times
Monroe
10 months ago
User2: I think it might be B) db. posts.createIndex({^comments.author\' :1}).
upvoted 0 times
...
Tricia
10 months ago
User1: I agree with you, A) db.posts.createIndex({^comments.$.author\':-1}) looks like the correct command.
upvoted 0 times
...
...
Susana
11 months ago
I'm not sure, but I think option A might be correct as it mentions creating an index on comment author in descending order.
upvoted 0 times
...
Delisa
11 months ago
The correct answer is B. db.posts.createIndex({\'comments.author\':1}). The command creates an index on the 'author' field of the 'comments' subdocument in the 'posts' collection, in ascending order.
upvoted 0 times
Odelia
9 months ago
Yes, the correct answer is B. It creates an index on the 'author' field of the 'comments' subdocument.
upvoted 0 times
...
Maira
9 months ago
Oh, I see. Thanks for clarifying. I was confused between A and B.
upvoted 0 times
...
Brittni
9 months ago
No, I believe the correct answer is B) db.posts.createIndex({^comments.author\' :1});
upvoted 0 times
...
Kassandra
10 months ago
I think the answer is A) db.posts.createIndex({^comments.$.author\':-1});
upvoted 0 times
...
...
Marshall
11 months ago
I agree with Chara, option B seems to be the right choice because it specifies the index on comment author in ascending order.
upvoted 0 times
...
Chara
11 months ago
I think the correct command is B) db.posts.createIndex({^comments.author :1});
upvoted 0 times
...

Save Cancel