Skip to content

Don't suggest using a collection name with a dot #1740

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
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
8 changes: 4 additions & 4 deletions source/tutorial/expire-data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ If the indexed date field contains a date in the past, MongoDB
considers the document expired.

For example, the following operation creates an index on the
``app.events`` collection's ``expireAt`` field and specifies the
``log_events`` collection's ``expireAt`` field and specifies the
``expireAfterSeconds`` value of ``0``:

.. code-block:: javascript

db.app.events.ensureIndex( { "expireAt": 1 }, { expireAfterSeconds: 0 } )
db.log_events.ensureIndex( { "expireAt": 1 }, { expireAfterSeconds: 0 } )

For each document, set the value of ``expireAt`` to correspond to the
time the document should expire. For instance, the following
Expand All @@ -163,13 +163,13 @@ expire at ``July 22, 2013 14:00:00``.

.. code-block:: javascript

db.app.events.insert( {
db.log_events.insert( {
"expireAt": new Date('July 22, 2013 14:00:00'),
"logEvent": 2,
"logMessage": "Success!"
} )

MongoDB will automatically delete documents from the ``app.events``
MongoDB will automatically delete documents from the ``log_events``
collection when the documents' ``expireAt`` value is older than the
number of seconds specified in ``expireAfterSeconds``, i.e. ``0``
seconds older in this case. As such, the data expires at the specified
Expand Down