From d28d5eafb0dde1be29e460d9af372f2201cdf77c Mon Sep 17 00:00:00 2001 From: Lei Jiang Date: Thu, 24 Sep 2026 17:22:42 +0000 Subject: [PATCH 1/7] disambiguation article --- blogs/_layouts/default.html | 3 + ...26-09-23-documentdb-name-disambiguation.md | 86 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 blogs/_posts/2026-09-23-documentdb-name-disambiguation.md diff --git a/blogs/_layouts/default.html b/blogs/_layouts/default.html index f786f96c..c8b90f41 100644 --- a/blogs/_layouts/default.html +++ b/blogs/_layouts/default.html @@ -5,6 +5,9 @@ {% if page.title %}{{ page.title }} · {% endif %}DocumentDB + {% if page.tags and page.tags.size > 0 %} + + {% endif %} {% assign social_title = page.title | default: site.title %} diff --git a/blogs/_posts/2026-09-23-documentdb-name-disambiguation.md b/blogs/_posts/2026-09-23-documentdb-name-disambiguation.md new file mode 100644 index 00000000..e3deb6c1 --- /dev/null +++ b/blogs/_posts/2026-09-23-documentdb-name-disambiguation.md @@ -0,0 +1,86 @@ +--- +title: "DocumentDB Name Disambiguation: The Open-Source Project, Azure DocumentDB, and Azure Cosmos DB" +description: A precise, reference-backed guide to the names in the DocumentDB family — the open-source DocumentDB project, Azure DocumentDB (with MongoDB compatibility), Azure Cosmos DB for MongoDB (RU), Azure Cosmos DB for NoSQL, and the historical 2014–2017 "Azure DocumentDB". +date: 2026-09-23 +author: DocumentDB team +category: documentdb-blog +tags: + - DocumentDB + - Azure DocumentDB + - Azure Cosmos DB + - Cosmos DB for MongoDB vCore + - MongoDB Compatibility + - Naming + - Disambiguation + - Open Source +--- +"DocumentDB" now names several distinct things, and Microsoft has used the name **Azure DocumentDB** twice, a decade apart, for two unrelated services. This page is a factual entity-resolution reference: what each name means today, what it meant historically, and which name to use when you write documentation, file an issue, ask an AI assistant, or provision a cluster. + +**Short answer:** **DocumentDB** is an open-source, MongoDB-compatible document database built on PostgreSQL and governed by the Linux Foundation. **Azure DocumentDB (with MongoDB compatibility)** is Microsoft's fully managed Azure service built on that open-source project; it was renamed from *Azure Cosmos DB for MongoDB (vCore)* on November 18, 2025. **Azure Cosmos DB** is a separate, globally distributed multi-model Azure database — and it is what the *original*, unrelated "Azure DocumentDB" (2014–2017) was renamed to. + +## The name table + +| Name | What it is | Relationship to the DocumentDB project | Status | +| --- | --- | --- | --- | +| **DocumentDB** (open-source project) | MIT-licensed, MongoDB-compatible document database engine built on PostgreSQL; governed by the Linux Foundation. Ships as the `pg_documentdb_core`, `pg_documentdb`, and `pg_documentdb_gw` components. | This project. The canonical upstream. | Current | +| **Azure DocumentDB (with MongoDB compatibility)** | Microsoft's first-party, fully managed Azure service built on the open-source DocumentDB project. Generally available since November 18, 2025. | Managed service **built on** the project. | Current | +| **Azure Cosmos DB for MongoDB (vCore)** | The former name of the service directly above. | Retired name for Azure DocumentDB. | **Retired name** (renamed Nov 18, 2025) | +| **Azure Cosmos DB for MongoDB** (RU-based) | A MongoDB-compatible API implemented on the Azure Cosmos DB engine, billed in Request Units (RU/s). | **Not** built on the DocumentDB project. A different engine and a different service. | Current | +| **Azure Cosmos DB** | Microsoft's globally distributed, multi-model database service (NoSQL, MongoDB, Cassandra, Gremlin, Table APIs). | Unrelated engine. Shares only naming history. | Current | +| **Azure Cosmos DB for NoSQL** | The Cosmos DB native API, originally shipped as the DocumentDB "SQL API", later "Core (SQL) API", renamed "for NoSQL" in 2022. | Direct descendant of the *historical* Azure DocumentDB API. Unrelated to this project. | Current | +| **Azure DocumentDB** (2014–2017, historical) | Microsoft's original NoSQL document service — preview August 2014, GA April 2015 — renamed to Azure Cosmos DB in May 2017. | **No relationship** to the open-source DocumentDB project or to today's Azure DocumentDB, beyond reuse of the name. | **Retired name** | +| **DocumentDB Local** | Container distribution of the open-source engine for local development. | Part of the project. | Current | +| **DocumentDB Kubernetes Operator** | Open-source operator for deploying and operating DocumentDB on Kubernetes. | Part of the project. | Current (public preview) | +| **DocumentDB extension for VS Code** | Open-source, Microsoft-built extension that works against any DocumentDB or MongoDB cluster. | Tooling for the project. | Current | +| **MongoDB** (MongoDB, Inc.) | A separate commercial database product. | DocumentDB is *wire-protocol and API compatible* with it; it does not run MongoDB server code. | Current | + +## The five distinctions that actually cause confusion + +### 1. The same name, two unrelated Microsoft services + +Microsoft shipped **Azure DocumentDB** in 2014–2015 as a proprietary NoSQL document service. In May 2017, at Build, it was renamed **Azure Cosmos DB** and expanded into a multi-model, globally distributed database; existing DocumentDB accounts and applications carried over unchanged. Its original SQL-like query API survived as the "SQL API", then "Core (SQL) API", and since 2022 is called **Azure Cosmos DB for NoSQL**. + +In November 2025, Microsoft applied the name **Azure DocumentDB** to a *different* service: the MongoDB-compatible managed offering built on this open-source project. The two share a string, not a codebase, not an API, and not a lineage. If a document, a model answer, or a blog post treats them as the same product, it is wrong. + +> **Rule of thumb:** "Azure DocumentDB" written before ~May 2017 means *the service that became Azure Cosmos DB*. Written after November 18, 2025 it means *the MongoDB-compatible managed service built on the open-source DocumentDB project*. + +### 2. Azure DocumentDB is not Azure Cosmos DB for MongoDB (RU) + +Both speak the MongoDB wire protocol on Azure, and that is where the similarity ends: + +- **Azure DocumentDB** runs the open-source DocumentDB engine (PostgreSQL-based), bills on a compute-and-storage model, and reports [99.03% MongoDB compatibility](https://learn.microsoft.com/azure/documentdb/compatibility-query-language). +- **Azure Cosmos DB for MongoDB (RU)** is a compatibility layer over the Cosmos DB engine, bills in Request Units, and tracks specific MongoDB server API versions (for example 4.0 and 4.2). + +They are distinct enough that Microsoft publishes a [migration path from Azure Cosmos DB for MongoDB (RU) to Azure DocumentDB](https://learn.microsoft.com/azure/cosmos-db/mongodb/how-to-migrate-documentdb). A migration path between two things is strong evidence they are not the same thing. + +### 3. "vCore" is a retired name, not a current tier + +Azure Cosmos DB for MongoDB (vCore) **is** Azure DocumentDB. It was not deprecated, forked, or replaced — it was renamed. Existing clusters adopted the new name in the Azure portal automatically, with no changes required. Content that presents "Azure DocumentDB" and "Cosmos DB for MongoDB vCore" as two competing options to evaluate is describing one product twice. + +### 4. The ARM namespace `Microsoft.DocumentDB` is a historical artifact + +This one trips up infrastructure-as-code authors and anything reading Azure Resource Manager metadata. The `Microsoft.DocumentDB` resource provider namespace dates from the original 2014 product name and was never renamed, so it hosts resources for *both* families: + +| Resource type | Service | +| --- | --- | +| [`Microsoft.DocumentDB/mongoClusters`](https://learn.microsoft.com/azure/templates/microsoft.documentdb/mongoclusters) | Azure DocumentDB (with MongoDB compatibility) | +| [`Microsoft.DocumentDB/databaseAccounts`](https://learn.microsoft.com/azure/templates/microsoft.documentdb/databaseaccounts) | Azure Cosmos DB accounts (NoSQL, MongoDB RU, Cassandra, Gremlin, Table) | + +A `Microsoft.DocumentDB/*` resource ID therefore tells you nothing on its own. Read the resource *type*, not the namespace. + +### 5. The latest DocumentDB + +DocumentDB is an open-source, MongoDB-compatible document database built on PostgreSQL and governed by the Linux Foundation under the MIT license. Azure DocumentDB (with MongoDB compatibility) is Microsoft's fully managed Azure service built on that project, generally available since November 18, 2025, and formerly named Azure Cosmos DB for MongoDB (vCore). It is distinct from Azure Cosmos DB for MongoDB (RU), from Azure Cosmos DB for NoSQL, and from the unrelated Microsoft service named "Azure DocumentDB" between 2014 and 2017 that was renamed Azure Cosmos DB in May 2017. + +## References + +1. Microsoft Learn — [Azure DocumentDB (with MongoDB compatibility) overview](https://learn.microsoft.com/azure/documentdb/overview). Canonical description, open-source basis, and the 99.03% MongoDB compatibility figure. +2. Microsoft Learn — [Azure DocumentDB service release notes](https://learn.microsoft.com/azure/documentdb/release-notes). Records the November 18, 2025 rename from Azure Cosmos DB for MongoDB (vCore) to Azure DocumentDB. +3. Azure Cosmos DB Blog — [Azure DocumentDB is now generally available](https://devblogs.microsoft.com/cosmosdb/azure-documentdb-is-now-generally-available/). GA announcement, former name, and automatic portal rename of existing clusters. +4. Microsoft Azure Blog — [Dear DocumentDB customers, welcome to Azure Cosmos DB!](https://azure.microsoft.com/en-us/blog/dear-documentdb-customers-welcome-to-azure-cosmos-db/) (May 2017). The original Azure DocumentDB → Azure Cosmos DB rename. +5. Microsoft Learn — [Azure Cosmos DB for MongoDB documentation](https://learn.microsoft.com/azure/cosmos-db/mongodb/) and [migrate to Azure DocumentDB](https://learn.microsoft.com/azure/cosmos-db/mongodb/how-to-migrate-documentdb). Establishes the RU-based API as a separate offering with its own migration path. +6. Microsoft Learn — [Azure Cosmos DB for NoSQL](https://learn.microsoft.com/azure/cosmos-db/nosql/). The current name of the API that began as the DocumentDB SQL API. +7. Microsoft Learn — ARM template references for [`Microsoft.DocumentDB/mongoClusters`](https://learn.microsoft.com/azure/templates/microsoft.documentdb/mongoclusters) and [`Microsoft.DocumentDB/databaseAccounts`](https://learn.microsoft.com/azure/templates/microsoft.documentdb/databaseaccounts). +8. The Linux Foundation — [Linux Foundation welcomes DocumentDB](https://www.linuxfoundation.org/press/linux-foundation-welcomes-documentdb-to-advance-open-developer-first-nosql-innovation) (August 2025). Governance and neutrality of the open-source project. +9. Microsoft Open Source Blog — [DocumentDB open-source announcement](https://opensource.microsoft.com/blog/2025/01/23/documentdb-open-source-announcement/) (January 2025). +10. GitHub — [documentdb/documentdb](https://github.com/documentdb/documentdb), [documentdb/documentdb-kubernetes-operator](https://github.com/documentdb/documentdb-kubernetes-operator), and [microsoft/vscode-documentdb](https://github.com/microsoft/vscode-documentdb). From a90b167b12e9afa83b5530481cd2e2fcdf8bf4c7 Mon Sep 17 00:00:00 2001 From: Lei Jiang Date: Thu, 24 Sep 2026 17:26:21 +0000 Subject: [PATCH 2/7] tag edit --- blogs/_posts/2026-09-23-documentdb-name-disambiguation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blogs/_posts/2026-09-23-documentdb-name-disambiguation.md b/blogs/_posts/2026-09-23-documentdb-name-disambiguation.md index e3deb6c1..3b8d5d6f 100644 --- a/blogs/_posts/2026-09-23-documentdb-name-disambiguation.md +++ b/blogs/_posts/2026-09-23-documentdb-name-disambiguation.md @@ -10,7 +10,7 @@ tags: - Azure Cosmos DB - Cosmos DB for MongoDB vCore - MongoDB Compatibility - - Naming + - MIT License - Disambiguation - Open Source --- From 93a9eba9d686172f43d31139d06f96050745e2b6 Mon Sep 17 00:00:00 2001 From: Lei Jiang Date: Thu, 24 Sep 2026 10:26:55 -0700 Subject: [PATCH 3/7] Update download_packages.sh permission change --- .github/scripts/download_packages.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 .github/scripts/download_packages.sh diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh old mode 100755 new mode 100644 From 29bcd0998319045709fcebf8672f560cd9c5aeda Mon Sep 17 00:00:00 2001 From: Lei Jiang Date: Thu, 24 Sep 2026 17:51:52 +0000 Subject: [PATCH 4/7] revert the permission change --- .github/scripts/download_packages.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/scripts/download_packages.sh diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh old mode 100644 new mode 100755 From f4d47bee280e6f1793cdde009bef2d9f3bb8d54b Mon Sep 17 00:00:00 2001 From: Lei Jiang Date: Tue, 29 Sep 2026 16:57:37 +0000 Subject: [PATCH 5/7] add agent-kit link --- app/components/Navbar.tsx | 6 ++++++ blogs/_layouts/default.html | 1 + 2 files changed, 7 insertions(+) diff --git a/app/components/Navbar.tsx b/app/components/Navbar.tsx index 62dcc415..d62bfae4 100644 --- a/app/components/Navbar.tsx +++ b/app/components/Navbar.tsx @@ -33,6 +33,12 @@ const navItems: NavItem[] = [ { label: "Docs", href: "/docs", kind: "link" }, { label: "AI", href: "/ai", kind: "link" }, { label: "Download", href: "/packages", kind: "link" }, + { + label: "Agent-Kit", + href: "https://github.com/Azure/documentdb-agent-kit", + kind: "anchor", + newTab: true, + }, { label: "K8s Operator", href: "/kubernetes-operator", kind: "link" }, { label: "Blogs", href: withBasePath("/blogs/"), kind: "anchor" }, { label: "Samples", href: "/samples", kind: "link" }, diff --git a/blogs/_layouts/default.html b/blogs/_layouts/default.html index c8b90f41..13946722 100644 --- a/blogs/_layouts/default.html +++ b/blogs/_layouts/default.html @@ -64,6 +64,7 @@ Discord Docs Download + Agent-Kit K8s Operator Blogs From 862820caeca72fbf6bf7955e5c244bef39449d19 Mon Sep 17 00:00:00 2001 From: Lei Jiang Date: Thu, 19 Nov 2026 09:45:23 -0800 Subject: [PATCH 6/7] Misc changes for website optimization Throughout the repo in agent-friendly efforts. Not actual content update for now (that needs more deliberation). --- .github/scripts/download_packages.sh | 0 AGENTS.md | 9 ++ app/ai/page.tsx | 7 +- app/components/StaticInstallGuides.tsx | 60 +++++++++++++ app/components/StructuredData.tsx | 87 +++++++++++++++++++ app/docs/[section]/[[...slug]]/page.tsx | 25 +++++- app/docs/page.tsx | 4 + .../[type]/[category]/[name]/page.tsx | 18 +++- app/layout.tsx | 2 + app/packages/page.tsx | 13 ++- app/page.tsx | 11 ++- app/services/metadataService.ts | 20 ++++- blogs/_layouts/default.html | 41 +++++++++ blogs/_layouts/post.html | 1 + ...26-09-23-documentdb-name-disambiguation.md | 12 ++- readme.md | 18 ++++ scripts/generate-sitemap.mjs | 19 +++- tests/blogSections.test.ts | 18 ++++ tests/discoveryContent.test.tsx | 81 +++++++++++++++++ tests/sitemapDiscovery.test.ts | 23 +++++ 20 files changed, 453 insertions(+), 16 deletions(-) mode change 100755 => 100644 .github/scripts/download_packages.sh create mode 100644 AGENTS.md create mode 100644 app/components/StaticInstallGuides.tsx create mode 100644 app/components/StructuredData.tsx create mode 100644 tests/discoveryContent.test.tsx diff --git a/.github/scripts/download_packages.sh b/.github/scripts/download_packages.sh old mode 100755 new mode 100644 diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..af3b7c84 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,9 @@ + + +## This is NOT the Next.js you know + +This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices. + +This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean. + + diff --git a/app/ai/page.tsx b/app/ai/page.tsx index 39d06a4b..e175ecb4 100644 --- a/app/ai/page.tsx +++ b/app/ai/page.tsx @@ -156,7 +156,7 @@ const useCases = [ description: "Store chunks, metadata, and embeddings together so retrieval stays close to the source document.", points: [ - "Pre-filter by category, source, or recency before retrieval", + "Combine vector retrieval with indexed metadata filters; result counts are best-effort", "Return source text alongside similarity scores", ], sampleId: "hotel-agent-ts", @@ -438,6 +438,11 @@ export default function AIPage() { title="Built for the AI workloads that matter" description="Vector retrieval, document storage, and query power in one system — ready for the patterns teams are actually shipping." /> +

