Skip to content

Commit 15aac1d

Browse files
author
Ed Costello
committed
Typo and link cleanup, adding two new methods and one operator
Added: db.collection.createIndex.txt but marked as deprecated db.collection.isCapped.txt $natural operator Remaining edits are cleanup of broken links
1 parent eb3d08f commit 15aac1d

16 files changed

+92
-23
lines changed

source/administration/security.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ Network Interface Limitation
112112

113113
You can limit the network exposure with the following configuration options:
114114

115-
- the :setting:`nohttpinterface` setting for :program:`mongod` and
116-
:program:`mongos` instances.
115+
- the :setting:`nohttpinterface <mongod --nohttpinterface>` setting for
116+
:program:`mongod` and :program:`mongos` instances.
117117

118118
Disables the "home" status page, which would run on port ``28017``
119119
by default. The status interface is read-only by default. You may
@@ -170,7 +170,7 @@ You can limit the network exposure with the following configuration options:
170170
:option:`mongos --bind_ip` option on the command line at run time to
171171
limit the network accessibility of a MongoDB program.
172172

173-
.. important::
173+
.. important::
174174

175175
Make sure that your :program:`mongod` and
176176
:program:`mongos` instances are only accessible on trusted
@@ -340,7 +340,7 @@ Be aware of the following capabilities and behaviors of the
340340

