Skip to content

Commit 9297233

Browse files
authored
Merge pull request #107183 from chwarr/cdb-index-policy-format
Link to Cosmos DB index policy JSON format desc.
2 parents 12a7d4e + 66090e7 commit 9297233

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

articles/cosmos-db/how-to-manage-indexing-policy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In Azure Cosmos DB, data is indexed following [indexing policies](index-policy.m
1414

1515
## Indexing policy examples
1616

17-
Here are some examples of indexing policies shown in their JSON format, which is how they are exposed on the Azure portal. The same parameters can be set through the Azure CLI or any SDK.
17+
Here are some examples of indexing policies shown in [their JSON format](index-policy.md#include-exclude-paths), which is how they are exposed on the Azure portal. The same parameters can be set through the Azure CLI or any SDK.
1818

1919
### Opt-out policy to selectively exclude some property paths
2020

@@ -148,7 +148,7 @@ This indexing policy is equivalent to the one below which manually sets ```kind`
148148
],
149149
"excludedPaths": [
150150
{
151-
"path": "/\"_etag\"/?"
151+
"path": "/_etag/?"
152152
}
153153
],
154154
"spatialIndexes": [

articles/cosmos-db/index-policy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Azure Cosmos DB supports two indexing modes:
2929
3030
By default, indexing policy is set to `automatic`. It's achieved by setting the `automatic` property in the indexing policy to `true`. Setting this property to `true` allows Azure CosmosDB to automatically index documents as they are written.
3131

32-
## Including and excluding property paths
32+
## <a id="include-exclude-paths"></a> Including and excluding property paths
3333

3434
A custom indexing policy can specify property paths that are explicitly included or excluded from indexing. By optimizing the number of paths that are indexed, you can lower the amount of storage used by your container and improve the latency of write operations. These paths are defined following [the method described in the indexing overview section](index-overview.md#from-trees-to-property-paths) with the following additions:
3535

@@ -70,7 +70,7 @@ Any indexing policy has to include the root path `/*` as either an included or a
7070

7171
- For paths with regular characters that include: alphanumeric characters and _ (underscore), you don’t have to escape the path string around double quotes (for example, "/path/?"). For paths with other special characters, you need to escape the path string around double quotes (for example, "/\"path-abc\"/?"). If you expect special characters in your path, you can escape every path for safety. Functionally it doesn’t make any difference if you escape every path Vs just the ones that have special characters.
7272

73-
- The system property "etag" is excluded from indexing by default, unless the etag is added to the included path for indexing.
73+
- The system property "_etag" is excluded from indexing by default, unless the etag is added to the included path for indexing.
7474

7575
When including and excluding paths, you may encounter the following attributes:
7676

0 commit comments

Comments
 (0)