Question: You have a collection named restaurants with the geographical information stored in the location property, how do you create a geospatial index on it?
- `db.restaurants.CreateIndex({location: "2dsphere"})`
- `db.restaurants.geospatial({location: "2dsphere"})`
- `db.restaurants.CreateIndex("2dsphere":"location")`
- `db.restaurants.CreateIndex({geospatial: "location"})`
Answer: The correct answer of the above question is Option A:`db.restaurants.CreateIndex({location: "2dsphere"})`