{"id":4164,"date":"2022-04-20T05:00:08","date_gmt":"2022-04-20T12:00:08","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cosmosdb\/?p=4164"},"modified":"2023-05-05T07:07:32","modified_gmt":"2023-05-05T14:07:32","slug":"larger-document-sizes-unique-index-improvements-expr-support-in-azure-cosmos-db-api-for-mongodb","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cosmosdb\/larger-document-sizes-unique-index-improvements-expr-support-in-azure-cosmos-db-api-for-mongodb\/","title":{"rendered":"Larger document sizes and $expr support in Azure Cosmos DB API for MongoDB"},"content":{"rendered":"<p>We are excited to announce these recent updates in <a href=\"https:\/\/docs.microsoft.com\/azure\/cosmos-db\/mongodb\/mongodb-introduction\" target=\"_blank\" rel=\"noopener\">Azure Cosmos DB API for MongoDB<\/a> that enable larger document sizes and expressions in your queries.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>16MB document support (General Availability)<\/strong><\/p>\n<p>To keep database operations as efficient as possible, it is best practice to keep documents to a small size. This applies to Azure Cosmos DB API for MongoDB as well as MongoDB. However, in some application use cases, larger documents may be required and beneficial.<\/p>\n<p>We\u2019re happy to announce the public preview of 16MB document support in Azure Cosmos DB API for MongoDB. You can sign up for this preview through the Azure portal:<\/p>\n<ol>\n<li>Go to \u201cPreview Features\u201d area in your Azure subscription.<\/li>\n<li>Under \u201cType\u201d, select \u201cMicrosoft.DocumentDB\u201d.<\/li>\n<li>Click on \u201c<a class=\"ext-afec-activatable-text\" data-bind=\"text: value\">Azure Cosmos DB API For MongoDB 16MB Document Support<\/a>\u201d in the list of available preview features.<\/li>\n<li>Click the \u201cRegister\u201d button at the bottom of the page to join the preview-<\/li>\n<\/ol>\n<p><figure id=\"attachment_4166\" aria-labelledby=\"figcaption_attachment_4166\" class=\"wp-caption alignnone\" ><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2022\/04\/16mbPreview.png\"><img decoding=\"async\" class=\"wp-image-4166\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2022\/04\/16mbPreview-300x169.png\" alt=\"Image 16mbPreview\" width=\"715\" height=\"403\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2022\/04\/16mbPreview-300x169.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2022\/04\/16mbPreview.png 624w\" sizes=\"(max-width: 715px) 100vw, 715px\" \/><\/a><figcaption id=\"figcaption_attachment_4166\" class=\"wp-caption-text\"><em>Screenshot of Azure portal<\/em><\/figcaption><\/figure><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/azure\/cosmos-db\/concepts-limits#per-item-limits\" target=\"_blank\" rel=\"noopener\">Learn more<\/a> about Azure Cosmos DB limits and quotas.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Support for query expressions with $expr <\/strong>(General Availability)<\/p>\n<p>$expr allows the use of aggregation expressions while querying the Azure Cosmos DB API for MongoDB data.<\/p>\n<p>It follows the syntax below:<\/p>\n<p><span style=\"font-family: 'courier new', courier, monospace;\">{ $expr: { &lt;expression&gt; } }<\/span><\/p>\n<p>The arguments can be any valid aggregation expression.<\/p>\n<p>Read about supported operators in Azure Cosmos DB API for MongoDB in this <a href=\"https:\/\/docs.microsoft.com\/azure\/cosmos-db\/mongodb\/feature-support-42#operators\" target=\"_blank\" rel=\"noopener\">doc<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are excited to announce these recent updates in Azure Cosmos DB API for MongoDB that enable larger document sizes and expressions in your queries. &nbsp; 16MB document support (General Availability) To keep database operations as efficient as possible, it is best practice to keep documents to a small size. This applies to Azure Cosmos [&hellip;]<\/p>\n","protected":false},"author":79038,"featured_media":4166,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[15],"tags":[],"class_list":["post-4164","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mongodb-api"],"acf":[],"blog_post_summary":"<p>We are excited to announce these recent updates in Azure Cosmos DB API for MongoDB that enable larger document sizes and expressions in your queries. &nbsp; 16MB document support (General Availability) To keep database operations as efficient as possible, it is best practice to keep documents to a small size. This applies to Azure Cosmos [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/4164","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/users\/79038"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/comments?post=4164"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/4164\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media\/4166"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media?parent=4164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/categories?post=4164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/tags?post=4164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}