diff --git a/source/compatibility.txt b/source/compatibility.txt index 382df1fd0..f44c359dd 100644 --- a/source/compatibility.txt +++ b/source/compatibility.txt @@ -4,6 +4,13 @@ Compatibility ============= +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: node.js + .. contents:: On this page :local: :backlinks: none diff --git a/source/fundamentals/connection.txt b/source/fundamentals/connection.txt index 8dac84c52..cb579640c 100644 --- a/source/fundamentals/connection.txt +++ b/source/fundamentals/connection.txt @@ -6,6 +6,13 @@ Connection .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: node.js + .. toctree:: /fundamentals/connection/connect diff --git a/source/fundamentals/connection/connect.txt b/source/fundamentals/connection/connect.txt index 72fa88919..904a5cbb3 100644 --- a/source/fundamentals/connection/connect.txt +++ b/source/fundamentals/connection/connect.txt @@ -4,14 +4,22 @@ Connection Guide ================ +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: node.js + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -This guide shows you how to connect to a MongoDB instance or replica set -using the Node.js driver. +This guide shows you how to connect to a +`MongoDB Atlas deployment `__, +a MongoDB instance, or a replica set using the Node.js driver. .. _node-connection-uri: @@ -23,25 +31,27 @@ connect to a MongoDB deployment. It instructs the driver on how it should connect to MongoDB and how it should behave while connected. The following example shows each part of the connection URI: -.. figure:: /includes/figures/connection-string-parts.png +.. figure:: /includes/figures/dns_seedlist_connection_string_parts.png :alt: Each part of the connection string -In this example, we use ``mongodb`` for the protocol, which specifies -the :manual:`Standard Connection String Format `. - -If your instance or deployment has a DNS SRV record, you can use the +In this example, we connect to an Atlas MongoDB deployment that has a +DNS SRV record. For more details, see the :manual:`DNS Seed List Connection Format -` for -your connection string. This format offers more flexibility of -deployment and the ability to change the servers in rotation without -reconfiguring clients. +` +documentation. This format offers flexibility in deployment and the +ability to change the servers in rotation without reconfiguring clients. .. note:: To learn how to retrieve your connection string in Atlas, see the :atlas:`Atlas driver connection guide `. -The next part of the connection string contains your credentials +If you are connecting to an instance or replica set that does not have a +DNS SRV address, you must use ``mongodb`` for the protocol, which specifies +the :manual:`Standard Connection String Format +`. + +After the protocol, the next part of the connection string contains credentials if you are using password-based authentication. Replace the value of ``user`` with your username and ``pass`` with your password. If you are using an authentication mechanism that does not require a username and password, omit diff --git a/source/fundamentals/crud.txt b/source/fundamentals/crud.txt index 8276c9d38..e4c33d201 100644 --- a/source/fundamentals/crud.txt +++ b/source/fundamentals/crud.txt @@ -6,6 +6,13 @@ CRUD Operations .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: node.js + .. toctree:: :caption: CRUD Operations diff --git a/source/fundamentals/crud/read-operations.txt b/source/fundamentals/crud/read-operations.txt index 727f4a970..5edb3e239 100644 --- a/source/fundamentals/crud/read-operations.txt +++ b/source/fundamentals/crud/read-operations.txt @@ -4,6 +4,13 @@ Read Operations .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: code example, node.js, sample dataset + - :doc:`/fundamentals/crud/read-operations/retrieve` - :doc:`/fundamentals/crud/read-operations/cursor` - :doc:`/fundamentals/crud/read-operations/distinct` diff --git a/source/includes/figures/connection-string-parts.png b/source/includes/figures/connection-string-parts.png deleted file mode 100644 index c532f9d33..000000000 Binary files a/source/includes/figures/connection-string-parts.png and /dev/null differ diff --git a/source/includes/figures/dns_seedlist_connection_string_parts.png b/source/includes/figures/dns_seedlist_connection_string_parts.png new file mode 100644 index 000000000..d57165511 Binary files /dev/null and b/source/includes/figures/dns_seedlist_connection_string_parts.png differ diff --git a/source/quick-reference.txt b/source/quick-reference.txt index 8167c1bc1..04e55bdcd 100644 --- a/source/quick-reference.txt +++ b/source/quick-reference.txt @@ -6,6 +6,13 @@ Quick Reference .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: node.js + This page shows the driver syntax for several MongoDB commands and links to their related reference and API documentation. diff --git a/source/quick-start.txt b/source/quick-start.txt index 26bc3ea4f..e283861c5 100644 --- a/source/quick-start.txt +++ b/source/quick-start.txt @@ -4,6 +4,13 @@ Quick Start =========== +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :keywords: node.js + .. contents:: On this page :local: :backlinks: none diff --git a/source/usage-examples.txt b/source/usage-examples.txt index 24ac89e4d..b76f3eeeb 100644 --- a/source/usage-examples.txt +++ b/source/usage-examples.txt @@ -6,6 +6,13 @@ Usage Examples .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: node.js + .. contents:: On this page :local: :backlinks: none diff --git a/source/usage-examples/find.txt b/source/usage-examples/find.txt index f5b82b3b6..816583218 100644 --- a/source/usage-examples/find.txt +++ b/source/usage-examples/find.txt @@ -6,6 +6,13 @@ Find Multiple Documents .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: code example, node.js, sample dataset + You can query for multiple documents in a collection with ``collection.find()``. The ``find()`` method uses a query document that you provide to match the subset of the documents in the collection that match the diff --git a/source/usage-examples/findOne.txt b/source/usage-examples/findOne.txt index 88d3988d3..d20e703f7 100644 --- a/source/usage-examples/findOne.txt +++ b/source/usage-examples/findOne.txt @@ -6,6 +6,13 @@ Find a Document .. default-domain:: mongodb +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :keywords: code example, node.js, sample dataset + You can query for a single document in a collection with the ``collection.findOne()`` method. The ``findOne()`` method uses a query document that you provide to match only the subset of the documents in the diff --git a/source/usage-examples/insertOne.txt b/source/usage-examples/insertOne.txt index de6b43df4..07975e5d0 100644 --- a/source/usage-examples/insertOne.txt +++ b/source/usage-examples/insertOne.txt @@ -6,6 +6,13 @@ Insert a Document .. default-domain:: mongodb +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :keywords: code example, node.js, sample dataset + You can insert a document into a collection using the `collection.insertOne() <{+api+}/classes/Collection.html#insertOne>`__ method. To insert a document, define an object that contains the fields and values that