I just upgraded from Mongo 3.2 to 4.2 and my .NET drivers to MongoDB.Driver 2.18.0, and I get this error
MongoDB.Driver.MongoCommandException: Command createIndexes failed: Error=2, Details='Response status code does not indicate success: BadRequest (400); Substatus: 0; Reason: (Message: {"Errors":["A duplicate spatial path '\/\"$v\"\/\"Coordinates\"\/\"$t\"\/?' was found in the set of spatial specifications. Ensure that spatial paths across the specifications are unique."]}
Indexes:
var challengeGeoIndexModel = new CreateIndexModel<Challenge>(Builders<Challenge>.IndexKeys.Geo2DSphere("Coordinates"));
var challengePackageAnchorChallengeCoordinatesIndexModel = new CreateIndexModel<ChallengePackage>(Builders<ChallengePackage>.IndexKeys.Geo2DSphere("AnchorChallenge.Coordinates"));
These indexes are for two different collections but throw the same error. They are applied via CreateMany
These indexes have worked fine for 2 years and broke with the update. Any idea what could be going on?