Skip to content

Commit 2b68884

Browse files
authored
DOCSP-26193 replaces 2d and 2dsphere index doc admonitions (#2082)
* DOCSP-26193 replaces 2d and 2dsphere index doc admonitions * internal review feedback
1 parent 6a5a014 commit 2b68884

30 files changed

+104
-109
lines changed

source/core/2d.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Considerations
3636
Do not use a ``2d`` index if your location data includes GeoJSON
3737
objects. To index on both :ref:`legacy coordinate pairs
3838
<geospatial-legacy>` *and* :ref:`GeoJSON objects <geospatial-geojson>`,
39-
use a :doc:`2dsphere </core/2dsphere>` index.
39+
use a :ref:`2dsphere <2dsphere-index>` index.
4040

4141
.. include:: /includes/extracts/geospatial-index-shard-key-restriction-2d.rst
4242

source/core/2dsphere.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Considerations
8888
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8989

9090
.. |first-geo-index| replace:: ``2dsphere`` index
91-
.. |second-geo-index| replace:: :doc:`2d </core/2d>` index
91+
.. |second-geo-index| replace:: :ref:`2d <2d-index>` index
9292
.. include:: /includes/fact-limitation-one-geo-index-per-collection.rst
9393

9494
Shard Key Restrictions
@@ -113,7 +113,7 @@ Create a ``2dsphere`` Index
113113

114114
.. include:: /includes/create-2dsphere-index.rst
115115

116-
Unlike a compound :doc:`2d </core/2d>` index which can reference one
116+
Unlike a compound :ref:`2d <2d-index>` index which can reference one
117117
location field and one other field, a :ref:`compound
118118
<index-type-compound>` ``2dsphere`` index can reference multiple
119119
location and non-location fields.
@@ -140,8 +140,8 @@ documents that store location data as :ref:`GeoJSON Point
140140
Create a ``2dsphere`` Index
141141
~~~~~~~~~~~~~~~~~~~~~~~~~~~
142142

143-
The following operation creates a :doc:`2dsphere </core/2dsphere>`
144-
index on the location field ``loc``:
143+
The following operation creates a ``2dsphere`` index on the location
144+
field ``loc``:
145145

146146
.. code-block:: javascript
147147

@@ -162,7 +162,7 @@ respectively.
162162

163163
db.places.createIndex( { loc : "2dsphere" , category : -1, name: 1 } )
164164

165-
Unlike the :doc:`2d </core/2d>` index, a compound ``2dsphere`` index
165+
Unlike the ``2d`` index, a compound ``2dsphere`` index
166166
does not require the location field to be the first field indexed. For
167167
example:
168168

source/core/geospatial-indexes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Multi-location Documents for ``2d`` Indexes
6464
-------------------------------------------
6565

6666
.. note::
67-
:doc:`2dsphere </core/2dsphere>` indexes can cover multiple geospatial fields
67+
:ref:`2dsphere <2dsphere-index>` indexes can cover multiple geospatial fields
6868
in a document, and can express lists of points using
6969
:ref:`geojson-multipoint` embedded documents.
7070

source/core/index-sparse.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ behavior.
7777
Indexes that are ``sparse`` by Default
7878
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7979

80-
:ref:`2dsphere (version 2) <2dsphere-v2>`, :doc:`2d </core/2d>`,
81-
:doc:`geoHaystack </core/geohaystack>`, and :doc:`text
82-
</core/index-text>` indexes are always ``sparse``.
80+
:ref:`2dsphere (version 2) <2dsphere-v2>`, :ref:`2d <2d-index>`,
81+
:ref:`geoHaystack <index-geohaystack-index>`, and :ref:`text
82+
<index-feature-text>` indexes are always ``sparse``.
8383

8484
``sparse`` Compound Indexes
8585
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -89,16 +89,15 @@ ascending/descending index keys will index a document as long as the
8989
document contains at least one of the keys.
9090

9191
For sparse compound indexes that contain a geospatial key (i.e.
92-
:doc:`2dsphere </core/2dsphere>`, :doc:`2d </core/2d>`, or
93-
:doc:`geoHaystack </core/geohaystack>` index keys) along with
94-
ascending/descending index key(s), only the existence of the geospatial
95-
field(s) in a document determine whether the index references the
96-
document.
97-
98-
For sparse compound indexes that contain :ref:`text <index-feature-text>`
99-
index keys along with ascending/descending index keys, only the
100-
existence of the ``text`` index field(s) determine whether the index
101-
references a document.
92+
``2dsphere``, ``2d``, or ``geoHaystack`` index keys) along
93+
with ascending/descending index key(s), only the existence of the
94+
geospatial field(s) in a document determine whether the index
95+
references the document.
96+
97+
For sparse compound indexes that contain :ref:`text
98+
<index-feature-text>` index keys along with ascending/descending index
99+
keys, only the existence of the ``text`` index field(s) determine
100+
whether the index references a document.
102101

103102
.. _sparse-unique-index:
104103

source/core/timeseries/timeseries-limitations.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Time Series Secondary Indexes with MongoDB 6.0 and Later
8787
Starting in MongoDB 6.0, you can add a :term:`secondary index <secondary
8888
index>` to any field.
8989

90-
These index types are not supported:
90+
These index types aren't supported:
9191

9292
- :ref:`Text indexes <index-feature-text>`
9393
- :ref:`2d indexes <2d-index>`

source/core/timeseries/timeseries-secondary-index.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Starting in MongoDB 6.0, you can:
293293
- Add a :term:`secondary index <secondary index>` to any field or
294294
subfield.
295295

296-
- Use the ``metaField`` with :doc:`2dsphere </core/2dsphere>` indexes.
296+
- Use the ``metaField`` with :ref:`2dsphere <2dsphere-index>` indexes.
297297

298298
.. note::
299299

source/geospatial-queries.txt

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ GeoJSON Objects
2828
~~~~~~~~~~~~~~~
2929

3030
To calculate geometry over an Earth-like sphere, store your location
31-
data as :doc:`GeoJSON objects </reference/geojson>`.
31+
data as :ref:`GeoJSON objects <geospatial-indexes-store-geojson>`.
3232

3333
.. include:: /includes/extracts/geojson-specification-geospatial.rst
3434

@@ -58,20 +58,20 @@ geospatial queries.
5858
``2dsphere``
5959
~~~~~~~~~~~~
6060

61-
:doc:`2dsphere </core/2dsphere>` indexes support queries that calculate
61+
:ref:`2dsphere <2dsphere-index>` indexes support queries that calculate
6262
:ref:`geometries on an earth-like sphere <geospatial-geometry>`.
6363

6464
.. include:: /includes/create-2dsphere-index.rst
6565

6666
For more information on the ``2dsphere`` index, see
67-
:doc:`/core/2dsphere`.
67+
:ref:`<2dsphere-index>`.
6868

6969
.. _geo-2d:
7070

7171
``2d``
7272
~~~~~~
7373

74-
:doc:`2d </core/2d>` indexes support queries that calculate
74+
:ref:`2d <2d-index>` indexes support queries that calculate
7575
:ref:`geometries on a two-dimensional plane <geospatial-geometry>`.
7676
Although the index can support :query:`$nearSphere` queries that
7777
calculate on a sphere, if possible, use the :ref:`geo-2dsphere` index
@@ -128,32 +128,28 @@ MongoDB provides the following geospatial query operators:
128128
* - :query:`$geoIntersects`
129129

130130
- Selects geometries that intersect with a :term:`GeoJSON` geometry.
131-
The :doc:`2dsphere </core/2dsphere>` index supports
132-
:query:`$geoIntersects`.
131+
The ``2dsphere`` index supports :query:`$geoIntersects`.
133132

134133

135134
* - :query:`$geoWithin`
136135

137136
- Selects geometries within a bounding :ref:`GeoJSON geometry
138-
<geospatial-indexes-store-geojson>`. The :doc:`2dsphere
139-
</core/2dsphere>` and :doc:`2d </core/2d>` indexes support
140-
:query:`$geoWithin`.
137+
<geospatial-indexes-store-geojson>`. The ``2dsphere`` and
138+
``2d`` indexes support :query:`$geoWithin`.
141139

142140

143141
* - :query:`$near`
144142

145143
- Returns geospatial objects in proximity to a point.
146-
Requires a geospatial index. The :doc:`2dsphere
147-
</core/2dsphere>` and :doc:`2d </core/2d>` indexes support
148-
:query:`$near`.
144+
Requires a geospatial index. The ``2dsphere`` and ``2d`` indexes
145+
support :query:`$near`.
149146

150147

151148
* - :query:`$nearSphere`
152149

153150
- Returns geospatial objects in proximity to a point on a sphere.
154-
Requires a geospatial index. The :doc:`2dsphere
155-
</core/2dsphere>` and :doc:`2d </core/2d>` indexes support
156-
:query:`$nearSphere`.
151+
Requires a geospatial index. The ``2dsphere`` and ``2d`` indexes
152+
support :query:`$nearSphere`.
157153

158154

159155

@@ -162,8 +158,8 @@ For more details, including examples, see the individual reference page.
162158
Geospatial Aggregation Stage
163159
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164160

165-
MongoDB provides the following geospatial :doc:`aggregation pipeline
166-
stage </core/aggregation-pipeline>`:
161+
MongoDB provides the following geospatial :ref:`aggregation pipeline
162+
stage <aggregation-pipeline>`:
167163

168164
.. list-table::
169165
:header-rows: 1

source/includes/example-nearSphere-minDistance.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Consider a collection ``places`` that contains documents with a
2-
``location`` field and has a :doc:`2dsphere </core/2dsphere>` index.
2+
``location`` field and has a :ref:`2dsphere <2dsphere-index>` index.
33

44
Then, the following example returns whose ``location`` is at least
55
``1000`` meters from and at most ``5000`` meters from the specified

source/includes/extracts-collation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ content: |
183183
184184
- :ref:`text <index-feature-text>` indexes,
185185
186-
- :doc:`2d </core/2d>` indexes, and
186+
- :ref:`2d <2d-index>` indexes, and
187187
188188
- :doc:`geoHaystack </core/geohaystack>` indexes.
189189

source/includes/geo-data-limit-for-2dsphere.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Fields with :doc:`2dsphere </core/2dsphere>` indexes must hold geometry
1+
Fields with :ref:`2dsphere <2dsphere-index>` indexes must hold geometry
22
data in the form of :term:`coordinate pairs <legacy coordinate pairs>`
33
or :term:`GeoJSON` data. If you attempt to insert a document with
44
non-geometry data in a ``2dsphere`` indexed field, or build a

0 commit comments

Comments
 (0)