Skip to content

Clean up: refs #654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions source/connection/connect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ check the following items in your code:

- The credentials for the authentication mechanism that you specified are
correct. To learn how to specify your credentials, see the
:ref:`authentication-mechanisms` and :ref:`enterprise-authentication-mechanisms`
guides.
:ref:`authentication-mechanisms` guide.

- The name of the authentication database that you specified is correct. To
learn how to set up the users and roles for your MongoDB deployment, see
Expand Down
4 changes: 2 additions & 2 deletions source/connection/connection-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ parameters of the connection URI to specify the behavior of the client.

* - **authMechanism**
- string
- Specifies the :doc:`authentication mechanism
</security/auth>` that the driver uses if a credential
- Specifies the :ref:`authentication mechanism
<java-authentication-mechanisms>` that the driver uses if a credential
was supplied.

| **Default**: By default, the client picks the most secure
Expand Down
16 changes: 8 additions & 8 deletions source/connection/mongoclientsettings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ connection behavior:
- Sets the :ref:`command listeners <command-events-java>`.

* - ``compressorList()``
- Sets the :ref:`compressors <compression>` to use for compressing
- Sets the :ref:`compressors <java-compression>` to use for compressing
messages to the server.

* - ``credential()``
Expand Down Expand Up @@ -162,7 +162,7 @@ Example

This example demonstrates specifying a ``ConnectionString``:

.. literalinclude:: /includes/fundamentals/code-snippets/mcs.java
.. literalinclude:: /includes/fundamentals/code-snippets/MCSettings.java
:start-after: begin ConnectionString
:end-before: end ConnectionString
:language: java
Expand Down Expand Up @@ -290,7 +290,7 @@ Example
This example specifies for the driver to connect directly to a server,
regardless of the type of MongoDB cluster it's a part of:

.. literalinclude:: /includes/fundamentals/code-snippets/mcs.java
.. literalinclude:: /includes/fundamentals/code-snippets/MCSettings.java
:start-after: begin ClusterSettings
:end-before: end ClusterSettings
:language: java
Expand Down Expand Up @@ -380,7 +380,7 @@ This example specifies the following driver behavior in a pool of
- The thread to wait at most ``10 SECONDS`` for an available connection
- To have at most ``200`` connections associated with the pool

.. literalinclude:: /includes/fundamentals/code-snippets/mcs.java
.. literalinclude:: /includes/fundamentals/code-snippets/MCSettings.java
:start-after: begin ConnectionPoolSettings
:end-before: end ConnectionPoolSettings
:language: java
Expand Down Expand Up @@ -417,7 +417,7 @@ Example
This example specifies that the maximum number of characters for a single log
message is set to ``5000`` characters.

.. literalinclude:: /includes/fundamentals/code-snippets/mcs.java
.. literalinclude:: /includes/fundamentals/code-snippets/MCSettings.java
:start-after: begin LoggerSettings
:end-before: end LoggerSettings
:language: java
Expand Down Expand Up @@ -474,7 +474,7 @@ This example specifies the following driver behavior in a MongoDB deployment:
``700 MILLISECONDS``
- The cluster monitor to attempt reaching a server every ``15 SECONDS``

.. literalinclude:: /includes/fundamentals/code-snippets/mcs.java
.. literalinclude:: /includes/fundamentals/code-snippets/MCSettings.java
:start-after: begin ServerSettings
:end-before: end ServerSettings
:language: java
Expand Down Expand Up @@ -545,7 +545,7 @@ This example specifies the following driver behavior in a MongoDB socket:
- To connect to an available socket within ``10 SECONDS``
- To read from an available socket within ``15 SECONDS``

.. literalinclude:: /includes/fundamentals/code-snippets/mcs.java
.. literalinclude:: /includes/fundamentals/code-snippets/MCSettings.java
:start-after: begin SocketSettings
:end-before: end SocketSettings
:language: java
Expand Down Expand Up @@ -593,7 +593,7 @@ Example
This example specifies for the driver to enable TLS/SSL when connecting
to MongoDB:

.. literalinclude:: /includes/fundamentals/code-snippets/mcs.java
.. literalinclude:: /includes/fundamentals/code-snippets/MCSettings.java
:start-after: begin SslSettings
:end-before: end SslSettings
:language: java
Expand Down
8 changes: 4 additions & 4 deletions source/crud/builders/aggregates.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _aggregates-builders:

===================
Aggregates Builders
===================
Expand All @@ -17,9 +19,7 @@ Aggregates Builders

.. toctree::

Atlas Vector Search </builders/vector-search>

.. _aggregates-builders:
Atlas Vector Search </atlas-vector-search>

Overview
--------
Expand Down Expand Up @@ -90,7 +90,7 @@ Project

