Skip to content

Commit 4cc34ae

Browse files
Update mongodb-indexing.md
1 parent 8d079f0 commit 4cc34ae

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

articles/cosmos-db/mongodb/mongodb-indexing.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.service: cosmos-db
55
ms.subservice: cosmosdb-mongo
66
ms.devlang: javascript
77
ms.topic: how-to
8-
ms.date: 10/13/2021
8+
ms.date: 4/5/2022
99
author: gahl-levy
1010
ms.author: gahllevy
1111
ms.custom: devx-track-js
@@ -242,16 +242,17 @@ In the preceding example, omitting the ```"university":1``` clause returns an er
242242
243243
#### Limitations
244244
245-
* On accounts that have continuous backup or synapse link enabled, unique indexes will need to be created while the collection is empty.
245+
On accounts that have continuous backup or synapse link enabled, unique indexes will need to be created while the collection is empty.
246246
247247
#### Unique partial indexes
248248
249-
Unique partial indexes can be created by specifying a partialFilterExpression along with the 'unique' constraint in the index. This results in the unique constraint being applied only to the documents that meet the specified filter expression. \
249+
Unique partial indexes can be created by specifying a partialFilterExpression along with the 'unique' constraint in the index. This results in the unique constraint being applied only to the documents that meet the specified filter expression.
250+
250251
The unique constraint will not be effective for documents that do not meet the specified criteria. As a result, other documents will not be prevented from being inserted into the collection.
251252
252253
This feature is supported with the Cosmos DB API for MongoDB versions 3.6 and above.
253254
254-
To create a unique partial index from Mongo Shell, use the command db.collection.createIndex() with the 'partialFilterExpression' option and 'unique' constraint.
255+
To create a unique partial index from Mongo Shell, use the command `db.collection.createIndex()` with the 'partialFilterExpression' option and 'unique' constraint.
255256
The partialFilterExpression option accepts a json document that specifies the filter condition using:
256257
257258
* equality expressions (i.e. field: value or using the $eq operator),

0 commit comments

Comments
 (0)