You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -76,7 +82,7 @@ The field should contain an array of two values in which the first represents
76
82
the ``x`` axis value and the second represents the ``y`` axis value.
77
83
78
84
To enable querying using legacy coordinate pairs, create a ``2d`` index on
79
-
the field on the collection. The following snippet creats an index on the
85
+
the field on the collection. The following snippet creates an index on the
80
86
``coordinates`` field in the ``shipwrecks`` collection using the
81
87
``createIndex()`` method:
82
88
@@ -85,27 +91,30 @@ the field on the collection. The following snippet creats an index on the
85
91
db.shipwrecks({coordinates: "2d"})
86
92
87
93
See the
88
-
:manual:`MongoDB server manual page on legacy coordinate pairs </geospatial-queries/index.html#legacy-coordinate-pairs>`
94
+
:manual:`MongoDB server manual page on legacy coordinate pairs </geospatial-queries/#legacy-coordinate-pairs>`
89
95
for more information.
90
96
91
97
.. note::
92
98
93
99
Spherical (``2dsphere``) and flat (``2d``) indexes support some, but
94
100
not all, of the same query operators. For a full list of operators
95
101
and their index compatibility, consult the
96
-
:manual:`manual entry for geospatial queries </geospatial-queries/index.html#geospatial-models>`.
102
+
:manual:`manual entry for geospatial queries </geospatial-queries/#geospatial-query-operators>`.
97
103
98
104
Examples
99
105
--------
100
106
101
-
The following examples use the ``theaters`` collection of the
102
-
``sample_mflix`` sample database available in MongoDB Atlas, with a
103
-
``2dsphere`` index on the ``location.geo`` field.
107
+
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
108
+
:doc:`quick start guide </quick-start>`.
109
+
110
+
The examples use the ``theaters`` collection in the ``sample_mflix`` database
111
+
from the sample dataset. The ``theaters`` collection contains a ``2dsphere`` index
112
+
on the ``location.geo`` field.
104
113
105
114
Query by Proximity
106
115
~~~~~~~~~~~~~~~~~~
107
116
108
-
The :manual:`$near </reference/operator/query/near/#op._S_near>`
117
+
The :manual:`$near </reference/operator/query/near/#mongodb-query-op.-near>`
109
118
operator accepts a set of longitude-latitude coordinates and returns
110
119
documents ordered from nearest to farthest. To limit the results to a
111
120
maximum distance in meters, use the ``$maxDistance`` option. For a
0 commit comments