diff --git a/source/core/query-optimization.txt b/source/core/query-optimization.txt index 528b0d49829..fd0781d7280 100644 --- a/source/core/query-optimization.txt +++ b/source/core/query-optimization.txt @@ -108,7 +108,7 @@ 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: @@ -116,7 +116,7 @@ documents. .. 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.