Skip to content
Merged
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
2 changes: 2 additions & 0 deletions source/core/index-multikey.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ For more information, see :ref:`unique-separate-documents`.
Limitations
-----------

.. _compound_multikey_indexes:

Compound Multikey Indexes
~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
13 changes: 13 additions & 0 deletions source/includes/fact-validate-standalone-inconsistencies.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Index inconsistencies include:

- An index is :doc:`multikey </core/index-multikey>` but there are
no multikey fields.
- An index has :ref:`multikeyPaths <compound_multikey_indexes>` covering
fields that are not multikey.
- An index does not have
:ref:`multikeyPaths <compound_multikey_indexes>` but
there are multikey documents (for indexes built before 3.4).

If any inconsistencies are detected by the
:method:`db.collection.validate()` command, a warning is returned
and the repair flag on the index is set to ``true``.
2 changes: 2 additions & 0 deletions source/reference/command/validate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Definition
Starting in version 5.0, the :dbcommand:`validate` command can also
find inconsistencies in the collection and fix them if possible.

.. include:: /includes/fact-validate-standalone-inconsistencies.rst

.. note::

The :dbcommand:`validate` command does not support :doc:`views
Expand Down
4 changes: 4 additions & 0 deletions source/reference/method/db.collection.validate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ db.collection.validate()
:depth: 1
:class: singlecol

.. _validate-standalone-inconsistencies:

Description
-----------

Expand All @@ -24,6 +26,8 @@ Description
Starting in version 5.0, the :method:`db.collection.validate()`
method can also fix inconsistencies in the collection.

.. include:: /includes/fact-validate-standalone-inconsistencies.rst

The :method:`db.collection.validate()` method is a wrapper around
the :dbcommand:`validate` command.

Expand Down
8 changes: 8 additions & 0 deletions source/release-notes/5.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,14 @@ Cannot Drop ``Ready`` Indexes During In-Progress Index Builds

.. include:: /includes/fact-5.0-dropindexes-inprog.rst

Foreground Validation May Fix Multikey Metadata Inconsistencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When run on a MongoDB deployment,
:method:`db.collection.validate()` attempts to fix
:ref:`multikey metadata inconsistencies <validate-standalone-inconsistencies>`
of standalone deployments.

Removal of ``geoHaystack`` Index and the ``geoSearch`` Command
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down