From 82fc85fb70771c091513516d2b9e1d8fec9696b9 Mon Sep 17 00:00:00 2001 From: Rafael Green Date: Sat, 21 Aug 2021 11:40:36 +0300 Subject: [PATCH 1/2] Update multikey-index-bounds.txt bounds for predicate are arrays of arrays --- source/core/multikey-index-bounds.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/core/multikey-index-bounds.txt b/source/core/multikey-index-bounds.txt index 47de5bbfd0f..4b30e6588d9 100644 --- a/source/core/multikey-index-bounds.txt +++ b/source/core/multikey-index-bounds.txt @@ -349,10 +349,10 @@ field ``ratings`` to require that the array contains at least one Taking the predicates separately: -- the bounds for the ``score: { $lte: 5 }`` predicate is ``[ -Infinity, 5 - ]``; +- the bounds for the ``score: { $lte: 5 }`` predicate are ``[ [ -Infinity, 5 + ] ]``; -- the bounds for the ``by: "anon"`` predicate is ``[ "anon", "anon" ]``. +- the bounds for the ``by: "anon"`` predicate are ``[ [ "anon", "anon" ] ]``. MongoDB can compound the two bounds to use the combined bounds of: From e80a37550fa14f9e7932b4aa45d24baf34be2373 Mon Sep 17 00:00:00 2001 From: Rafael Green Date: Sun, 22 Aug 2021 04:30:11 +0300 Subject: [PATCH 2/2] Update index-wildcard.txt products --> employees --- source/core/index-wildcard.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/index-wildcard.txt b/source/core/index-wildcard.txt index 6984b31c9ad..e6214f82329 100644 --- a/source/core/index-wildcard.txt +++ b/source/core/index-wildcard.txt @@ -439,7 +439,7 @@ Consider the following wildcard index on the ``employees`` collection: .. code-block:: javascript - db.products.createIndex( { "$**" : 1 } ) + db.employees.createIndex( { "$**" : 1 } ) The following operation queries for a single field ``lastName`` and projects out all other fields from the @@ -447,7 +447,7 @@ resulting document: .. code-block:: javascript - db.products.find( + db.employees.find( { "lastName" : "Doe" }, { "_id" : 0, "lastName" : 1 } )