Skip to content

Commit a5e8390

Browse files
authored
Clean up: refs (#654)
1 parent d95d6f6 commit a5e8390

35 files changed

+97
-207
lines changed

source/connection/connect.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,7 @@ check the following items in your code:
295295

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

301300
- The name of the authentication database that you specified is correct. To
302301
learn how to set up the users and roles for your MongoDB deployment, see

source/connection/connection-options.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ parameters of the connection URI to specify the behavior of the client.
193193

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

200200
| **Default**: By default, the client picks the most secure

source/connection/mongoclientsettings.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ connection behavior:
112112
- Sets the :ref:`command listeners <command-events-java>`.
113113

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

118118
* - ``credential()``
@@ -162,7 +162,7 @@ Example
162162

163163
This example demonstrates specifying a ``ConnectionString``:
164164

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

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

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

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

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

548-
.. literalinclude:: /includes/fundamentals/code-snippets/mcs.java
548+
.. literalinclude:: /includes/fundamentals/code-snippets/MCSettings.java
549549
:start-after: begin SocketSettings
550550
:end-before: end SocketSettings
551551
:language: java
@@ -593,7 +593,7 @@ Example
593593
This example specifies for the driver to enable TLS/SSL when connecting
594594
to MongoDB:
595595

596-
.. literalinclude:: /includes/fundamentals/code-snippets/mcs.java
596+
.. literalinclude:: /includes/fundamentals/code-snippets/MCSettings.java
597597
:start-after: begin SslSettings
598598
:end-before: end SslSettings
599599
:language: java

source/crud/builders/aggregates.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _aggregates-builders:
2+
13
===================
24
Aggregates Builders
35
===================
@@ -17,9 +19,7 @@ Aggregates Builders
1719

1820
.. toctree::
1921

20-
Atlas Vector Search </builders/vector-search>
21-
22-
.. _aggregates-builders:
22+
Atlas Vector Search </atlas-vector-search>
2323

2424
Overview
2525
--------
@@ -90,7 +90,7 @@ Project
9090

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

9595
.. tip::
9696

source/crud/builders/filters.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
1+
.. _filters-builders:
2+
13
================
24
Filters Builders
35
================
46

5-
6-
77
.. contents:: On this page
88
:local:
99
:backlinks: none
1010
:depth: 2
1111
:class: singlecol
1212

13-
.. _filters-builders:
14-
1513
Overview
1614
--------
1715

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

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

2523
Filters are the operations MongoDB uses to limit your results to what
2624
you want to see.

source/crud/builders/indexes.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1+
.. _indexes-builders:
2+
13
================
24
Indexes Builders
35
================
46

5-
6-
77
.. contents:: On this page
88
:local:
99
:backlinks: none
1010
:depth: 2
1111
:class: singlecol
1212

13-
.. _indexes-builders:
14-
1513
Overview
1614
--------
1715

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

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

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

3533
The ``Indexes`` class provides static factory methods for all the MongoDB index types.

source/crud/builders/projections.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1+
.. _projections-builders:
2+
13
====================
24
Projections Builders
35
====================
46

5-
6-
77
.. contents:: On this page
88
:local:
99
:backlinks: none
1010
:depth: 2
1111
:class: singlecol
1212

13-
.. _projections-builders:
14-
1513
Overview
1614
--------
1715

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

2119
MongoDB supports **field projection**, specifying which fields to include and exclude when returning results from a
2220
query. Projection in MongoDB follows some basic rules:

source/crud/builders/sort.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _sorts-builders:
2+
13
==============
24
Sorts Builders
35
==============
@@ -15,8 +17,6 @@ Sorts Builders
1517
:depth: 2
1618
:class: singlecol
1719

18-
.. _sorts-builders:
19-
2020
Overview
2121
--------
2222

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

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

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

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

4444
.. _sorts-builders-sort-sample:
4545

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

6868
For more information about the classes and interfaces in this section, see the
6969
following API Documentation:

source/crud/collations.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ order as shown below:
7171
How to Specify Collations
7272
-------------------------
7373

74-
MongoDB supports collations on most :doc:`CRUD operations </fundamentals/crud>`
74+
MongoDB supports collations on most :ref:`CRUD operations <java-crud-operations>`
7575
and aggregations. For a complete list of supported operations, see the
7676
:manual:`Operations that Support Collations </reference/collation/#operations-that-support-collation>`
7777
server manual page.

source/crud/compound-operations.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ The output of the preceding code resembles the following:
101101
{"food": "pizza", "color": "green"}
102102

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

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

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

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

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

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

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

326326
For more information about the ``findOneAndUpdate()`` method, see
327327
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)>`__.

source/crud/gridfs.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ see the following resources:
263263

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

269269
.. _gridfs-download-files:
270270

source/crud/query-document.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
.. _java-query:
2+
13
===============
24
Specify a Query
35
===============
46

5-
6-
77
.. contents:: On this page
88
:local:
99
:backlinks: none

source/crud/read-operations/geo.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ GeoJSON data to a ``2dsphere`` index. The following snippet creates a
115115
collection.createIndex(Indexes.geo2dsphere("location.geo"));
116116

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

120120
.. guide resource
121121

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

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

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

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

213213
Query Parameters
214214
~~~~~~~~~~~~~~~~
@@ -229,7 +229,7 @@ Examples
229229

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

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

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

298298
Query Within a Range
299299
~~~~~~~~~~~~~~~~~~~~

source/crud/read-operations/limit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ to reach the specified limit, it can return a smaller number.
2525
If you use ``limit()`` with the ``skip()`` instance method, the skip applies
2626
first and the limit only applies to the documents left over after
2727
the skip. For more information about the ``skip()`` method, see our
28-
:doc:`guide on Skipping Returned Documents </crud/read-operations/skip/>`.
28+
:ref:`guide on Skipping Returned Documents <java-fundamentals-skip>`.
2929

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

0 commit comments

Comments
 (0)