341341
- :program:`mongo` will evaluate a ``.mongorc.js`` file before
342342
starting. You can disable this behavior by passing the
343-
:option:`mongo --norc`` option.
343+
:option:`mongo --norc` option.
344344

345345
On Linux and Unix systems, :program:`mongo` reads the
346346
:file:`.mongorc.js` file from :file:`{$HOME}/.mongorc.js`

source/applications/delete.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ following syntax:
3636

3737
.. code-block:: javascript
3838

39-
db.collection.delete( <query>, <justOne> )
39+
db.collection.remove( <query>, <justOne> )
4040

4141
.. admonition:: Corresponding operation in SQL
4242

source/applications/replication.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ on a majority of the set members before returning:
7676
cfg.settings.getLastErrorDefaults = {w: "majority"}
7777
rs.reconfig(cfg)
7878

79-
The :data:`getLastErrorDefaults` setting affects only those
79+
The :data:`settings.getLastErrorDefaults` setting affects only those
8080
:dbcommand:`getLastError` commands that have *no* other arguments.
8181

8282
.. note::

source/core/read-operations.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ index can: support and optimize specific queries, sort operations, and
301301
allow for more efficient storage utilization. For more information
302302
about indexes in MongoDB see: :doc:`/indexes` and :doc:`/core/indexes`.
303303

304-
You can create indexes using the :method:`db.collection.ensureIndex{)` method
304+
You can create indexes using the :method:`db.collection.ensureIndex()` method
305305
in the :program:`mongo` shell, as in the following prototype
306306
operation:
307307

@@ -566,7 +566,7 @@ operations for more basic data aggregation operations:
566566

567567
- :method:`group()`
568568

569-
- :dbcommand:`mapReduce() <mapreduce>` (See also :wiki:`MapReduce`.)
569+
- :dbcommand:`mapReduce() <mapReduce>` (See also :wiki:`MapReduce`.)
570570

571571
.. index:: read operation; architecture
572572
.. _read-operations-architecture:

source/core/write-operations.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ For information on specific methods used to perform write operations in the
3636
- :method:`db.collection.save()`
3737
- :method:`db.collection.findAndModify()`
3838
- :method:`db.collection.remove()`
39-
- :method:`db.collection.delete()`
4039

4140
For information on how to perform write operations from within an
4241
application, see the :doc:`/applications/drivers` documentation or the

source/includes/warning-sharding-hostnames.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
If you use either "localhost" or ``127.0.0.1`` as the hostname
44
portion of any host identifier, for example as the ``host`` argument
5-
to :dbcommand:`addShard` or the value to the :option:`mongos
6-
--configdb` run time option, then you must use "localhost" or
5+
to :dbcommand:`addShard` or the value to the
6+
:option:`--configdb <mongos --configdb>`
7+
run time option, then you must use "localhost" or
78
``127.0.0.1`` for *all* host settings for any MongoDB instances in
89
the cluster. If you mix localhost addresses and remote host address,
9-
MongoDB will error.
10+
MongoDB will error.

source/reference/command/applyOps.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ applyOps (internal)
99
:param array operations: an array of operations to perform.
1010

1111
:param array preCondition: Optional. Defines one or more conditions that the destination must meet
12-
applying the entries from the ``<operations>`` array. ``ns`` to
12+
applying the entries from the ``<operations>`` array.
13+
Use ``ns`` to
1314
specify a :term:`namespace`, ``q`` to specify a :term:`query` and
1415
``res`` to specify the result that the query should match. You may
1516
specify zero, one, or many ``preCondition`` documents.

source/reference/configuration-options.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ Sharding Cluster Options
854854
random from this list.
855855

856856
The ping time used for a set member compared by the
857-
:option:`--localThreshold` setting is a moving average of recent
857+
:option:`--localThreshold <mongos --localThreshold>` setting is a moving average of recent
858858
ping times, calculated, at most, every 10 seconds. As a result, some queries
859859
may reach members above the threshold until the :program:`mongos`
860860
recalculates the average.

source/reference/limits.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ Indexes
7878
index name is the concatenation of the field names and index
7979
directions.
8080

81-
You can explicitly specify a name to :dbcommand:`createIndex` or
82-
the :method:`db.collection.ensureIndex()` helper if the default
83-
index name is too long.
81+
You can explicitly specific a name to the
82+
:method:`~db.collection.ensureIndex()`
83+
helper if the default index name is too long.
8484

8585
.. _limit-sharding-unique-indexes:
8686
.. limit:: Unique Indexes in Sharded Collections
@@ -122,7 +122,7 @@ Operations
122122
.. limit:: Operations Unavailable in Sharded Environments
123123

124124
The :dbcommand:`group` does not work with sharding. Use
125-
:dbcommand:`mapreduce` or :dbcommand:`aggregate` instead.
125+
:dbcommand:`mapReduce` or :dbcommand:`aggregate` instead.
126126

127127
:method:`db.eval()` is incompatible with sharded collections. You may
128128
use :method:`db.eval()` with un-sharded collections in a shard
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
===========================
2+
db.collection.createIndex()
3+
===========================
4+
5+
.. default-domain:: mongodb
6+
7+
.. deprecated::
8+
9+
.. method:: db.collection.createIndex(keys, options)
10+
11+
:param document keys: A :term:`document` that contains
12+
pairs with the name of the field or
13+
fields to index and order of the index. A
14+
``1`` specifies ascending and a ``-1``
15+
specifies descending.
16+
17+
:param document options: A :term:`document` that controls the creation
18+
of the index. This argument is optional.
19+
20+
.. seealso:: :method:`~db.collection.ensureIndex()` and :doc:`/indexes`
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
==========================
2+
db.collection.isCapped()
3+
==========================
4+
5+
.. default-domain:: mongodb
6+
7+
.. method:: db.collection.isCapped()
8+
9+
Returns ``true`` if the collection is a :term:`capped collection`,
10+
otherwise returns ``false``.
11+
12+
.. code-block:: javascript
13+
14+
> db.collection.isCapped()
15+
true
16+
17+
Change ``collection`` to the name of the collection you want to check.
18+
19+
.. seealso:: :doc:`/core/capped-collections`

source/reference/mongod.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Options
5757
the amount of output. This option suppresses:
5858

5959
- output from :term:`database commands <database command>`,
60-
including :dbcommand:`drop`, :dbcommand:`dropIndex`,
60+
including :dbcommand:`drop`, :dbcommand:`dropIndexes`,
6161
:dbcommand:`diagLogging`, :dbcommand:`validate`, and
6262
:dbcommand:`clean`.
6363

source/reference/operator/natural.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
========
2+
$natural
3+
========
4+
5+
.. default-domain:: mongodb
6+
7+
.. operator:: $natural
8+
9+
Use the :operator:`$natural` operator to use :term:`natural order` for
10+
the results of a sort operation. Natural order refers to the
11+
order of documents in the file on disk.
12+
13+
The :operator:`$natural` operator uses the following syntax to return
14+
documents in the order they exist on disk:
15+
16+
.. code-block:: javascript
17+
18+
db.collection.sort( {$natural: 1} )
19+
20+
Use ``-1`` to return documents in the reverse order as they occur on
21+
disk:
22+
23+
.. code-block:: javascript
24+
25+
db.collection.sort( {$natural: -1} )
26+
27+
.. seealso:: :method:`~cursor.sort()`

source/release-notes/2.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ user's home directory. The shell will execute this file after connecting
383383
to the database and before displaying the prompt.
384384

385385
If you would like the shell not to run the ``.mongorc.js`` file
386-
automatically, start the shell with :option:`--norc <mongod --norc>`.
386+
automatically, start the shell with :option:`--norc <mongo --norc>`.
387387

388388
For more information, see :doc:`/reference/mongo`.
389389

source/tutorial/change-oplog-size.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ procedure for every member of the set that may become primary.
6161
mongod --dbpath /srv/mongodb --shutdown
6262

6363
To restart the instance on a different port and in "standalone" mode
64-
(i.e. without :setting:`replSet` or :option:`--replSet <mongod
65-
--replSet>`), use a command that resembles the following:
64+
(i.e. without
65+
:setting:`replSet <mongod replSet>` or
66+
:option:`--replSet <mongod --replSet>`),
67+
use a command that resembles the following:
6668

6769
.. code-block:: sh
6870

source/tutorial/install-mongodb-on-windows.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ Run all of the following commands in :guilabel:`Command Prompt` with
270270
operation. You may also specify :option:`--dbpath <mongod --dbpath>`
271271
on the command line; however, always prefer the configuration file.
272272

273-
If the :setting:`dbpath`` directory does not exist,
273+
If the :setting:`dbpath` directory does not exist,
274274
:program:`mongod.exe` will not be able to start. The default value
275275
for :setting:`dbpath` is ``\data\db``.
276276

0 commit comments

Comments
 (0)