documentdb-indexing
Installation
SKILL.md
Indexing Strategies — Azure DocumentDB
Companion skill to documentdb-query-optimizer. That skill answers "why is this query slow?"; this one answers "which index should I create, and what shape should it take?".
Azure DocumentDB supports the standard MongoDB index types. Only _id is created automatically — every other index must be created explicitly. Default limit: 64 single-field indexes per collection (extendable to 300 on request).
Index engine types
_idvs regular indexes: The_idindex is a B-tree, created automatically, and cannot be dropped. For sharded collections the_idkey is composite — it includes a hash of the shard key. All other indexes created viacreateIndexare RUM indexes; the exception is geospatial indexes (2dsphere,2d), which are GiST indexes.