i'm trying run existing application with a new AWS DocumentDB service. From mongo shell i tried to run
db.geojson.createIndex( { geoData : "2dsphere" , sessionId:1 } )
and received
{ "ok" : 0, "errmsg" : "Index type not supported : 2dsphere", "code" : 303 }
this code works well with actual MongoDb instance, but not with new AWS service, which supposed to be compatible with MongoDB 3.6
No. AWS DocumentDB does not support geospatial index or queries. There are several index limitations detailed here: https://docs.aws.amazon.com/documentdb/latest/developerguide/mongo-apis-index.html
In order to use 2dsphere index you can use MongoDB Atlas on AWS and have access to the full set of MongoDB API and features.
https://cloud.mongodb.com
These are the indexes supported by DocumentDB at the time of this posting:
Single Field Index - Yes
Compound Index - Yes
Multikey Index - Yes
Text Index - No
2dsphere - No
2d Index - No
Hashed Index - No
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With