Skip to content

Edits for style and grace #923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/about.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ system shell:
About the Documentation Process
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The MongoDB Manual uses `Sphinx <http://sphinx.pocoo.org/>`_, a
The MongoDB Manual uses `Sphinx <http://sphinx-doc.org//>`_, a
sophisticated documentation engine built upon `Python Docutils
<http://docutils.sourceforge.net/>`_. The original `reStructured Text
<http://docutils.sourceforge.net/rst.html>`_ files, as well as all
Expand Down
6 changes: 3 additions & 3 deletions source/administration/production-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ information, specifically:
- :doc:`/tutorial/configure-windows-netsh-firewall`

For Windows users, consider the `Windows Server Technet Article on TCP
Configuration <http://technet.microsoft.com/en-us/library/dd349797.aspx>`_
Configuration <http://technet.microsoft.com/en-us/library/dd349797.aspx>`_
when deploying MongoDB on Windows.

MongoDB on Linux
Expand Down Expand Up @@ -279,7 +279,7 @@ other miscellaneous things such as replica set arbiters.
BSON Document Size Limit
~~~~~~~~~~~~~~~~~~~~~~~~

There is a :limit:`BSON Document Size` -- at the time of this writing
There is a :limit:`BSON Document Size` limit -- at the time of this writing
16MB per document. If you have large objects, use :doc:`GridFS
</core/gridfs/>` instead.

Expand Down Expand Up @@ -448,7 +448,7 @@ Additional Deployment Considerations
- Check :doc:`ulimits </reference/ulimit>` settings.

- Use SSD if available and economical. Spinning disks can work well
but SSDs capacity for random I/O operations work well with the update
but SSDs' capacity for random I/O operations work well with the update
model of :program:`mongod`. See :ref:`production-nfs` for more info.

- Ensure that clients keep reasonable pool sizes to avoid overloading
Expand Down
9 changes: 5 additions & 4 deletions source/aggregation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ Aggregation

In version 2.2, MongoDB introduced the :doc:`aggregation framework
</core/aggregation>` that provides a powerful and flexible set
of tools to use for many data aggregation tasks. If you're familiar with data aggregation in SQL, consider the
:doc:`/reference/sql-aggregation-comparison` document as an introduction to
some of the basic concepts in the aggregation framework. Consider the
of tools to use for many data aggregation tasks. If you're familiar with
data aggregation in SQL, consider the
:doc:`/reference/sql-aggregation-comparison` document as an introduction
to some of the basic concepts in the aggregation framework. Consider the
full documentation of the aggregation framework and other data
aggregation tools for MongoDB here:
aggregation tools for MongoDB here:

.. toctree::
:titlesonly:
Expand Down
4 changes: 2 additions & 2 deletions source/data-modeling.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Data in MongoDB has a *flexible schema*. :term:`Collections
<collection>` do not enforce :term:`document` structure. Although you
may be able to use different structures for a single data set in
MongoDB, different data models may have significant impacts on MongoDB
and applications performance. Consider :doc:`/core/data-modeling` for
and application performance. Consider :doc:`/core/data-modeling` for
a conceptual overview of data modeling problems in MongoDB, and the
:ref:`data-modeling-patterns` documents for examples of different
approaches to data models.
Expand All @@ -22,7 +22,7 @@ Background

/core/data-modeling

.. _data-modeling-patterns:
.. _data-modeling-patterns:

Data Modeling Patterns
----------------------
Expand Down
8 changes: 4 additions & 4 deletions source/faq/concurrency.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Does a read or write operation ever yield the lock?

.. versionadded:: 2.0

A read and write operations will yield their locks if the
Read and write operations will yield their locks if the
:program:`mongod` receives a :term:`page fault` *or* fetches data that
is unlikely to be in memory. Yielding allows other operations that
only need to access documents that are already in memory to complete
Expand Down Expand Up @@ -131,7 +131,7 @@ of a :term:`replica set`, take the :program:`mongod` offline and let
other members of the set service load while maintenance is in progress.

The following administrative operations require an exclusive
(i.e. write) lock to a the database for extended periods:
(i.e. write) lock on the database for extended periods:

- :method:`db.collection.ensureIndex()`, when issued
*without* setting ``background`` to ``true``,
Expand Down Expand Up @@ -214,12 +214,12 @@ allow reads while applying the write operations, and apply write
operations in the order that they appear in the oplog.

MongoDB can apply several writes in parallel on replica set
secondaries, in a two phases:
secondaries, in two phases:

1. During the first *prefer* phase, under a read lock, the
:program:`mongod` ensures that all documents affected by the
operations are in memory. During this phase, other clients may
execute queries against this number.
execute queries against this member.

2. A thread pool using write locks applies all write operations in the
batch as part of a coordinated write phase.
Expand Down
31 changes: 16 additions & 15 deletions source/faq/developers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ single set of data files.

