diff --git a/source/core/index-multikey.txt b/source/core/index-multikey.txt index 3051b1c11ca..d97dbbbae27 100644 --- a/source/core/index-multikey.txt +++ b/source/core/index-multikey.txt @@ -73,6 +73,8 @@ For more information, see :ref:`unique-separate-documents`. Limitations ----------- +.. _compound_multikey_indexes: + Compound Multikey Indexes ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/includes/fact-validate-standalone-inconsistencies.rst b/source/includes/fact-validate-standalone-inconsistencies.rst new file mode 100644 index 00000000000..6e48632f1ca --- /dev/null +++ b/source/includes/fact-validate-standalone-inconsistencies.rst @@ -0,0 +1,13 @@ +Index inconsistencies include: + +- An index is :doc:`multikey ` but there are + no multikey fields. +- An index has :ref:`multikeyPaths ` covering + fields that are not multikey. +- An index does not have + :ref:`multikeyPaths ` 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``. \ No newline at end of file diff --git a/source/reference/command/validate.txt b/source/reference/command/validate.txt index ea4b53bda37..cdd3dba2de0 100644 --- a/source/reference/command/validate.txt +++ b/source/reference/command/validate.txt @@ -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 diff --git a/source/reference/method/db.collection.validate.txt b/source/reference/method/db.collection.validate.txt index ffac18c76fc..c96f46f42f4 100644 --- a/source/reference/method/db.collection.validate.txt +++ b/source/reference/method/db.collection.validate.txt @@ -10,6 +10,8 @@ db.collection.validate() :depth: 1 :class: singlecol +.. _validate-standalone-inconsistencies: + Description ----------- @@ -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. diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index ac14b8c0f40..a8aed937f54 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -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 ` +of standalone deployments. + Removal of ``geoHaystack`` Index and the ``geoSearch`` Command ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~