Cosmosdb Indexing

Azure Cosmos DB indexing strategy best practices: excluding unused paths, composite indexes for ORDER BY, spatial indexes, index types, path syntax, and indexing modes (consistent vs lazy). USE FOR: Cosmos DB indexing policy, exclude paths, composite index, spatial index, index path syntax /? /* /[], range vs hash index, lazy vs consistent indexing, index direction, write overhead reduction. DO NOT USE FOR: query optimization (use cosmosdb-query-optimization), full-text search indexes (use cosmosdb-full-text-search), vector indexes (use cosmosdb-vector-search).

atc-net Updated 5 repo stars
atc-blast-radius holding rm -rf build, listing the three files it would delete, with Cancel selected and Proceed below

File contents

Azure Cosmos DB Indexing Strategies

Best practices for configuring indexing policies in Azure Cosmos DB.

When to Apply

Reference these guidelines when:

  • Configuring indexing policies
  • Adding composite indexes for multi-field ORDER BY
  • Optimizing write costs by excluding unused paths
  • Setting up spatial indexes for geo queries

Rules

  • index-exclude-unused - Exclude paths never queried
  • index-path-syntax - Use correct path notation
  • index-composite - Use composite indexes for ORDER BY
  • index-composite-direction - Match composite index directions
  • index-spatial - Add spatial indexes for geo queries
  • index-range-vs-hash - Choose appropriate index types
  • index-lazy-consistent - Understand indexing modes

atc-net/atc-agentic-toolkit commit bf810aa7d3

Frequently asked questions

npx get-skill add atc-net/cosmosdb-indexing