For an example ``acme.users`` namespace, ``acme`` is the database
name and ``users`` is the collection name. Period characters **can**
occur in collection names, so that the ``acme.user.history`` is a
valid namespace, with the ``acme`` database name, and the
``user.history`` collection name.
occur in collection names, so that ``acme.user.history`` is a
valid namespace, with ``acme`` as the database name, and
``user.history`` as the collection name.

While data models like this appear to support nested collections, the
collection namespace is flat, and there is no difference from the
Expand All @@ -54,7 +54,7 @@ duplicate the entire collection:
.. note::

Because this process decodes :term:`BSON` documents to :term:`JSON`
during the copy procedure, documents you may incur a loss of
during the copy procedure, documents may incur a loss of
type-fidelity.

Consider using :program:`mongodump` and :program:`mongorestore` to
Expand All @@ -68,8 +68,8 @@ If you remove a document, does MongoDB remove it from disk?

Yes.

When you use :method:`db.collection.remove()`, the object will no longer exist in
MongoDB's on-disk data storage.
When you use :method:`db.collection.remove()`, the object will no longer
exist in MongoDB's on-disk data storage.

When does MongoDB write updates to disk?
----------------------------------------
Expand Down Expand Up @@ -119,7 +119,7 @@ framework </core/aggregation>`," with the
:dbcommand:`aggregate` command.

MongoDB also supports :term:`map-reduce` with the
:dbcommand:`mapReduce`, as well as basic aggregation with the
:dbcommand:`mapReduce` command, as well as basic aggregation with the
:dbcommand:`group`, :dbcommand:`count`, and
:dbcommand:`distinct`. commands.

Expand Down Expand Up @@ -155,7 +155,7 @@ Why are MongoDB's data files so large?

MongoDB aggressively preallocates data files to reserve space and
avoid file system fragmentation. You can use the :setting:`smallfiles`
flag to modify the file preallocation strategy.
setting to modify the file preallocation strategy.

.. seealso:: :ref:`faq-disk-size`

Expand Down Expand Up @@ -188,7 +188,7 @@ storage utilization for these collections:
You can store any value in the ``_id`` field, but because this value
serves as a primary key for documents in the collection, it must
uniquely identify them. If the field's value is not unique, then it
cannot serve as a primary key as there would be collisions in
cannot serve as a primary key as there would be collisions in the
collection.

- Use shorter field names.
Expand Down Expand Up @@ -271,8 +271,9 @@ How does MongoDB address SQL or Query injection?
BSON
~~~~

As a client program assembles a query in MongoDB, it builds a BSON object, not a string. Thus
traditional SQL injection attacks are not a problem. More details and some nuances are covered below.
As a client program assembles a query in MongoDB, it builds a BSON
object, not a string. Thus traditional SQL injection attacks are not a
problem. More details and some nuances are covered below.

MongoDB represents queries as :term:`BSON` objects. Typically
:doc:`client libraries </applications/drivers>` provide a convenient,
Expand All @@ -298,7 +299,7 @@ JavaScript
.. include:: /includes/fact-disable-javascript-with-noscript.rst

All of the following MongoDB operations permit you to run arbitrary JavaScript
expressions directly on the server:- :operator:`$where`:
expressions directly on the server:

- :operator:`$where`
- :method:`db.eval()`
Expand Down Expand Up @@ -337,7 +338,7 @@ JavaScript code to the :operator:`$where` field.
Dollar Sign Operator Escaping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Field names in MongoDB's query language have a semantic. The
Field names in MongoDB's query language have semantic meaning. The
dollar sign (i.e ``$``) is a reserved character used to represent
:doc:`operators </reference/operators>` (i.e. :operator:`$inc`.) Thus,
you should ensure that your application's users cannot inject operators
Expand Down Expand Up @@ -553,8 +554,8 @@ driver <>`.

db.getCollection("_foo").insert( { a : 1 } )

To perform a query, use the :method:`find() <db.collection.find()>`
find method, in as the following:
To perform a query, use the :method:`~db.collection.find()`
method, in as the following:

.. code-block:: javascript

Expand Down
2 changes: 1 addition & 1 deletion source/faq/diagnostics.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Do I need to configure swap space?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Always configure systems to have swap space. Without swap, your system
may not be reliant in some situations with extreme memory constrains,
may not be reliant in some situations with extreme memory constraints,
memory leaks, or multiple programs using the same memory. Think of
the swap space as something like a steam release valve that allows the
system to release extra pressure without affecting the overall
Expand Down
15 changes: 8 additions & 7 deletions source/faq/fundamentals.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ of the documents in the collection. You can change the structure of
documents simply by adding new fields or deleting existing ones.
Documents in a collection need not have an identical set of fields.

In practice, it is common for a the documents in a collection to have
In practice, it is common for the documents in a collection to have
a largely homogeneous structure; however, this is not a
requirement. MongoDB's flexible schemas mean that schema migration and
augmentation are very easy in practice, and you will rarely, if ever,
Expand All @@ -73,13 +73,13 @@ MongoDB.

