Skip to content

Commit b5ab057

Browse files
committed
Adding tabs
1 parent 99aa94a commit b5ab057

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,9 @@ To create a container with a custom indexing policy see, [Create a container wit
366366

367367
To create a container with a custom indexing policy see, [Create a container with a custom index policy using Powershell](manage-with-powershell.md#create-container-custom-index)
368368

369-
## Use the .NET SDK V2
369+
## Use the .NET SDK
370+
371+
# [.NET SDK V2](#tab/dotnetv2)
370372

371373
The `DocumentCollection` object from the [.NET SDK v2](https://www.nuget.org/packages/Microsoft.Azure.DocumentDB/) exposes an `IndexingPolicy` property that lets you change the `IndexingMode` and add or remove `IncludedPaths` and `ExcludedPaths`.
372374

@@ -396,7 +398,7 @@ ResourceResponse<DocumentCollection> container = await client.ReadDocumentCollec
396398
long indexTransformationProgress = container.IndexTransformationProgress;
397399
```
398400

399-
## Use the .NET SDK V3
401+
# [.NET SDK V3](#tab/dotnetv3)
400402

401403
The `ContainerProperties` object from the [.NET SDK v3](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/) (see [this Quickstart](create-sql-api-dotnet.md) regarding its usage) exposes an `IndexingPolicy` property that lets you change the `IndexingMode` and add or remove `IncludedPaths` and `ExcludedPaths`.
402404

@@ -452,6 +454,7 @@ await client.GetDatabase("database").DefineContainer(name: "container", partitio
452454
.Attach()
453455
.CreateIfNotExistsAsync();
454456
```
457+
---
455458

456459
## Use the Java SDK
457460

@@ -605,7 +608,9 @@ const containerResponse = await client.database('database').container('container
605608
const indexTransformationProgress = replaceResponse.headers['x-ms-documentdb-collection-index-transformation-progress'];
606609
```
607610

608-
## Use the Python SDK V3
611+
## Use the Python SDK
612+
613+
# [Python SDK V3](#tab/pythonv3)
609614

610615
When using the [Python SDK V3](https://pypi.org/project/azure-cosmos/) (see [this Quickstart](create-sql-api-python.md) regarding its usage), the container configuration is managed as a dictionary. From this dictionary, it is possible to access the indexing policy and all its attributes.
611616

@@ -669,7 +674,7 @@ Update the container with changes
669674
response = client.ReplaceContainer(containerPath, container)
670675
```
671676

672-
## Use the Python SDK V4
677+
# [Python SDK V4](#tab/pythonv4)
673678

674679
When using the [Python SDK V4](https://pypi.org/project/azure-cosmos/), the container configuration is managed as a dictionary. From this dictionary, it is possible to access the indexing policy and all its attributes.
675680

@@ -734,6 +739,7 @@ Update the container with changes
734739
```python
735740
response = database_client.replace_container(container_client, container['partitionKey'], indexingPolicy)
736741
```
742+
---
737743

738744
## Next steps
739745

0 commit comments

Comments
 (0)