Skip to content

Commit 94ed12e

Browse files
Update source/includes/geospatial-places-data-setup.rst
Co-authored-by: jeff-allen-mongo <[email protected]>
1 parent 0dd74a0 commit 94ed12e

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

source/geospatial-queries.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ Examples
296296

297297
.. include:: /includes/geospatial-places-data-setup.rst
298298

299-
Consider the ``places`` collection above, it has a ``2dsphere`` index.
299+
The ``places`` collection above has a ``2dsphere`` index.
300300
The following query uses the :query:`$near` operator to return
301301
documents that are at least 1000 meters from and at most 5000 meters
302302
from the specified GeoJSON point, sorted in order from nearest to

source/includes/geospatial-places-data-setup.rst

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@ Create a collection ``places`` with the following documents:
22

33
.. code-block:: javascript
44
5-
db.places.insertMany(
6-
[
7-
{
8-
name: "Central Park",
9-
location: { type: "Point", coordinates: [ -73.97, 40.77 ] },
10-
category: "Parks"
11-
} ,
12-
{
13-
name: "Sara D. Roosevelt Park",
14-
location: { type: "Point", coordinates: [ -73.9928, 40.7193 ] },
15-
category: "Parks"
16-
} ,
17-
{
18-
name: "Polo Grounds",
19-
location: { type: "Point", coordinates: [ -73.9375, 40.8303 ] },
20-
category: "Stadiums"
21-
}
22-
])
5+
db.places.insertMany( [
6+
{
7+
name: "Central Park",
8+
location: { type: "Point", coordinates: [ -73.97, 40.77 ] },
9+
category: "Parks"
10+
},
11+
{
12+
name: "Sara D. Roosevelt Park",
13+
location: { type: "Point", coordinates: [ -73.9928, 40.7193 ] },
14+
category: "Parks"
15+
},
16+
{
17+
name: "Polo Grounds",
18+
location: { type: "Point", coordinates: [ -73.9375, 40.8303 ] },
19+
category: "Stadiums"
20+
}
21+
] )
2322
2423
The following operation creates a ``2dsphere`` index on the
2524
``location`` field:

0 commit comments

Comments
 (0)