Indexing
Azure Cosmos DB, by default, assumes that each property in an item should be indexed. When a complex object is pushed into the collection, the object is treated as a tree with properties that make up the nodes and values, as well as the leaves. This way, each property on each branch of the tree is queryable. Each consequent object either uses the same index tree or expands it with additional properties.
This indexing behavior can be changed at any time for any collection. This can help with the costs and performance of the dataset. Index definition uses wildcard values to define which paths should be included and/or excluded.
For instance, let's take a look at the indexing policy of our AuctionsCollection:
/* declaration includes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access