From cd6d833ce496235a3434c741e48c84d0274de30d Mon Sep 17 00:00:00 2001 From: Allison Moore Date: Mon, 8 Dec 2014 10:26:24 -0500 Subject: [PATCH 1/6] WRITING-931: rephrases production cluster arch toc description --- source/includes/toc-sharded-cluster-architectures.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/includes/toc-sharded-cluster-architectures.yaml b/source/includes/toc-sharded-cluster-architectures.yaml index c9eebc04696..ccaf5c23788 100644 --- a/source/includes/toc-sharded-cluster-architectures.yaml +++ b/source/includes/toc-sharded-cluster-architectures.yaml @@ -4,11 +4,11 @@ description: | --- file: /core/sharded-cluster-architectures-production description: | - Sharded cluster for production has component requirements to provide - redundancy and high availability. + Outlines the components required to deploy a redundant and + highly available sharded cluster. --- file: /core/sharded-cluster-architectures-test description: | - Sharded clusters for testing and development can have + Sharded clusters for testing and development can include fewer components. ... From fc010f44faa576af6698beb5a28ef94012626b39 Mon Sep 17 00:00:00 2001 From: Allison Moore Date: Mon, 8 Dec 2014 13:46:23 -0500 Subject: [PATCH 2/6] WRITING-921: adds mention of TTL to indexes intro --- source/core/indexes-introduction.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/core/indexes-introduction.txt b/source/core/indexes-introduction.txt index d3b3888f4e5..81c73fea0a9 100644 --- a/source/core/indexes-introduction.txt +++ b/source/core/indexes-introduction.txt @@ -190,6 +190,17 @@ You can combine the sparse index option with the unique index option to reject documents that have duplicate values for a field but ignore documents that do not have the indexed key. +TTL Indexes +~~~~~~~~~~~ + +:doc:`TTL indexes ` are special indexes that MongoDB +can use to automatically remove documents from a collection after a +certain amount of time. This is ideal for some types of information +like machine generated event data, logs, and session information that +only need to persist in a database for a limited amount of time. + +See: :doc:`/tutorial/expire-data` for implementation instructions. + Index Intersection ------------------ From 4ea9ebd66085ea5597186274024f7b280984eb5b Mon Sep 17 00:00:00 2001 From: Allison Moore Date: Mon, 8 Dec 2014 10:47:49 -0500 Subject: [PATCH 3/6] WRITING-928: fixes example to actually return results --- source/reference/operator/query/all.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/reference/operator/query/all.txt b/source/reference/operator/query/all.txt index a794c6235b6..55d15ce0c6b 100644 --- a/source/reference/operator/query/all.txt +++ b/source/reference/operator/query/all.txt @@ -231,13 +231,13 @@ you may use the :query:`$all` operator to select against a non-array .. code-block:: javascript - db.inventory.find( { qty: { $all: [ 50 ] } } ) + db.inventory.find( { "qty.num": { $all: [ 50 ] } } ) **However**, use the following form to express the same query: .. code-block:: javascript - db.inventory.find( { qty: 50 } ) + db.inventory.find( { "qty.num" : 50 } ) Both queries will select all documents in the ``inventory`` collection where the value of the ``qty`` field equals ``50``. From eac3b12fe3430c4e6a7da459941df234de849296 Mon Sep 17 00:00:00 2001 From: Allison Moore Date: Mon, 8 Dec 2014 13:22:16 -0500 Subject: [PATCH 4/6] WRITING-924: adds link to geo tutorial in seealso --- source/reference/operator/aggregation/group.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/reference/operator/aggregation/group.txt b/source/reference/operator/aggregation/group.txt index 7e1a407b0f3..f6ccf5e080d 100644 --- a/source/reference/operator/aggregation/group.txt +++ b/source/reference/operator/aggregation/group.txt @@ -240,3 +240,7 @@ The operation returns the following documents: { "_id" : 8645, "title" : "Eclogues", "author" : "Dante", "copies" : 2 } ] } + +.. seealso:: The :doc:`/tutorial/aggregation-zip-code-data-set` + tutorial provides an extensive example of the :pipeline:`$group` + operator in a common use case. From 16b9b5f18d625d5b002db9bb43026b60f8545d35 Mon Sep 17 00:00:00 2001 From: Allison Moore Date: Mon, 8 Dec 2014 13:55:06 -0500 Subject: [PATCH 5/6] WRITING-897: clarify what sparse does in unique index tutorial --- source/tutorial/create-a-unique-index.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/tutorial/create-a-unique-index.txt b/source/tutorial/create-a-unique-index.txt index 961efdac259..cca3da326da 100644 --- a/source/tutorial/create-a-unique-index.txt +++ b/source/tutorial/create-a-unique-index.txt @@ -38,10 +38,14 @@ The :ref:`_id index ` is a unique index. In some situations you may consider using the ``_id`` field itself for this kind of data rather than using a unique index on another field. -In many situations you will want to combine the ``unique`` constraint -with the ``sparse`` option. When MongoDB indexes a field, if a -document does not have a value for a field, the index entry for that -item will be ``null``. Since unique indexes cannot have duplicate +When MongoDB indexes a field, if a +document does not have a value for that field, the index entry for that +item will be ``null``. +Thus, in many situations you will want to combine the ``unique`` constraint +with the ``sparse`` option. ``Sparse`` indexes skip over any +document that is missing the indexed field, rather than storing +``null`` for the index entry. Since unique indexes +cannot have duplicate values for a field, without the ``sparse`` option, MongoDB will reject the second document and all subsequent documents without the indexed field. Consider the following prototype. From e8b75d29ea5e81cab276766820622f31f2124729 Mon Sep 17 00:00:00 2001 From: Allison Moore Date: Mon, 8 Dec 2014 14:20:08 -0500 Subject: [PATCH 6/6] edits with Michael's feedback --- source/core/index-ttl.txt | 4 ++-- source/core/indexes-introduction.txt | 4 ++-- source/tutorial/create-a-unique-index.txt | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/core/index-ttl.txt b/source/core/index-ttl.txt index 83d96d1d472..f9f55186eaa 100644 --- a/source/core/index-ttl.txt +++ b/source/core/index-ttl.txt @@ -10,9 +10,9 @@ TTL Indexes TTL indexes are special indexes that MongoDB can use to automatically remove documents from a collection after a certain amount of -time. This is ideal for some types of information like machine +time. This is ideal for certain types of information like machine generated event data, logs, and session information that only need to -persist in a database for a limited amount of time. +persist in a database for a finite amount of time. Considerations -------------- diff --git a/source/core/indexes-introduction.txt b/source/core/indexes-introduction.txt index 81c73fea0a9..f5c957e4c56 100644 --- a/source/core/indexes-introduction.txt +++ b/source/core/indexes-introduction.txt @@ -195,9 +195,9 @@ TTL Indexes :doc:`TTL indexes ` are special indexes that MongoDB can use to automatically remove documents from a collection after a -certain amount of time. This is ideal for some types of information +certain amount of time. This is ideal for certain types of information like machine generated event data, logs, and session information that -only need to persist in a database for a limited amount of time. +only need to persist in a database for a finite amount of time. See: :doc:`/tutorial/expire-data` for implementation instructions. diff --git a/source/tutorial/create-a-unique-index.txt b/source/tutorial/create-a-unique-index.txt index cca3da326da..99ab9a2a9a3 100644 --- a/source/tutorial/create-a-unique-index.txt +++ b/source/tutorial/create-a-unique-index.txt @@ -38,9 +38,9 @@ The :ref:`_id index ` is a unique index. In some situations you may consider using the ``_id`` field itself for this kind of data rather than using a unique index on another field. -When MongoDB indexes a field, if a -document does not have a value for that field, the index entry for that -item will be ``null``. +If a +document does not have a value for a field, the index entry for that +item will be ``null`` in any index that includes it. Thus, in many situations you will want to combine the ``unique`` constraint with the ``sparse`` option. ``Sparse`` indexes skip over any document that is missing the indexed field, rather than storing