Answers are AI-generated. Review them carefully with the confidence label.
MongoDB DBA · Question 374 · Single choice
You have the following document in a collection:
{
"_id": ObjectId("570c04a4ad233577f97dc459"),
"team": "Eagles",
"location": { "state": "PA", "city": "Philadelphia" }
}
Which of the following commands would you use to create an index on the "state" field?
Choose the best answer:
This question appears in 2 bank records. Public pages combine identical prompts and options. Selected questions display the highest-confidence record; the others show a short preview. Paper-based learning preserves each record's answer, explanation, and confidence.