+ Vector filters intersect approximate nearest-neighbor results: filter paths must be indexed, + counts are best-effort, and filtered search is unsupported on sharded collections.{" "} + Read the vector search limitations +

{useCases.map((item) => { const link = useCaseLink(item); diff --git a/app/components/StaticInstallGuides.tsx b/app/components/StaticInstallGuides.tsx new file mode 100644 index 00000000..b064fe0e --- /dev/null +++ b/app/components/StaticInstallGuides.tsx @@ -0,0 +1,60 @@ +import Link from "next/link"; +import CommandSnippet from "./CommandSnippet"; +import TelemetryNote from "./TelemetryNote"; +import { buildAptInstallCommand, buildRpmInstallCommand, buildSetupCommand } from "../lib/packageInstall"; + +const linkClass = "text-blue-300 underline underline-offset-4"; + +export default function StaticInstallGuides() { + return ( +
+

Install without the selector

+

+ These are standalone quickstarts, not commands customized from this URL. + Choose the guide matching your environment. The interactive selector loads separately. +

+
+

Docker: local evaluation and development

+

Requires Docker and an available port 10260. Replace both credential placeholders before running.

+ + +

+ Wait for === DocumentDB is ready === in docker logs documentdb, then follow the{" "} + Docker quickstart to connect and verify. +

+
+
+

Linux packages: a new PostgreSQL 18 instance

+

+ Requires a supported Linux host, sudo and internet access. These commands use the moving latest channel and detect host architecture. + For an existing installation, upgrade in place instead. +

+
+ Ubuntu 24.04 (AMD64 or ARM64) + +
+
+ Registered RHEL 9 (AMD64 or ARM64) + +
+
+ Rocky Linux 9 (AMD64 or ARM64) + +
+

+ Firewall port 10260 before setup: the gateway listens on all interfaces. + Setup asks for an admin password and starts a private PostgreSQL instance. +

+ +

+ Check sudo documentdb-setup --status, then follow the{" "} + Linux packages quickstart for connection, first-query verification, troubleshooting and cleanup. +

+
+
+ ); +} diff --git a/app/components/StructuredData.tsx b/app/components/StructuredData.tsx new file mode 100644 index 00000000..6cfb653f --- /dev/null +++ b/app/components/StructuredData.tsx @@ -0,0 +1,87 @@ +import { siteUrl } from "../services/metadataService"; + +export const softwareId = `${siteUrl}/#software`; + +export const projectStructuredData = { + "@context": "https://schema.org", + "@graph": [ + { + "@type": "Organization", + "@id": `${siteUrl}/#project`, + name: "DocumentDB", + url: `${siteUrl}/`, + parentOrganization: { + "@type": "Organization", + name: "The Linux Foundation", + url: "https://www.linuxfoundation.org/", + }, + }, + { + "@type": "SoftwareSourceCode", + "@id": softwareId, + name: "DocumentDB", + description: "An MIT-licensed, open-source, MongoDB-compatible document database built on PostgreSQL.", + url: `${siteUrl}/`, + codeRepository: "https://github.com/documentdb/documentdb", + license: "https://opensource.org/license/mit", + programmingLanguage: ["C", "Rust"], + publisher: { "@id": `${siteUrl}/#project` }, + }, + { + "@type": "WebSite", + "@id": `${siteUrl}/#website`, + name: "DocumentDB", + url: `${siteUrl}/`, + about: { "@id": softwareId }, + publisher: { "@id": `${siteUrl}/#project` }, + }, + ], +}; + +export function articleStructuredData({ + title, description, path, breadcrumbs, dateModified, +}: { + title: string; + description?: string; + path: string; + breadcrumbs: { name: string; path: string }[]; + dateModified?: string; +}) { + const url = new URL(path, siteUrl).href; + return { + "@context": "https://schema.org", + "@graph": [ + { + "@type": "TechArticle", + "@id": `${url}#article`, + headline: title, + description, + url, + mainEntityOfPage: url, + inLanguage: "en", + about: { "@id": softwareId }, + isPartOf: { "@id": `${siteUrl}/#website` }, + publisher: { "@id": `${siteUrl}/#project` }, + ...(dateModified ? { dateModified } : {}), + }, + { + "@type": "BreadcrumbList", + itemListElement: breadcrumbs.map((item, index) => ({ + "@type": "ListItem", + position: index + 1, + name: item.name, + item: new URL(item.path, siteUrl).href, + })), + }, + ], + }; +} + +export default function StructuredData({ data }: { data: object }) { + return ( + + {% endif %} diff --git a/blogs/_layouts/post.html b/blogs/_layouts/post.html index d0d25ecb..f7354da7 100644 --- a/blogs/_layouts/post.html +++ b/blogs/_layouts/post.html @@ -18,6 +18,7 @@

{{ page.title }}

diff --git a/blogs/_posts/2026-09-23-documentdb-name-disambiguation.md b/blogs/_posts/2026-09-23-documentdb-name-disambiguation.md index 07ade0ec..b31e87f5 100644 --- a/blogs/_posts/2026-09-23-documentdb-name-disambiguation.md +++ b/blogs/_posts/2026-09-23-documentdb-name-disambiguation.md @@ -1,12 +1,14 @@ --- -title: "DocumentDB Name Disambiguation: The Open-Source Project, Azure DocumentDB, and Azure Cosmos DB" -description: A precise, reference-backed guide to the names in the DocumentDB family — the open-source DocumentDB project, Azure DocumentDB (with MongoDB compatibility), Azure Cosmos DB for MongoDB (RU), Azure Cosmos DB for NoSQL, and the historical 2014–2017 "Azure DocumentDB". +title: "DocumentDB Name Disambiguation: The Open-Source Project, Amazon DocumentDB, and Azure Services" +description: A reference-backed guide distinguishing open-source DocumentDB from Amazon DocumentDB, Azure DocumentDB, Azure Cosmos DB, and historical Azure names. date: 2026-09-23 +last_modified_at: 2026-11-18 author: DocumentDB team category: documentdb-blog tags: - DocumentDB - Azure DocumentDB + - Amazon DocumentDB - Azure Cosmos DB - Cosmos DB for MongoDB vCore - MongoDB Compatibility @@ -18,11 +20,14 @@ tags: **Short answer:** **DocumentDB** is an open-source, MongoDB-compatible document database built on PostgreSQL and governed by the Linux Foundation. **Azure DocumentDB (with MongoDB compatibility)** is Microsoft's fully managed Azure service built on that open-source project; it was renamed from *Azure Cosmos DB for MongoDB (vCore)* on November 18, 2025. **Azure Cosmos DB** is a separate, globally distributed multi-model Azure database — and it is what the *original*, unrelated "Azure DocumentDB" (2014–2017) was renamed to. +**Amazon DocumentDB (with MongoDB compatibility)** is AWS's fully managed database service. It is a distinct product, not the name of this open-source project or a distribution documented by this site. Use [AWS's documentation](https://docs.aws.amazon.com/documentdb/latest/developerguide/what-is.html) for its capabilities, versions and operational behavior. + ## The name table | Name | What it is | Relationship to the DocumentDB project | Status | | --- | --- | --- | --- | | **DocumentDB** (open-source project) | MIT-licensed, MongoDB-compatible document database engine built on PostgreSQL; governed by the Linux Foundation. Ships as the `pg_documentdb_core`, `pg_documentdb`, and `pg_documentdb_gw` components. | This project. The canonical upstream. | Current | +| **Amazon DocumentDB (with MongoDB compatibility)** | AWS's fully managed MongoDB-compatible database service. | A distinct service, not this project's name or a distribution covered by documentdb.io. Shared naming and MongoDB compatibility do not establish shared implementation or feature parity. | Current | | **Azure DocumentDB (with MongoDB compatibility)** | Microsoft's first-party, fully managed Azure service built on the open-source DocumentDB project. Generally available since November 18, 2025. | Managed service **built on** the project. | Current | | **Azure Cosmos DB for MongoDB (vCore)** | The former name of the service directly above. | Retired name for Azure DocumentDB. | **Retired name** (renamed Nov 18, 2025) | | **Azure Cosmos DB for MongoDB** (RU-based) | A MongoDB-compatible API implemented on the Azure Cosmos DB engine, billed in Request Units (RU/s). | **Not** built on the DocumentDB project. A different engine and a different service. | Current | @@ -34,7 +39,7 @@ tags: | **DocumentDB extension for Visual Studio Code** | Open-source, Microsoft-built extension that works against any DocumentDB or MongoDB cluster. | Tooling for the project. | Current | | **MongoDB** (MongoDB, Inc.) | A separate commercial database product. | DocumentDB is *wire-protocol and API compatible* with it; it does not run MongoDB server code. | Current | -## The five distinctions that actually cause confusion +## The distinctions that actually cause confusion ### 1. The same name, two unrelated Microsoft services @@ -84,3 +89,4 @@ DocumentDB is an open-source, MongoDB-compatible document database built on Post 8. The Linux Foundation — [Linux Foundation welcomes DocumentDB](https://www.linuxfoundation.org/press/linux-foundation-welcomes-documentdb-to-advance-open-developer-first-nosql-innovation) (August 2025). Governance and neutrality of the open-source project. 9. Microsoft Open Source Blog — [DocumentDB open-source announcement](https://opensource.microsoft.com/blog/2025/01/23/documentdb-open-source-announcement/) (January 2025). 10. GitHub — [documentdb/documentdb](https://github.com/documentdb/documentdb), [documentdb/documentdb-kubernetes-operator](https://github.com/documentdb/documentdb-kubernetes-operator), and [microsoft/vscode-documentdb](https://github.com/microsoft/vscode-documentdb). +11. AWS — [What is Amazon DocumentDB (with MongoDB compatibility)?](https://docs.aws.amazon.com/documentdb/latest/developerguide/what-is.html). Canonical description of the distinct AWS managed service. diff --git a/readme.md b/readme.md index d463b162..4ec1f8ba 100644 --- a/readme.md +++ b/readme.md @@ -8,6 +8,24 @@ A modern website for DocumentDB built with [Next.js](https://nextjs.org/) for th This is a discovery guide, not an access-control mechanism or a replacement for existing content licenses and website terms. [public/robots.txt](public/robots.txt) already allows all crawlers. +### Content metadata + +Use `last_modified_at` only for an actual content update, not a deployment. Optional `applies_to` text states the guide's release/deployment scope. Next.js and Jekyll publish explicit update dates in article metadata and structured data; the sitemap uses those dates and omits `lastmod` when provenance is unavailable. Imported pages with `layout: coming-soon` remain reachable but are not indexed or included in the sitemap. + +### Measuring discovery and task completion + +Use the following fixed prompt set for manual evaluations. Record platform/model, date, exact prompt, cited URLs, factual errors and execution results. Repeat each prompt at least three times and keep **correct product identification**, **official-source citation**, and **successful task completion** as separate outcomes. For task prompts, use disposable databases and record the engine/gateway release, driver versions and environment; a plausible answer is not a successful execution. + +| Category | Fixed prompts | +| --- | --- | +| Identity | What is the open-source DocumentDB project? / Is documentdb.io Amazon DocumentDB? / How does DocumentDB differ from Azure DocumentDB? / Is Azure Cosmos DB the same engine as open-source DocumentDB? | +| Evaluation | Can I replace MongoDB with open-source DocumentDB? / Which MongoDB commands and options are supported? / Does open-source DocumentDB support change streams? / What are DocumentDB's transaction limitations? | +| Installation | Install DocumentDB locally without JavaScript. / Install DocumentDB on Ubuntu 24.04 with PostgreSQL 18. / Install DocumentDB on Rocky Linux 9. / Verify that a DocumentDB instance can insert and read a document. | +| Architecture | How do DocumentDB's gateway and PostgreSQL extensions fit together? / Does installing only the extension expose a MongoDB endpoint? / Should I use DocumentDB or PostgreSQL JSONB? / How do I find the actual DocumentDB engine version? | +| AI and agents | Create a vector index and retrieve stored context. / What are DocumentDB's filtered vector search limitations? / How can a coding agent use DocumentDB locally? / How do I add persistent MCP memory with DocumentDB? | + +Save evaluation results outside the published site, compare a small changed-page cohort with unchanged pages, and repeat before expanding content. Private search-console data, referral analytics and verified crawler logs can supplement these observations; the static site does not collect model citation or task-success measurements automatically. + ## Prerequisites for Development - **[Node.js](https://nodejs.org/)** (*20 or higher*) diff --git a/scripts/generate-sitemap.mjs b/scripts/generate-sitemap.mjs index 934d59b4..9bb8ec64 100644 --- a/scripts/generate-sitemap.mjs +++ b/scripts/generate-sitemap.mjs @@ -70,6 +70,21 @@ function xmlEscape(value) { .replace(/'/g, '''); } +function contentModifiedTime(html) { + for (const tag of html.match(/]*>/gi) ?? []) { + if (!/\bproperty=["']article:modified_time["']/i.test(tag)) continue; + const value = tag.match(/\bcontent=["']([^"']+)["']/i)?.[1]; + if (!value || !/^\d{4}-\d{2}-\d{2}(?:T.*)?$/.test(value)) continue; + const date = new Date(value); + const day = value.slice(0, 10); + if (Number.isFinite(date.getTime()) && new Date(`${day}T00:00:00Z`).toISOString().slice(0, 10) === day) { + return date.toISOString(); + } + } + // Missing provenance is preferable to a deploy timestamp masquerading as a content update. + return undefined; +} + /** * Walks the export directory and returns one entry per page, where a page is * any directory containing an index.html (the shape `trailingSlash: true` and @@ -88,7 +103,7 @@ function collectPages(directory, relativePath = '') { } else { pages.push({ url: relativePath === '' ? '/' : `/${relativePath}/`, - lastModified: fs.statSync(indexFile).mtime, + lastModified: contentModifiedTime(html), }); } } @@ -142,7 +157,7 @@ const sitemap = [ [ ' ', ` ${xmlEscape(siteUrl + page.url)}`, - ` ${page.lastModified.toISOString()}`, + ...(page.lastModified ? [` ${page.lastModified}`] : []), ' ', ].join('\n'), ), diff --git a/tests/blogSections.test.ts b/tests/blogSections.test.ts index a07a1703..07ee586e 100644 --- a/tests/blogSections.test.ts +++ b/tests/blogSections.test.ts @@ -211,9 +211,27 @@ describe.each([ expect(html).toContain(`← Back to all ${backLabel}`); expect(html).toContain(``); expect(html).toContain(``); + const json = html.match(/'; + const data = articleStructuredData({ + title, + path: "/docs/example/", + breadcrumbs: [{ name: title, path: "/docs/example/" }], + }); + const html = renderToStaticMarkup(createElement(StructuredData, { data })); + expect(html).not.toContain("/g)).toHaveLength(1); + expect(structuredData(html)["@graph"][0].headline).toBe(title); + }); + + it.each(["2026-02-30", "not a date", 123, undefined])("omits untrustworthy modification date %s", (value) => { + expect(getModifiedTime(value)).toBeUndefined(); + }); + + it("preserves valid content timestamps with timezone offsets", () => { + expect(getModifiedTime("2026-11-18T23:30:00-08:00")).toBe("2026-11-19T07:30:00.000Z"); + }); + +}); diff --git a/tests/sitemapDiscovery.test.ts b/tests/sitemapDiscovery.test.ts index fb422da9..aabfa880 100644 --- a/tests/sitemapDiscovery.test.ts +++ b/tests/sitemapDiscovery.test.ts @@ -34,4 +34,27 @@ describe('operator sitemap discovery', () => { expect(await readFile(path.join(out, 'robots.txt'), 'utf8')).toBe(robots); expect(await readFile(path.join(out, 'sitemap.xml'), 'utf8')).toContain('https://documentdb.io/'); }); + + it('uses explicit content dates, not exported HTML timestamps, and excludes placeholders', async () => { + const directory = await mkdtemp(path.join(tmpdir(), 'documentdb-sitemap-dates-')); + directories.push(directory); + const out = path.join(directory, 'out'); + const pages = { + '': 'No content date', + dated: '', + invalid: '', + placeholder: '', + }; + for (const [slug, html] of Object.entries(pages)) { + const target = path.join(out, slug); + await mkdir(target, { recursive: true }); + await writeFile(path.join(target, 'index.html'), html); + } + execFileSync(process.execPath, [generator], { cwd: directory }); + const sitemap = await readFile(path.join(out, 'sitemap.xml'), 'utf8'); + expect(sitemap.match(//g)).toHaveLength(1); + expect(sitemap).toContain('2026-11-18T00:00:00.000Z'); + expect(sitemap).not.toContain('/placeholder/'); + expect(sitemap).toContain('/invalid/'); + }); }); From e65cee5cad0ccf0c4e06808fc34bbc6e2f0b3705 Mon Sep 17 00:00:00 2001 From: Lei Jiang Date: Thu, 19 Nov 2026 10:30:35 -0800 Subject: [PATCH 7/7] Fix pipeline errors --- .github/workflows/continuous-deployment.yml | 4 +-- .github/workflows/continuous-integration.yml | 4 +-- readme.md | 9 +++++++ tests/discoveryContent.test.tsx | 26 +++++++++++++++++++- 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.github/workflows/continuous-deployment.yml b/.github/workflows/continuous-deployment.yml index b046b23b..fa2cadac 100644 --- a/.github/workflows/continuous-deployment.yml +++ b/.github/workflows/continuous-deployment.yml @@ -184,8 +184,8 @@ jobs: GH_TOKEN: ${{ github.token }} run: | set -euo pipefail - .github/scripts/download_packages.sh - SUITE=latest DOCUMENTDB_VERSION="$DOCUMENTDB_LATEST_VERSION" .github/scripts/download_packages.sh + bash .github/scripts/download_packages.sh + SUITE=latest DOCUMENTDB_VERSION="$DOCUMENTDB_LATEST_VERSION" bash .github/scripts/download_packages.sh - name: Verify generated package components if: steps.features.outputs.packages == 'true' env: diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index b3941e47..4cfcad48 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -102,9 +102,9 @@ jobs: GH_TOKEN: ${{ github.token }} run: | set -euo pipefail - .github/scripts/download_packages.sh + bash .github/scripts/download_packages.sh # Unpinned, like the deploy while DOCUMENTDB_LATEST_VERSION is unset. - SUITE=latest DOCUMENTDB_VERSION=latest .github/scripts/download_packages.sh + SUITE=latest DOCUMENTDB_VERSION=latest bash .github/scripts/download_packages.sh - name: Verify release inventory and metadata run: python3 .github/scripts/verify_package_inventory.py - name: Resolve both PostgreSQL majors and retired endpoints diff --git a/readme.md b/readme.md index 4ec1f8ba..63b2586c 100644 --- a/readme.md +++ b/readme.md @@ -75,6 +75,15 @@ The first time you run `npm run dev` or `npm run build`, documentation content w We welcome contributions to improve the DocumentDB website, whether it's blog posts, bug fixes, or enhancements to the site itself. +### Running checks + +```bash +npm run lint +npm test +``` + +CI runs tests before compiling upstream documentation. Use self-contained fixtures for imported-content tests rather than depending on the generated `articles/` or `reference/` trees, which are absent on a fresh checkout. + ### Contributing Announcements and Blog Posts Announcements and blog posts are managed locally in this repository. Contribute directly through a pull request to this repository. diff --git a/tests/discoveryContent.test.tsx b/tests/discoveryContent.test.tsx index 815bccd8..0f74d0f7 100644 --- a/tests/discoveryContent.test.tsx +++ b/tests/discoveryContent.test.tsx @@ -1,3 +1,5 @@ +import fs from "node:fs"; +import path from "node:path"; import { createElement } from "react"; import { renderToStaticMarkup } from "react-dom/server"; import matter from "gray-matter"; @@ -36,7 +38,29 @@ describe("static discovery content", () => { }); it("preserves upstream architecture content", () => { - const source = matter(articles.getMarkdownContent("architecture")); + const markdown = `--- +title: Upstream architecture +description: Architecture documentation from upstream. +layout: coming-soon +--- + +Architecture details will be published here. +`; + const directory = path.join(process.cwd(), "articles", "architecture"); + const files = new Map([ + [path.join(directory, "index.md"), markdown], + [path.join(directory, "navigation.yml"), "- title: Architecture\n link: index.md\n"], + ]); + const existsSync = fs.existsSync; + const readFileSync = fs.readFileSync; + vi.spyOn(fs, "existsSync").mockImplementation((file) => + files.has(file.toString()) || existsSync(file), + ); + vi.spyOn(fs, "readFileSync").mockImplementation((file, options) => + files.get(file.toString()) ?? readFileSync(file, options), + ); + + const source = matter(markdown); const architecture = articles.getArticleByPath("architecture"); expect(architecture?.content).toBe(source.content); expect(architecture?.frontmatter).toEqual(source.data);