.. see:: :doc:`/reference/sql-comparison`

What languages can I use to work with the MongoDB?
--------------------------------------------------
What languages can I use to work with MongoDB?
----------------------------------------------

MongoDB :term:`client drivers <driver>` exist for
all of the most popular programming languages, and many
of the less popular ones. See the `latest list of
drivers <http://www.mongodb.org/display/DOCS/Drivers>`_
other ones. See the :ecosystem:`latest list of
drivers <drivers>`_
for details.

.. seealso:: ":doc:`/applications/drivers`."
Expand Down Expand Up @@ -125,7 +125,7 @@ writes with a write concern of ``{j: true}`` to ensure that the
writes block until the journal has synced to disk.

Users have built successful e-commerce systems using MongoDB,
but application requiring multi-object commit with rollback
but applications requiring multi-object commits with rollback
generally aren't feasible.

Does MongoDB require a lot of RAM?
Expand Down Expand Up @@ -211,7 +211,8 @@ drivers use C extensions for better performance.
What are the limitations of 32-bit versions of MongoDB?
-------------------------------------------------------

MongoDB uses :ref:`memory-mapped files <faq-storage-memory-mapped-files>`. When running a 32-bit build of
MongoDB uses :ref:`memory-mapped files <faq-storage-memory-mapped-files>`.
When running a 32-bit build of
MongoDB, the total storage size for the server, including data and
indexes, is 2 gigabytes. For this reason, do not deploy MongoDB to
production on 32-bit machines.
Expand Down
44 changes: 22 additions & 22 deletions source/faq/mongo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ How can I enter multi-line operations in the ``mongo`` shell?

If you end a line with an open parenthesis (``'('``), an open brace
(``'{'``), or an open bracket (``'['``), then the subsequent lines start
with ellipsis (``"..."``) until the you enter the corresponding closing
with ellipsis (``"..."``) until you enter the corresponding closing
parenthesis (``')'``), the closing brace (``'}'``) or the closing
bracket (``']'``). The :program:`mongo` shell waits for the closing
parenthesis, closing brace, or the closing bracket before evaluating
Expand All @@ -26,22 +26,22 @@ the code, as in the following example:
> if ( x > 0 ) {
... count++;
... print (x);
... }
... }

You can exit the line continuation mode if you enter two blank
lines, as in the following example:

.. code-block:: javascript

> if (x > 0
...
...
>
...
...
>

.. _mongo-shell-getSiblingDB:

How can I access to different databases temporarily?
----------------------------------------------------
How can I access different databases temporarily?
-------------------------------------------------

You can use :method:`db.getSiblingDB()` method to access another
database without switching databases, as in the following example which
Expand Down Expand Up @@ -70,7 +70,7 @@ The :program:`mongo` shell supports keyboard shortcuts. For example,
complete the method name starting with the letter ``'c'``:

.. code-block:: javascript

db.myCollection.c<Tab>

Because there are many collection methods starting with the letter
Expand All @@ -95,28 +95,28 @@ a string, consider the following examples:

.. code-block:: javascript

var host = db.serverStatus().host;
var host = db.serverStatus().host;
var prompt = function() { return db+"@"+host+"> "; }

The :program:`mongo` shell prompt should now reflect the new prompt:

.. code-block:: none

[email protected]>
[email protected]>

- Set the shell prompt to display the database statistics:

.. code-block:: javascript

var prompt = function() {
return "Uptime:"+db.serverStatus().uptime+" Documents:"+db.stats().objects+" > ";
var prompt = function() {
return "Uptime:"+db.serverStatus().uptime+" Documents:"+db.stats().objects+" > ";
}

The :program:`mongo` shell prompt should now reflect the new prompt:

.. code-block:: none

Uptime:1052 Documents:25024787 >
Uptime:1052 Documents:25024787 >

You can add the logic for the prompt in the :ref:`.mongorc.js
<mongo-mongorc-file>` file to set the prompt each time you start up the
Expand All @@ -135,8 +135,8 @@ edit with the specified editor by typing ``edit <variable>`` or ``edit

#. Set the :envvar:`EDITOR` variable from the command line prompt:

.. code-block:: javascript
.. code-block:: sh

EDITOR=vim

#. Start the :program:`mongo` shell:
Expand All @@ -148,28 +148,28 @@ edit with the specified editor by typing ``edit <variable>`` or ``edit
#. Define a function ``myFunction``:

.. code-block:: javascript

function myFunction () { }

#. Edit the function using your editor:

.. code-block:: javascript

edit myFunction

The command should open the ``vim`` edit session. Remember to save
your changes.

#. Type ``myFunction`` to see the function definition:

.. code-block:: javascript

myFunction

The result should be the changes from your saved edit:

.. code-block:: javascript

function myFunction() {
print("This was edited");
}
Loading