diff --git a/source/fundamentals/aggregation.txt b/source/fundamentals/aggregation.txt index 461f8fe4..da586826 100644 --- a/source/fundamentals/aggregation.txt +++ b/source/fundamentals/aggregation.txt @@ -148,8 +148,7 @@ The aggregation pipeline contains the following stages: ``genre_interests`` field into a new document. - A ``$group`` stage to group documents by the value of the ``genre_interests`` field. This stage finds the average, minimum, and - maximum user age for users, using the ``$avg``, ``$min``, and ``$max`` - operators, respectively. + maximum user age by using the ``$avg``, ``$min``, and ``$max`` operators. .. io-code-block:: diff --git a/source/fundamentals/connections/connection-options.txt b/source/fundamentals/connections/connection-options.txt index af824dfb..7b9a5177 100644 --- a/source/fundamentals/connections/connection-options.txt +++ b/source/fundamentals/connections/connection-options.txt @@ -40,7 +40,7 @@ connected to the server. * - **authMechanismProperties** - String - None - - Specifies additional properties for the authentication mechanism + - Specifies more properties for the authentication mechanism set in the ``authMechanism`` option. * - **authSource** @@ -72,7 +72,7 @@ connected to the server. * - **heartbeatFrequencyMS** - Integer greater than or equal to 500 - ``10000`` (10 seconds) - - Specifies the amount of time, in milliseconds, that each + - Specifies the amount of time in milliseconds that each monitoring thread waits between performing server checks. * - **journal** @@ -83,8 +83,8 @@ connected to the server. * - **localThresholdMS** - Non-negative integer - 15 - - | Specifies how much longer, in milliseconds, that the average - round-trip time between the driver and server can take + - | Specifies the amount of time in milliseconds that the average + round-trip time between the driver and server can last compared to the shortest round-trip time of all the suitable servers. | A value of ``0`` indicates that there is no latency window, so only the server with the lowest average round-trip time is @@ -93,7 +93,7 @@ connected to the server. * - **maxIdleTimeMS** - Non-negative integer - 0 - - | Specifies the amount of time, in milliseconds, that a connection + - | Specifies the amount of time in milliseconds that a connection can remain idle in a connection pool the server closes it. | A value of ``0`` indicates that the client does not close idle connections. @@ -157,7 +157,7 @@ connected to the server. * - **serverSelectionTimeoutMS** - Non-negative integer - ``30000`` (30 seconds) - - Specifies the amount of time, in milliseconds, that the + - Specifies the amount of time in milliseconds that the ``Client`` instance waits when attempting to select a server for an operation before timing out. diff --git a/source/fundamentals/crud/compound-operations.txt b/source/fundamentals/crud/compound-operations.txt index 34ca6986..7a87fea0 100644 --- a/source/fundamentals/crud/compound-operations.txt +++ b/source/fundamentals/crud/compound-operations.txt @@ -112,7 +112,7 @@ The following table describes the options available in - Description * - ``max_time`` - - | The maximum amount of time, in milliseconds, that the query can + - | The maximum amount of time in milliseconds that the query can run. | | Type: ``Duration`` @@ -265,7 +265,7 @@ The following table describes the options available in | Default: ``false`` * - ``max_time`` - - | The maximum amount of time, in milliseconds, that the query can + - | The maximum amount of time in milliseconds that the query can run. | | Type: ``Duration`` @@ -396,7 +396,7 @@ Find and Replace a Document The ``find_one_and_replace()`` method finds and replaces the first document that matches the specified query filter. The operation replaces -all of the fields of the document except the ``_id`` field with fields +all the fields of the document except the ``_id`` field with fields and values that you provide. If a document matches the filter criteria, the method returns a ``Some`` type. If no documents match, it returns a ``None`` type. @@ -434,7 +434,7 @@ The following table describes the options available in | Default: ``false`` * - ``max_time`` - - | The maximum amount of time, in milliseconds, that the query can + - | The maximum amount of time in milliseconds that the query can run. | | Type: ``Duration`` diff --git a/source/fundamentals/crud/read-operations/query.txt b/source/fundamentals/crud/read-operations/query.txt index d7be4fda..32d0b960 100644 --- a/source/fundamentals/crud/read-operations/query.txt +++ b/source/fundamentals/crud/read-operations/query.txt @@ -93,7 +93,7 @@ Sample Data The examples in this guide use the following sample documents. Each document represents a fruit in a store's inventory and contains -information about its quantity. Some documents contain additional fields +information about its quantity. Some documents contain fields that describe the fruit or its vendors. .. literalinclude:: /includes/fundamentals/code-snippets/crud/query.rs @@ -226,7 +226,7 @@ divisible by ``3``: .. note:: If a query filter contains a literal value query with multiple field-value pairs, - the driver matches documents that meet all of the criteria. + the driver matches documents that meet all the criteria. For example, the following queries produce equivalent results: diff --git a/source/fundamentals/crud/read-operations/retrieve.txt b/source/fundamentals/crud/read-operations/retrieve.txt index 7c2fd4d9..6ece6f4c 100644 --- a/source/fundamentals/crud/read-operations/retrieve.txt +++ b/source/fundamentals/crud/read-operations/retrieve.txt @@ -67,17 +67,10 @@ Find Operations Use find operations to retrieve data from MongoDB. Find operations consist of the ``find()`` and ``find_one()`` methods. -You can also run find operations after starting a session with the -``find_with_session()`` and ``find_one_with_session()`` methods. Both methods -take an additional ``ClientSession`` parameter, or a logical session used for -ordering sequential operations. To learn more about these two methods, see the -API documentation for `find_with_session() <{+api+}/struct.Collection.html#method.find_with_session>`__ -and `find_one_with_session() <{+api+}/struct.Collection.html#method.find_one_with_session>`__. - Find All Matching Documents ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To find *all of the documents* that match your criteria, use the +To find *all the documents* that match your criteria, use the ``find()`` method. This method takes a query filter as a parameter. A query filter consists of the fields and values that form criteria for documents to match. @@ -281,7 +274,7 @@ To learn more about aggregations and view aggregation examples, see the :ref:`ru The method returns the resulting documents in a ``Cursor`` type. If your aggregation pipeline does not contain a :manual:`$match ` stage, the pipeline processes -all of the documents in the collection. +all the documents in the collection. Modify Aggregation Behavior ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/fundamentals/crud/write-operations/delete.txt b/source/fundamentals/crud/write-operations/delete.txt index 749f981d..e9183257 100644 --- a/source/fundamentals/crud/write-operations/delete.txt +++ b/source/fundamentals/crud/write-operations/delete.txt @@ -177,9 +177,9 @@ following parameters: .. note:: - If the preceding example used the ``delete_one()`` method instead of - ``delete_many()`` for the delete operation, the driver would delete - the first of the two documents that matched the query filter. + If you use the ``delete_one()`` method instead of + ``delete_many()`` in the preceding code example, the driver deletes + only the first of the two documents that match the query filter. .. _rust-crud-del-addtl-info: diff --git a/source/fundamentals/database-collection.txt b/source/fundamentals/database-collection.txt index efdd1d17..c1479fc3 100644 --- a/source/fundamentals/database-collection.txt +++ b/source/fundamentals/database-collection.txt @@ -100,7 +100,7 @@ the ``list_database_names()`` method: Drop a Database --------------- -Dropping a database permanently deletes all of the data in that database's +Dropping a database permanently deletes all the data in that database's collections. To drop a database, call the `drop() <{+api+}/struct.Database.html#method.drop>`__ method on your ``Database`` instance. The following code shows @@ -256,7 +256,7 @@ a database referenced by the ``db`` variable by using the Drop a Collection ----------------- -Dropping a collection permanently deletes all of the data in that +Dropping a collection permanently deletes all the data in that collection. To drop a collection, call the `drop() <{+api+}/struct.Collection.html#method.drop>`__ method on your ``Collection`` instance. The following code shows diff --git a/source/fundamentals/enterprise-auth.txt b/source/fundamentals/enterprise-auth.txt index 59ddb4a4..e3a5da67 100644 --- a/source/fundamentals/enterprise-auth.txt +++ b/source/fundamentals/enterprise-auth.txt @@ -92,8 +92,8 @@ authentication mechanism by using the following placeholders: Because your credentials are stored outside of MongoDB, you must use the ``$external`` database for authentication. The ``source`` field of - the ``Credential`` struct defaults to ``$external``, so you do - not need to explicitly set this field. + the ``Credential`` struct defaults to ``$external``, so you can omit + this field. Alternatively, you can authenticate by using a connection string URI by setting the value of the ``authMechanism`` connection string option to ``PLAIN``. diff --git a/source/fundamentals/stable-api.txt b/source/fundamentals/stable-api.txt index c8c177c3..6bbb20bc 100644 --- a/source/fundamentals/stable-api.txt +++ b/source/fundamentals/stable-api.txt @@ -57,7 +57,7 @@ are compatible with that version. .. note:: - The {+driver-long+} currently supports only {+stable-api+} version 1. + The {+driver-long+} supports only {+stable-api+} version 1. API Version Specification Example ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/fundamentals/tracing-logging.txt b/source/fundamentals/tracing-logging.txt index 8521c2c1..fac68304 100644 --- a/source/fundamentals/tracing-logging.txt +++ b/source/fundamentals/tracing-logging.txt @@ -17,19 +17,17 @@ In this guide, you can learn how to use the {+driver-short+} to configure **tracing** and **logging** for your application. Tracing and logging are two frameworks for observing your application. Logging allows you to view a discrete, event-based log of driver activities, while tracing -provides a continuous view. Logs might help you identify an issue in -your application, while a trace might help you locate the reason for the -issue. +provides a continuous view. In the {+driver-short+}, the functionalities of tracing and logging do not differ greatly. However, when you enable tracing, the driver emits messages in a -more structured format, which can make it easier for your application to +more structured format, which can make it more convenient for your application to consume event messages programmatically. Tracers and loggers log messages at a severity, or verbosity, level that you can specify. By enabling one of these components in your application, -you can receive information about your application's activities at a -high level, a detailed level, or somewhere in between. +you can receive information about your application's activities at +different levels of detail. .. tip:: @@ -90,8 +88,8 @@ against and their corresponding targets: To specify the logging component and severity level, you can set the ``RUST_LOG`` environment variable when you compile and run your application. Specify the logging component by setting the value of -``RUST_LOG`` to one of the targets provided in the preceding table, -along with a severity level. +``RUST_LOG`` to one of the targets provided in the preceding table and +including a severity level. The following code shows a command to execute a program that records connection events at the ``debug`` level: diff --git a/source/index.txt b/source/index.txt index 7086b344..c00d8b82 100644 --- a/source/index.txt +++ b/source/index.txt @@ -86,7 +86,7 @@ Issues & Help ------------- Learn how to report bugs, contribute to the driver, and find -additional resources for asking questions in the +more resources for asking questions in the :ref:`rust-issues-and-help` section. Compatibility diff --git a/source/issues-and-help.txt b/source/issues-and-help.txt index dd24b147..182284b7 100644 --- a/source/issues-and-help.txt +++ b/source/issues-and-help.txt @@ -9,7 +9,7 @@ with varying levels of experience using the {+driver-short+}. The quickest way to get support for general questions is through the `MongoDB Community Forums `_. -To learn more, refer to the `support channels +To learn more, visit the `support channels `_. Bugs / Feature Requests @@ -40,8 +40,8 @@ Pull Requests We are happy to accept contributions to help improve the {+driver-short+}. We guide user contributions to ensure they meet the standards of the codebase. Please ensure that any pull requests -include documentation, tests, and pass the integration and unit tests in -the source code. +include documentation and tests, and confirm that they pass the +integration and unit tests in the source code. To get started, clone the {+driver-short+} repository and create a feature branch with the following shell commands: diff --git a/source/quick-start/connect-to-mongodb.txt b/source/quick-start/connect-to-mongodb.txt index 14787d78..a06b2875 100644 --- a/source/quick-start/connect-to-mongodb.txt +++ b/source/quick-start/connect-to-mongodb.txt @@ -50,8 +50,8 @@ Connect to MongoDB cargo run - You should see the details of the retrieved movie document in the - command line output: + The command line output contains details about the retrieved movie + document: .. code-block:: none :copyable: false @@ -85,7 +85,7 @@ Connect to MongoDB proper connection string in the ``main.rs`` file and that you loaded the sample data. -After you complete these steps, you should have a working application that +After you complete these steps, you have a working application that uses the driver to connect to your MongoDB deployment, runs a query on the sample data, and prints out the result. diff --git a/source/quick-start/create-a-connection-string.txt b/source/quick-start/create-a-connection-string.txt index 1969532c..34d87ac6 100644 --- a/source/quick-start/create-a-connection-string.txt +++ b/source/quick-start/create-a-connection-string.txt @@ -57,7 +57,7 @@ To connect to an instance or deployment not hosted on Atlas, see Save this file to a safe location for use in the next step. -After completing these steps, you should have a connection string that +After completing these steps, you have a connection string that contains your database username and password. .. include:: /includes/quick-start/troubleshoot.rst diff --git a/source/quick-start/create-a-deployment.txt b/source/quick-start/create-a-deployment.txt index 1f50ad9b..e2f80f66 100644 --- a/source/quick-start/create-a-deployment.txt +++ b/source/quick-start/create-a-deployment.txt @@ -22,9 +22,9 @@ your MongoDB database in the cloud. After you create your database user, save that user's username and password to a safe location for use in an upcoming step. -After you complete these steps, you should have a new free tier MongoDB +After you complete these steps, you have a new free tier MongoDB deployment on Atlas, database user credentials, and sample data loaded -in your database. +into your database. .. include:: /includes/quick-start/troubleshoot.rst diff --git a/source/quick-start/download-and-install.txt b/source/quick-start/download-and-install.txt index 3cf21a18..79d912ee 100644 --- a/source/quick-start/download-and-install.txt +++ b/source/quick-start/download-and-install.txt @@ -31,7 +31,7 @@ Download and Install cargo new rust_quickstart - When this command successfully completes, you should have a ``Cargo.toml`` + When this command successfully completes, you have a ``Cargo.toml`` file and a ``src`` directory with a ``main.rs`` file in your ``rust_quickstart`` directory. @@ -54,8 +54,8 @@ Download and Install .. tip:: The ``mongodb`` crate resolves the ``bson`` crate, which is the primary - MongoDB data representation crate. You do not need to add the ``bson`` - crate to your dependencies list. + MongoDB data representation crate. You can omit the ``bson`` + crate in your dependencies list. The driver supports both asynchronous and synchronous runtimes. To see example dependency lists for each runtime, select @@ -100,7 +100,7 @@ Download and Install To learn more about asynchronous and synchronous runtimes, see the :ref:`rust-runtimes` guide. -After you complete these steps, you should have Rust and Cargo installed +After you complete these steps, you have Rust and Cargo installed and a new Rust project with the necessary driver dependencies. .. include:: /includes/quick-start/troubleshoot.rst