Skip to content

DOCS-1371 clarify numbers of geospatial indexes allowed #924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions source/core/2d.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Use a ``2d`` index if:

Do not use a ``2d`` index if your location data includes GeoJSON objects. To
index on both legacy coordinate pairs *and* GeoJSON objects, use a
:doc:`2dsphere index </core/2dsphere>`.
:doc:`2dsphere </core/2dsphere>` index.

The ``2d`` index supports calculations on a flat, Euclidean plane. The
``2d`` index also supports *distance-only* calculations on a sphere, but
Expand All @@ -30,7 +30,8 @@ criteria selects a large number of documents, the additional criteria
only filters the result set. The additional criteria *does not* result
in a more targeted query.

MongoDB allows one ``2d`` index per collection.
MongoDB allows one ``2d`` index per collection. MongoDB also allows one
:doc:`2dsphere </core/2dsphere>` index per collection.

.. important:: You cannot use a ``2d`` index as a shard key when
sharding a collection. However, you can create and maintain a
Expand Down
3 changes: 3 additions & 0 deletions source/core/2dsphere.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ documents. You can arrange the fields in any order.
The default datum for an earth-like sphere in MongoDB 2.4 is :term:`WGS84`.
Coordinate-axis order is **longitude, latitude**.

MongoDB allows one ``2dsphere`` index per collection. MongoDB also
allows one :doc:`2d </core/2d>` index per collection.

.. important:: You cannot use a ``2dsphere`` index as a shard key when
sharding a collection. However, you can create and maintain a
geospatial index on a sharded collection by using a different field
Expand Down