Skip to content

Commit 338a4b8

Browse files
More edits.
1 parent 98a5ec3 commit 338a4b8

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ An [indexing policy update](../index-policy.md#modifying-the-indexing-policy) tr
273273
> [!NOTE]
274274
> When you update indexing policy, writes to Azure Cosmos DB are uninterrupted. Learn more about [indexing transformations](../index-policy.md#modifying-the-indexing-policy)
275275
276-
## Use the Azure portal
276+
### Use the Azure portal
277277

278278
Azure Cosmos DB containers store their indexing policy as a JSON document that the Azure portal lets you directly edit.
279279

@@ -291,15 +291,15 @@ Azure Cosmos DB containers store their indexing policy as a JSON document that t
291291

292292
:::image type="content" source="./media/how-to-manage-indexing-policy/indexing-policy-portal.png" alt-text="Manage Indexing using Azure portal":::
293293

294-
## Use the Azure CLI
294+
### Use the Azure CLI
295295

296296
To create a container with a custom indexing policy, see [Create a container with a custom index policy using CLI](manage-with-cli.md#create-a-container-with-a-custom-index-policy).
297297

298-
## Use PowerShell
298+
### Use PowerShell
299299

300300
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).
301301

302-
## <a id="dotnet-sdk"></a> Use the .NET SDK
302+
### <a id="dotnet-sdk"></a> Use the .NET SDK
303303

304304
# [.NET SDK V3](#tab/dotnetv3)
305305

@@ -390,7 +390,7 @@ long indexTransformationProgress = container.IndexTransformationProgress;
390390

391391
---
392392

393-
## Use the Java SDK
393+
### Use the Java SDK
394394

395395
The `DocumentCollection` object from the [Java SDK](https://mvnrepository.com/artifact/com.microsoft.azure/azure-cosmosdb) exposes the `getIndexingPolicy()` and `setIndexingPolicy()` methods. The `IndexingPolicy` object they manipulate lets you change the indexing mode and add or remove included and excluded paths. For more information, see [Quickstart: Build a Java app to manage Azure Cosmos DB for NoSQL data](quickstart-java.md).
396396

@@ -472,23 +472,23 @@ containerResponse.subscribe(result -> {
472472
});
473473
```
474474

475-
## Use the Node.js SDK
475+
### Use the Node.js SDK
476476

477477
The `ContainerDefinition` interface from [Node.js SDK](https://www.npmjs.com/package/@azure/cosmos) exposes an `indexingPolicy` property that lets you change the `indexingMode` and add or remove `includedPaths` and `excludedPaths`. For more information, see [Quickstart - Azure Cosmos DB for NoSQL client library for Node.js](quickstart-nodejs.md).
478478

479-
Retrieve the container's details
479+
Retrieve the container's details:
480480

481481
```javascript
482482
const containerResponse = await client.database('database').container('container').read();
483483
```
484484

485-
Set the indexing mode to consistent
485+
Set the indexing mode to consistent:
486486

487487
```javascript
488488
containerResponse.body.indexingPolicy.indexingMode = "consistent";
489489
```
490490

491-
Add included path including a spatial index
491+
Add included path including a spatial index:
492492

493493
```javascript
494494
containerResponse.body.indexingPolicy.includedPaths.push({
@@ -542,7 +542,7 @@ const containerResponse = await client.database('database').container('container
542542
const indexTransformationProgress = replaceResponse.headers['x-ms-documentdb-collection-index-transformation-progress'];
543543
```
544544

545-
## Use the Python SDK
545+
### Use the Python SDK
546546

547547
# [Python SDK V3](#tab/pythonv3)
548548

@@ -620,7 +620,7 @@ container_client = database_client.get_container_client('container')
620620
container = container_client.read()
621621
```
622622

623-
Set the indexing mode to consistent
623+
Set the indexing mode to consistent:
624624

625625
```python
626626
indexingPolicy = {

0 commit comments

Comments
 (0)