General availability: Unique partial indexes in Azure Cosmos DB API for MongoDB

Azure Updates

Discussionpowered by zap.ms

Published

Apr 27, 2022

Status

Launched

Timeline

  • April 2022
    General Availability

Product

Azure Cosmos DB

Tag

Features

Category

Databases
Internet of Things

Description

The unique partial indexes feature allows you more flexibility to specify exactly which fields in which documents you’d like to index, all while enforcing uniqueness of that field’s value. This feature is used by specifying a partialFilterExpression when creating the index along with a 'unique' constraint in your Azure Cosmos DB API for MongoDB index. This results in the unique constraint being applied only to the documents that meet the specified filter expression. 

Learn more.