documentdb-indexing
/documentdb-indexing
Dobiera typ indeksu w Azure DocumentDB do wzorca zapytań, od pojedynczego pola po wektorowe, i ocenia koszt zapisu każdego indeksu.
- Autor
- azure ↗
- Repozytorium
- documentdb-agent-kit ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 01.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 12
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 01.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Dobiera typ indeksu w Azure DocumentDB do wzorca zapytań, od pojedynczego pola po wektorowe, i ocenia koszt zapisu każdego indeksu.
Oryginalny opis (EN)
Index-type selection and shape guidance for Azure DocumentDB — when to use single-field, compound (ESR), multikey, wildcard, hashed, 2dsphere, TTL, and vector indexes; query-pattern → index-shape cookbook; per-collection index budget; DocumentDB-specific preference for `textSearch` over community `$text`. Use when designing or reviewing indexes, choosing an index type for a query pattern, or deciding whether an additional index is worth the write cost.
Jak działa
- Rules
Podgląd SKILL.md
--- name: documentdb-indexing description: Index-type selection and shape guidance for Azure DocumentDB — when to use single-field, compound (ESR), multikey, wildcard, hashed, 2dsphere, TTL, and vector indexes; query-pattern → index-shape cookbook; per-collection index budget; DocumentDB-specific preference for `textSearch` over community `$text`. Use when designing or reviewing indexes, choosing an index type for a query pattern, or deciding whether an additional index is worth the write cost. license: MIT --- # 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 > **`_id` vs regular indexes:** The `_id` index is a **B-tree**, created automatically, and cannot be dropped. For sharded collections the `_id` key is composite — it includes a hash of the shard key. All other indexes created via `createIndex` are **RUM** indexes; the exception is geospatial indexes (`2dsphere`, `2d`), which are **GiST** indexes. ## Rules - [index-single-field](index-single-field.md) — When a single-field index is enough; direction, options (`unique`, `sparse`, `partial`, collation). - [index-compound-esr](index-compound-esr.md) — Compound index design via ESR (Equality → Sort → Range); prefer one compound over many singles. - [index-multikey-arrays](index-multikey-arrays.md) — Indexing array fields; the one-array-per-compound (parallel-array) restriction; multikey can't cover queries. - [index-text-prefer-textsearch](index-text-prefer-textsearch.md) — On Azure DocumentDB, prefer the `textSearch` index + `$search` over community `$text` indexes. - [index-wildcard-dynamic-schemas](index-wildcard-dynamic-schemas.md) — Wildcard indexes for truly dynamic schemas; cost vs benefit; scope the prefix. - [index-hashed-shard-keys](index-hashed-shard-keys.md) — Hashed indexes for even distribution; when sharding becomes necessary; shard-key alignment; range-query caveats. - [index-2dsphere-geospatial](index-2dsphere-geospatial.md) — GeoJSON types, `[longitude, latitude]` order, `$near` / `$geoWithin` / `$geoIntersects`. - [index-ttl-expiry](index-ttl-expiry.md) — TTL indexes: `expireAfterSeconds` semantics, date-field requirement, monitoring. - [index-count-budget](index-count-budget.md) — Keep 5–15 indexes per collection; review `$indexStats`; drop unused. - [index-lifecycle-drop-hide](index-lifecycle-drop-hide.md) — Safe lifecycle: inventory → detect redundancy → `hideIndex` → `dropIndex`. The `_id` index cannot be dropped. - [index-pattern-cookbook](index-pattern-cookbook.md) — Query-pattern → index-shape cookbook (equality+sort, multi-equality, selectivity ordering, $eq + $in mix, range+sort, equality+range, hybrid, partial index for large arrays).
Pliki w paczce (12)
- SKILL.md 3 KB
- index-2dsphere-geospatial.md 3 KB
- index-compound-esr.md 4 KB
- index-count-budget.md 3 KB
- index-hashed-shard-keys.md 3 KB
- index-lifecycle-drop-hide.md 4 KB
- index-multikey-arrays.md 3 KB
- index-pattern-cookbook.md 9 KB
- index-single-field.md 4 KB
- index-text-prefer-textsearch.md 3 KB
- index-ttl-expiry.md 3 KB
- index-wildcard-dynamic-schemas.md 2 KB
Wersje
W bazie nie ma innych skilli o nazwie documentdb-indexing.
Migawka bazy z 13.11.2026 · wersja paczki e38b4a2484ec (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 1 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95documentdb-query-optimizer
Pomaga przyspieszyć zapytania DocumentDB i MongoDB przez dobór indeksów, gdy użytkownik pyta o wydajność lub wolne zapytania. - 85azure-documentdb
Pomaga korzystać z Azure DocumentDB: wyszukiwanie wektorowe, API zgodne z MongoDB, change streams, replikacja między regionami i Data API. - 95documentdb-data-modeling
Podpowiada modelowanie danych w Azure DocumentDB: osadzanie czy referencje, limit 16 MB i denormalizacja pod odczyty. - 100analyzing-database-indexes
Pomaga przy indeksowaniu baz danych: projektuje i optymalizuje indeksy w celu poprawy wydajności zapytań. - 85azure-documentdb
Pomaga w Azure DocumentDB: API zgodnym z Mongo, wyszukiwaniu wektorowym, replikacji między regionami i strumieniach zmian. - 100mongodb
Pomaga modelować dokumenty MongoDB (embed czy reference, limit 16MB), dobierać indeksy według reguły ESR, pisać agregacje, obsługiwać transakcje i zabezpieczać wdrożenie.