Use the ``project()`` method to create a :manual:`$project </reference/operator/aggregation/project/>`
pipeline stage that project specified document fields. Field projection
in aggregation follows the same rules as :doc:`field projection in queries </crud/read-operations/project>`.
in aggregation follows the same rules as :ref:`field projection in queries <java-fundamentals-project>`.

.. tip::

Expand Down
10 changes: 4 additions & 6 deletions source/crud/builders/filters.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
.. _filters-builders:

================
Filters Builders
================



.. contents:: On this page
:local:
:backlinks: none
:depth: 2
:class: singlecol

.. _filters-builders:

Overview
--------

In this guide, you can learn how to use **builders** to specify
**filters** for your queries in the MongoDB Java driver.

Builders are classes provided by the MongoDB Java driver that help you
construct :ref:`BSON <bson>` objects. To learn more, see our :doc:`guide
on builders </builders/>`.
construct :ref:`BSON <bson>` objects. To learn more, see our :ref:`guide
on builders <java-builders>`.

Filters are the operations MongoDB uses to limit your results to what
you want to see.
Expand Down
10 changes: 4 additions & 6 deletions source/crud/builders/indexes.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
.. _indexes-builders:

================
Indexes Builders
================



.. contents:: On this page
:local:
:backlinks: none
:depth: 2
:class: singlecol

.. _indexes-builders:

Overview
--------

In this guide, you can learn how to specify **indexes** using
:doc:`builders </builders/>` in the MongoDB Java driver.
:ref:`builders <java-builders>` in the MongoDB Java driver.
The ``Indexes`` builder provides helper methods for constructing the
following types of indexes:

Expand All @@ -29,7 +27,7 @@ following types of indexes:

Indexes store a subset of the collection’s data set. The index stores
the value of a specific field or set of fields, ordered by the value of
the field. See our guide on :doc:`Indexes </fundamentals/indexes>` for
the field. See our guide on :ref:`Indexes <java-fundamentals-indexes>` for
examples of queries covered by indexes.

The ``Indexes`` class provides static factory methods for all the MongoDB index types.
Expand Down
8 changes: 3 additions & 5 deletions source/crud/builders/projections.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
.. _projections-builders:

====================
Projections Builders
====================



.. contents:: On this page
:local:
:backlinks: none
:depth: 2
:class: singlecol

.. _projections-builders:

Overview
--------

In this guide, you can learn how to specify **projections** using
:doc:`builders </builders/>` in the MongoDB Java driver.
:ref:`builders <java-builders>` in the MongoDB Java driver.

MongoDB supports **field projection**, specifying which fields to include and exclude when returning results from a
query. Projection in MongoDB follows some basic rules:
Expand Down
12 changes: 6 additions & 6 deletions source/crud/builders/sort.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _sorts-builders:

==============
Sorts Builders
==============
Expand All @@ -15,8 +17,6 @@ Sorts Builders
:depth: 2
:class: singlecol

.. _sorts-builders:

Overview
--------

Expand All @@ -31,15 +31,15 @@ examples of sort criteria are:
* Alphabetical order by first name

Builders are classes provided by the MongoDB Java driver that help you
construct :ref:`BSON <bson>` objects. To learn more, see our :doc:`guide
on builders </builders/>`.
construct :ref:`BSON <bson>` objects. To learn more, see our :ref:`guide
on builders <java-builders>`.

You should read this guide if you would like to use builders to specify sort
criteria for your queries.

If you want to learn the fundamentals of sorting in the MongoDB Java
driver, consider reading our
:doc:`guide on sorting </crud/read-operations/sort/>`.
:ref:`guide on sorting <java-fundamentals-sort>`.

.. _sorts-builders-sort-sample:

Expand All @@ -63,7 +63,7 @@ criteria operators supported by MongoDB. These methods return a ``Bson`` object
that you can pass to the ``sort()`` method of a ``FindIterable`` instance or to
``Aggregates.sort()``. If you want to learn more about the ``Aggregates``
class, see our
:doc:`guide on the Aggregates builder </builders/aggregates>`.
:ref:`guide on the Aggregates builder <aggregates-builders>`.

For more information about the classes and interfaces in this section, see the
following API Documentation:
Expand Down
2 changes: 1 addition & 1 deletion source/crud/collations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ order as shown below:
How to Specify Collations
-------------------------

MongoDB supports collations on most :doc:`CRUD operations </fundamentals/crud>`
MongoDB supports collations on most :ref:`CRUD operations <java-crud-operations>`
and aggregations. For a complete list of supported operations, see the
:manual:`Operations that Support Collations </reference/collation/#operations-that-support-collation>`
server manual page.
Expand Down
10 changes: 5 additions & 5 deletions source/crud/compound-operations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ The output of the preceding code resembles the following:
{"food": "pizza", "color": "green"}

For more information about the ``Projections`` class, see our
:doc:`guide on the Projections builder </builders/projections/>`.
:ref:`guide on the Projections builder <projections-builders>`.

