Skip to content

Commit 3feddfd

Browse files
committed
DOCS-898 fix 2d geospatial example
1 parent 1a5021a commit 3feddfd

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

source/applications/geospatial-indexes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ command. You must specify both the coordinate and other field to
409409

410410
.. code-block:: javascript
411411

412-
db.runCommand( { geoSearch: <haystack index>,
412+
db.runCommand( { geoSearch: <collection>,
413413
search: { <field>: <value> } } )
414414

415415
For example, to return all documents with the value ``restaurants`` in

source/core/data-modeling.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ that:
1818
of data.
1919

2020
Each document only needs to contain relevant fields to the entity or
21-
object that the document represents. In practice, *most documents in a
21+
object that the document represents. In practice, *most* documents in a
2222
collection share a similar structure. Schema flexibility means that
2323
you can model your documents in MongoDB so that they can closely
2424
resemble and reflect application-level objects.

source/core/geospatial-indexes.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,16 @@ following prototype:
205205

206206
.. code-block:: javascript
207207

208-
{ _id : 100, { long : 126.9, lat : 35.2 }, type : "restaurant"}
209-
{ _id : 200, { long : 127.5, lat : 36.1 }, type : "restaurant"}
210-
{ _id : 300, { long : 128.0, lat : 36.7 }, type : "national park"}
208+
{ _id : 100, pos: { long : 126.9, lat : 35.2 }, type : "restaurant"}
209+
{ _id : 200, pos: { long : 127.5, lat : 36.1 }, type : "restaurant"}
210+
{ _id : 300, pos: { long : 128.0, lat : 36.7 }, type : "national park"}
211211

212212
The following operations creates a haystack index with buckets that
213213
store keys within 1 unit of longitude or latitude.
214214

215215
.. code-block:: javascript
216216

217-
db.mydb.ensureIndex( { pos : "geoHaystack", type : 1 }, { bucketSize : 1 } )
217+
db.mycoll.ensureIndex( { pos : "geoHaystack", type : 1 }, { bucketSize : 1 } )
218218

219219
Therefore, this index stores the document with an ``_id`` field
220220
that has the value ``200`` in two
@@ -223,7 +223,7 @@ following prototype:
223223
1. in a bucket that includes the document where the ``_id`` field
224224
has a value of ``100``, and
225225

226-
2. in a buckt that includes the document where the ``_id`` field
226+
2. in a bucket that includes the document where the ``_id`` field
227227
has a value of ``300``.
228228

229229
To query using a haystack index you use the :dbcommand:`geoSearch`

source/tutorial/model-embedded-one-to-one-relationships-between-documents.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Model Embedded One-to-One Relationships Between Documents
55
=========================================================
66

7-
.. default-domain::
7+
.. default-domain:: mongodb
88

99
Overview
1010
--------

0 commit comments

Comments
 (0)