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?

  1. `db.restaurants.CreateIndex({location: "2dsphere"})`
  2. `db.restaurants.geospatial({location: "2dsphere"})`
  3. `db.restaurants.CreateIndex("2dsphere":"location")`
  4. `db.restaurants.CreateIndex({geospatial: "location"})`

Answer: The correct answer of the above question is Option A:`db.restaurants.CreateIndex({location: "2dsphere"})`