For more information about the upsert operation, see our
:doc:`guide on upserts </crud/write-operations/upsert/>`.
:ref:`guide on upserts <java-upsert>`.

For more information about the methods and classes mentioned in this section,
see the following API Documentation:
Expand Down Expand Up @@ -187,7 +187,7 @@ The output of the preceding code resembles the following:
{"_id": 2, "food": "pear", "color": "yellow"}

For more information about the ``Sorts`` class, see our
:doc:`guide on the Sorts builder </builders/sort/>`.
:ref:`guide on the Sorts builder <sorts-builders>`.

For more information about the methods and classes mentioned in this section,
see the following API Documentation:
Expand Down Expand Up @@ -318,10 +318,10 @@ instance:
for the duration of your compound operation.

For information on the ``Updates`` class, see our
:doc:`guide on the Updates builder </builders/updates/>`.
:ref:`guide on the Updates builder <updates-builders>`.

For more information of the ``Filters`` class, see our
:doc:`guide on the Filters builder </builders/filters/>`.
:ref:`guide on the Filters builder <filters-builders>`.

For more information about the ``findOneAndUpdate()`` method, see
the API Documentation for the `MongoCollection class <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#findOneAndUpdate(org.bson.conversions.Bson,java.util.List,com.mongodb.client.model.FindOneAndUpdateOptions)>`__.
4 changes: 2 additions & 2 deletions source/crud/gridfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ see the following resources:

- `GridFSFindIterable <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/gridfs/GridFSFindIterable.html>`__ API Documentation
- `GridFSBucket.find() <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/gridfs/GridFSBucket.html#find(org.bson.conversions.Bson)>`__ API Documentation
- :doc:`Sort Results </crud/read-operations/sort>`
- :doc:`Limit the Number of Returned Results </crud/read-operations/limit>`
- :ref:`Sort Results <java-fundamentals-sort>`
- :ref:`Limit the Number of Returned Results <java-fundamentals-limit>`

.. _gridfs-download-files:

Expand Down
4 changes: 2 additions & 2 deletions source/crud/query-document.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. _java-query:

===============
Specify a Query
===============



.. contents:: On this page
:local:
:backlinks: none
Expand Down
10 changes: 5 additions & 5 deletions source/crud/read-operations/geo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ GeoJSON data to a ``2dsphere`` index. The following snippet creates a
collection.createIndex(Indexes.geo2dsphere("location.geo"));

For more information about the ``Indexes`` builder, see our
:doc:`guide on the Indexes builder </builders/indexes>`.
:ref:`guide on the Indexes builder <indexes-builders>`.

.. guide resource

Expand Down Expand Up @@ -166,7 +166,7 @@ legacy coordinate pairs to a ``2d`` index. The following snippet creates a
collection.createIndex(Indexes.geo2d("coordinates"));

For more information about the ``Indexes`` builder, see our
:doc:`guide on the Indexes builder </builders/indexes>`.
:ref:`guide on the Indexes builder <indexes-builders>`.

For more information about legacy coordinate pairs, see the
:manual:`{+mdb-server+} manual page on legacy coordinate pairs </geospatial-queries/#legacy-coordinate-pairs>`.
Expand Down Expand Up @@ -208,7 +208,7 @@ For more information about geospatial query operators, see the
.. external resource

For more information about ``Filters``, see our
:doc:`guide on the Filters builder </builders/filters>`.
:ref:`guide on the Filters builder <filters-builders>`.

Query Parameters
~~~~~~~~~~~~~~~~
Expand All @@ -229,7 +229,7 @@ Examples

The following examples use the MongoDB Atlas sample dataset. You can learn how
to set up your own free-tier Atlas cluster and how to load the sample dataset
in our :doc:`quick start guide </quick-start>`.
in our :ref:`quick start guide <java-get-started>`.

The examples use the ``theaters`` collection in the ``sample_mflix`` database
from the sample dataset. The ``theaters`` collection contains a ``2dsphere`` index
Expand Down Expand Up @@ -293,7 +293,7 @@ For more information about the ``$near`` operator, see
:manual:`the reference documentation for $near </reference/operator/query/near/#mongodb-query-op.-near>`.

For more information about ``Filters``,
:doc:`see our guide on the Filters builder </builders/filters>`.
:ref:`see our guide on the Filters builder <filters-builders>`.

Query Within a Range
~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion source/crud/read-operations/limit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ to reach the specified limit, it can return a smaller number.
If you use ``limit()`` with the ``skip()`` instance method, the skip applies
first and the limit only applies to the documents left over after
the skip. For more information about the ``skip()`` method, see our
:doc:`guide on Skipping Returned Documents </crud/read-operations/skip/>`.
:ref:`guide on Skipping Returned Documents <java-fundamentals-skip>`.

The following examples demonstrate, respectively, how to insert data into
a collection, how to use ``limit()`` to restrict the number of returned documents,
Expand Down
Loading
Loading