Skip to content
Merged
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
20 changes: 16 additions & 4 deletions source/core/index-compound.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,22 @@ operation that resembles the following prototype:

.. include:: /includes/fact-index-specification-field-value.rst

.. important:: You may not create compound indexes that have
``hashed`` index type. You will receive an error if you attempt to
create a compound index that includes :doc:`a hashed index
field </core/index-hashed>`.
.. important::

Starting in MongoDB 4.4:

- Compound indexes may contain **a single** :doc:`hashed index field
</core/index-hashed>`.
- You will receive an error if you attempt to create a compound index
that contains more than one :doc:`hashed index field
</core/index-hashed>`.

In MongoDB 4.2 or earlier:

- Compound indexes may **not** contain a :doc:`hashed index field
</core/index-hashed>`.
- You will receive an error if you attempt to create a compound index
that contains a :doc:`hashed index field </core/index-hashed>`.

Consider a collection named ``products`` that holds documents that
resemble the following document:
Expand Down