Skip to content
Closed
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
4 changes: 2 additions & 2 deletions source/core/query-optimization.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ documents.
.. code-block:: javascript

db.inventory.find( { type: "food", item:/^c/ },
{ item: 1, _id: 0 } )
{ item: 1 } )

However, the index will **not** cover the following query, which
returns the ``item`` field **and** the ``_id`` field:

.. code-block:: javascript

db.inventory.find( { type: "food", item:/^c/ },
{ item: 1 } )
{ item: 1, _id: 0 } )

See :ref:`indexes-covered-queries` for more information on the
behavior and use of covered queries.