Skip to content

Commit da26da0

Browse files
committed
DOC-524 compact document use parameter directives
1 parent 6020e67 commit da26da0

File tree

2 files changed

+26
-17
lines changed

2 files changed

+26
-17
lines changed

source/reference/command/compact.txt

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,20 @@ compact
2323

2424
You may also specify the following options:
2525

26-
.. option:: force: true
26+
:param force:
2727

2828
.. versionchanged:: 2.2 :dbcommand:`compact` blocks activities only
2929
for its database.
3030

31-
To run on the primary node in a :term:`replica set`. Otherwise,
32-
the :dbcommand:`compact` command returns an error when invoked on
33-
a :term:`replica set` primary because the command blocks all
34-
other activity.
31+
The ``force`` specifies whether the :dbcommand:`compact` command
32+
can run on the primary node in a :term:`replica set`. Set to
33+
``true`` to run the :dbcommand:`compact` command on the primary
34+
node in a :term:`replica set`. Otherwise, the
35+
:dbcommand:`compact` command returns an error when invoked on a
36+
:term:`replica set` primary because the command blocks all other
37+
activity.
3538

36-
.. option:: paddingFactor: <factor>
39+
:param paddingFactor:
3740

3841
.. versionadded:: v2.2
3942

@@ -70,19 +73,19 @@ compact
7073

7174
db.runCommand ( { compact: '<collection>', paddingFactor: 1.1 } )
7275

73-
.. option:: paddingBytes: <bytes>
76+
:param paddingBytes:
7477

7578
.. versionadded:: 2.2
7679

77-
To specify a padding as an absolute number of bytes. Specifying
78-
``paddingBytes`` can be useful if your documents start small but
79-
then increase in size significantly. For example,if your
80-
documents are initially 40 bytes long and you grow them by 1KB,
81-
using ``paddingBytes: 1024`` might be reasonable since using
82-
``paddingFactor: 4.0`` would specify a record size of 160 bytes
83-
(``4.0`` times the initial document size), which would only
84-
provide a padding of 120 bytes (i.e. record size of 160 bytes
85-
minus the document size).
80+
The ``paddingBytes`` sets the padding as an absolute number
81+
of bytes. Specifying ``paddingBytes`` can be useful if your
82+
documents start small but then increase in size significantly.
83+
For example,if your documents are initially 40 bytes long and you
84+
grow them by 1KB, using ``paddingBytes: 1024`` might be
85+
reasonable since using ``paddingFactor: 4.0`` would specify a
86+
record size of 160 bytes (``4.0`` times the initial document
87+
size), which would only provide a padding of 120 bytes (i.e.
88+
record size of 160 bytes minus the document size).
8689

8790
With the following command, you can use the ``paddingBytes``
8891
option of the :dbcommand:`compact` command to set the padding

themes/mongodb/static/mongodb-docs.css_t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ div.sphinxsidebar h3 a {
110110
div.sphinxsidebar p {
111111
color: #333333;
112112
margin: 12px 0 5px 12px;
113-
padding: 0 12p;
113+
padding: 0 12px;
114114
}
115115

116116
div.sphinxsidebar form {
@@ -305,6 +305,12 @@ table.docutils td {
305305
padding: 1px 8px 1em 5px;
306306
}
307307

308+
table.docutils.field-list ul.first.last.simple>li {
309+
padding-top: 1em;
310+
}
311+
table.docutils.field-list ul.first.last.simple>li>p {
312+
padding-top: 1em;
313+
}
308314
/* for main page to knock out the bullets & padding for main columns */
309315

310316
div#mongodb ul{

0 commit comments

Comments
 (0)