Skip to content

Commit 86a6ec1

Browse files
Update source/includes/geospatial-places-data-setup.rst
Co-authored-by: jeff-allen-mongo <jeffrey.allen@10gen.com>
1 parent a2c8ff2 commit 86a6ec1

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

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

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

33
.. code-block:: javascript
44
5-
db.places.insert( {
6-
name: "Central Park",
7-
location: { type: "Point", coordinates: [ -73.97, 40.77 ] },
8-
category: "Parks"
9-
} );
10-
db.places.insert( {
11-
name: "Sara D. Roosevelt Park",
12-
location: { type: "Point", coordinates: [ -73.9928, 40.7193 ] },
13-
category: "Parks"
14-
} );
15-
db.places.insert( {
16-
name: "Polo Grounds",
17-
location: { type: "Point", coordinates: [ -73.9375, 40.8303 ] },
18-
category: "Stadiums"
19-
} );
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+
] )
2022
2123
The following operation creates a ``2dsphere`` index on the
2224
``location`` field:

0 commit comments

Comments
 (0)