Skip to content
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
11 changes: 6 additions & 5 deletions source/applications/indexes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,12 @@ located sequentially on disk.
MongoDB automatically uses an index that covers a query when possible.
To ensure that an index can *cover* a query, create an index that
includes all the fields listed in the :ref:`query document
<read-operations-query-document>` and in the query result, usually by
way of a :ref:`projection <projection>` document. By default, MongoDB
includes the ``_id`` field in the query result. So, if the index does
**not** include the ``_id`` field, then you must exclude the ``_id``
field (i.e. ``_id: 0``) from the query.
<read-operations-query-document>` and in the query result. You can
specify the fields to return in the query results with a
:ref:`projection <projection>` document. By default, MongoDB includes
the ``_id`` field in the query result. So, if the index does **not**
include the ``_id`` field, then you must exclude the ``_id`` field
(i.e. ``_id: 0``) from the query results.

.. example::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,5 @@ in MongoDB 2.4:
| ``print()``
| ``sleep()``
| ``Timestamp()``
| ``tojson()``
| ``tojsononeline()``
| ``tojsonObject()``
| ``UUID()``
| ``version()``