@@ -33,12 +33,6 @@ Syntax
3333
3434The command has the following syntax:
3535
36- .. note:: Starting in MongoDB 4.2
37-
38- - .. include:: /includes/collMod-note.rst
39-
40- - .. include:: /includes/extracts/views-restriction-output-to-disk.rst
41-
4236.. code-block:: javascript
4337
4438 db.runCommand(
@@ -171,9 +165,8 @@ Validate Documents
171165
172166.. collflag:: validator
173167
174- ``validator`` allows users to specify :doc:`validation rules
175- or expressions </core/schema-validation>` for a collection.
176- For more information, see :doc:`/core/schema-validation`.
168+ ``validator`` allows users to specify :ref:`validation rules
169+ or expressions <schema-validation-overview>` for a collection.
177170
178171 The ``validator`` option takes a document that specifies the
179172 validation rules or expressions. You can specify the expressions
@@ -226,9 +219,9 @@ Modify Views
226219
227220.. collflag:: viewOn
228221
229- The underlying source collection or view for the :doc :`view
230- </core/ views>`. The view definition is determined by applying the
231- specified :collflag:`pipeline` to this source.
222+ The underlying source collection or :ref :`view
223+ <views-landing-page >`. The view definition is determined by applying
224+ the specified :collflag:`pipeline` to this source.
232225
233226 Required if modifying a view on a MongoDB deployment that is running
234227 with access control.
@@ -288,10 +281,10 @@ Modify Time Series Collections
288281
289282 :ref:`manual-timeseries-automatic-removal`
290283
291- .. collflag:: timeseries- granularity
292-
284+ .. collflag:: granularity
285+
293286 To modify the :ref:`granularity <timeseries-granularity>` of a time
294- series collection, change the ``timeseries.granularity`` value :
287+ series collection, you can increase ``timeseries.granularity`` from a shorter unit of time to a longer one :
295288
296289 .. code-block:: javascript
297290
@@ -300,23 +293,41 @@ Modify Time Series Collections
300293 timeseries: { granularity: "seconds" || "minutes" || "hours" }
301294 })
302295
303- You cannot decrease granularity. For example, if granularity is set
304- to ``minutes``, you can increase it to ``hours``, but you cannot
305- decrease it to ``seconds``.
306-
307- The following table shows the maximum time interval included in one bucket of data when using a given ``granularity`` value:
296+ To update the custom bucketing parameters ``bucketRoundingSeconds``
297+ and ``bucketMaxSpanSeconds`` instead of ``granularity``, include both
298+ custom parameters in the ``collMod`` command and set them to the
299+ same value:
300+
301+ .. code-block:: javascript
308302
309- .. include:: /includes/table-timeseries-granularity-intervals.rst
303+ db.runCommand({
304+ collMod: "weather24h",
305+ timeseries: {
306+ bucketRoundingSeconds: "86400",
307+ bucketMaxSpanSeconds: "86400"
308+ }
309+ })
310+
311+ You cannot decrease the granularity interval or the custom bucketing
312+ values.
310313
311314 .. important::
315+
316+ You cannot downgrade below MongoDB 6.3 if any time series
317+ collections explicitly specify the custom bucketing parameters
318+ ``bucketMaxSpanSeconds`` and ``bucketRoundingSeconds``. If
319+ possible, convert to the corresponding ``granularity``. If you
320+ cannot, you must drop the collection before downgrading.
321+
322+ To convert a collection from custom bucketing to a ``granularity``,
323+ value, both ``bucketMaxSpanSeconds`` and ``bucketRoundingSeconds``
324+ must be less than or equal to the ``granularity`` equivalent:
312325
313- As with all :ref:`system collections
314- <metadata-system-collections>`, do not run any operations on the
315- underlying ``system.buckets`` collection.
326+ .. include:: /includes/table-timeseries-granularity-maxspan-rounding-limits.rst
316327
317328 .. seealso::
318329
319- :ref:`timeseries-granularity`
330+ :ref:`timeseries-granularity`
320331
321332.. _resize-capped-collection:
322333
@@ -403,8 +414,8 @@ To disable change stream pre- and post-images for a collection, set
403414Write Concern
404415~~~~~~~~~~~~~
405416
406- Optional. A document expressing the :doc :`write concern
407- </reference/ write-concern>` of the ``collMod`` command.
417+ Optional. A document expressing the :ref :`write concern
418+ <write-concern>` of the ``collMod`` command.
408419
409420Omit to use the default write concern.
410421
@@ -482,10 +493,10 @@ Hide an Index from the Query Planner
482493
483494 To hide an index, you must have :ref:`featureCompatibilityVersion
484495 <view-fcv>` set to ``4.4`` or greater. However, once hidden, the
485- index remains hidden even with :ref:` featureCompatibilityVersion
486- <view-fcv>` set to ``4.2`` on MongoDB 4.4 binaries.
496+ index remains hidden even with `` featureCompatibilityVersion``
497+ set to ``4.2`` on MongoDB 4.4 binaries.
487498
488- The following example :doc :`hides </core/ index-hidden>` an existing
499+ The following example :ref :`hides <index-type -hidden>` an existing
489500index on the ``orders`` collection. Specifically, the operation hides
490501the index with the specification ``{ shippedDate: 1 }`` from the query
491502planner.
@@ -519,7 +530,7 @@ To hide a text index, you must specify the index by ``name`` and not by
519530
520531.. seealso::
521532
522- - :doc:`/core/ index-hidden`
533+ - :ref:` index-type -hidden`
523534 - :method:`db.collection.hideIndex()`
524535 - :method:`db.collection.unhideIndex()`
525536
0 commit comments