Skip to content

Commit cbc213a

Browse files
author
Thomas Weiss
committed
Fixed indexing policy examples
1 parent 62c34cb commit cbc213a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ ResourceResponse<DocumentCollection> containerResponse = await client.ReadDocume
378378
// Set the indexing mode to consistent
379379
containerResponse.Resource.IndexingPolicy.IndexingMode = IndexingMode.Consistent;
380380
// Add an included path
381-
containerResponse.Resource.IndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/age/*" });
381+
containerResponse.Resource.IndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/*" });
382382
// Add an excluded path
383383
containerResponse.Resource.IndexingPolicy.ExcludedPaths.Add(new ExcludedPath { Path = "/name/*" });
384384
// Add a spatial index
@@ -409,7 +409,7 @@ ContainerResponse containerResponse = await client.GetContainer("database", "con
409409
// Set the indexing mode to consistent
410410
containerResponse.Resource.IndexingPolicy.IndexingMode = IndexingMode.Consistent;
411411
// Add an included path
412-
containerResponse.Resource.IndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/age/*" });
412+
containerResponse.Resource.IndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/*" });
413413
// Add an excluded path
414414
containerResponse.Resource.IndexingPolicy.ExcludedPaths.Add(new ExcludedPath { Path = "/name/*" });
415415
// Add a spatial index
@@ -440,7 +440,7 @@ When defining a custom indexing policy while creating a new container, the SDK V
440440
await client.GetDatabase("database").DefineContainer(name: "container", partitionKeyPath: "/myPartitionKey")
441441
.WithIndexingPolicy()
442442
.WithIncludedPaths()
443-
.Path("/age/*")
443+
.Path("/*")
444444
.Attach()
445445
.WithExcludedPaths()
446446
.Path("/name/*")

0 commit comments

Comments
 (0)