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?

Suggested Answer: A, B, C
Get Premium C100DBA Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
33 comments · newest first
MI
Michael
11 months ago
Wait, are we sure about the index direction?
AD
Adell
11 months ago
I agree, A seems to be the best choice!
VE
Veronika
12 months ago
C has too many errors, definitely not it.
MA
Margurite
12 months ago
I think B is correct, but I'm not sure.
LA
Lang
12 months ago
Option A looks like the right syntax.
LO
Lorita
1 year ago
I thought the index command needed to be formatted correctly, but I'm confused by the extra characters in the options.
YO
Youlanda
1 year 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.
NA
Nan
1 year ago
I remember something about using a negative value for descending order, but I can't recall the exact command.
DA
Dallas
1 year ago
I think the index should be created on the comments array, but I'm not sure about the syntax.
OR
Oretha
1 year 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.
MA
Marlon
1 year 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.
HE
Helga
1 year ago
This seems pretty straightforward. I'd go with creating a footer to display the page number on each page.
CO
Cora
1 year 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.
GE
Gerardo
1 year 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!
LA
Lashawn
1 year ago
I'm pretty sure the correct answer is C. db.posts.createIndex({\'^commerits.author\':-1}). Oops, my bad, I misspelled 'comments'!
QU
Quentin
1 year ago
Lamar: Oops, my bad, I misspelled 'comments'! So, the correct answer is C) db.posts.createIndex({'comments.author':-1}).
NI
Nieves
1 year ago
User 3: Actually, I think it's C) db.posts.createIndex({'comments.author':-1}).
EL
Elmira
1 year ago
User 3: Oops, my bad, I misspelled 'comments'! The correct answer is B) db.posts.createIndex({^comments.author\' :1});
LA
Lamar
1 year ago
User 2: No, I believe the correct answer is B) db.posts.createIndex({'comments.author':1}).
CH
Chandra
1 year ago
User 2: No, it's actually B) db.posts.createIndex({^comments.author\' :1});
GE
Gennie
1 year ago
User 1: I think the correct answer is A) db.posts.createIndex({^comments.$.author\':-1});
IS
Isaiah
1 year ago
User 1: I think the correct answer is A) db.posts.createIndex({'comments.$.author':-1}).
RO
Rosalyn
1 year 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.
MO
Monroe
1 year ago
User2: I think it might be B) db. posts.createIndex({^comments.author\' :1}).
TR
Tricia
1 year ago
User1: I agree with you, A) db.posts.createIndex({^comments.$.author\':-1}) looks like the correct command.
SU
Susana
2 years 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.
DE
Delisa
2 years 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.
OD
Odelia
1 year ago
Yes, the correct answer is B. It creates an index on the 'author' field of the 'comments' subdocument.
MA
Maira
1 year ago
Oh, I see. Thanks for clarifying. I was confused between A and B.
BR
Brittni
1 year ago
No, I believe the correct answer is B) db.posts.createIndex({^comments.author\' :1});
KA
Kassandra
1 year ago
I think the answer is A) db.posts.createIndex({^comments.$.author\':-1});
MA
Marshall
2 years ago
I agree with Chara, option B seems to be the right choice because it specifies the index on comment author in ascending order.
CH
Chara
2 years ago
I think the correct command is B) db.posts.createIndex({^comments.author :1});