Skip to content

Commit 4041d73

Browse files
author
Sam Kleinman
committed
DOCS-4677: edits and cleanup
1 parent 6adec1a commit 4041d73

File tree

3 files changed

+31
-15
lines changed

3 files changed

+31
-15
lines changed

source/reference/method/db.collection.stats-options.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ name: scale
88
type: number
99
position: 1
1010
description: |
11-
Identical to the scalar parameter of the same name.
11+
The scale used in the output to display the sizes of items. By
12+
default, output displays sizes in bytes. To display kilobytes rather
13+
than bytes, specify a ``scale`` value of ``1024``.
1214
1315
.. versionadded:: 2.8
16+
1417
---
1518
object:
1619
name: db.collection.stats
@@ -22,11 +25,13 @@ name: indexDetails
2225
type: boolean
2326
position: 2
2427
description: |
25-
Specifies whether to display index details.
28+
When ``true`` :method:`db.collection.stats()`` returns index details
29+
in addition to the collection stats.
2630
2731
Defaults to ``false``.
2832
2933
.. versionadded:: 2.8
34+
3035
---
3136
object:
3237
name: db.collection.stats
@@ -38,10 +43,10 @@ name: indexDetailsField
3843
type: document
3944
position: 3
4045
description: |
41-
Provided that ``indexDetails`` is set to ``true``, allows filtering of
42-
index details by specifying the index ``key``, as returned by
43-
:method:`~db.collection.getIndexes()`. Mutually exclusive with
44-
``indexDetailsName``
46+
If ``indexDetails`` is ``true``, use ``indexDetailsField`` to filter
47+
index details by specifying the index ``key``. Use
48+
:method:`~db.collection.getIndexes()` to discover index keys. You
49+
cannot use ``indexDetailsField`` with ``indexDetailsName``.
4550
4651
.. versionadded:: 2.8
4752
@@ -56,10 +61,10 @@ name: indexDetailsName
5661
type: string
5762
position: 4
5863
description: |
59-
Provided that ``indexDetails`` is set to ``true``, allows filtering of
60-
index details by specifying the index ``name``, as returned by
61-
:method:`~db.collection.getIndexes()`. Mutually exclusive with
62-
``indexDetailsKey``
64+
If ``indexDetails`` is ``true``, use ``indexDetailsName`` to filter
65+
index details by specifying the index ``name``. Use
66+
:method:`~db.collection.getIndexes()` to discover index names. You
67+
cannot use ``indexDetailsName`` with ``indexDetailsField``.
6368
6469
.. versionadded:: 2.8
6570

source/reference/method/db.collection.stats-param.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ description: |
1515
.. versionchanged:: 2.8
1616
Legacy parameter format. Mutually exclusive with ``options`` as a
1717
document.
18+
1819
---
1920
object:
2021
name: db.collection.stats
@@ -31,4 +32,5 @@ description: |
3132
or filtering of index details.
3233
3334
.. versionadded:: 2.8
35+
3436
...

source/reference/method/db.collection.stats.txt

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ db.collection.stats()
77
Definition
88
----------
99

10+
.. db.coll.stats() only takes one argument. (2.8-series change) You
11+
can either specify a number to use as the scale argument to
12+
collStats, or a document specifying a set of options to the
13+
helper. This change is contained in the implementation of the
14+
helper and not in the underlying command.
15+
1016
.. method:: db.collection.stats(scale)
1117
.. method:: db.collection.stats(options)
1218

@@ -41,9 +47,12 @@ the ``order_date`` field, and expressing sizes in kilobytes:
4147

4248
.. code-block:: javascript
4349

44-
db.orders.stats({scale:1024,
45-
indexDetails:true,
46-
indexKey:{order_date:1}})
50+
db.orders.stats( { scale: 1024,
51+
indexDetails: true,
52+
indexKey: { order_date: 1 } } )
53+
54+
Additional Information
55+
----------------------
4756

48-
.. seealso:: :doc:`/reference/command/collStats` for an
49-
overview of the output of this command.
57+
Consider the :doc:`/reference/command/collStats` document for an
58+
overview of the output of :method:`db.collection.stats()`.

0 commit comments

Comments
 (0)