From 664c7849723d4dce469acf787e9c131e032db18f Mon Sep 17 00:00:00 2001 From: Kev Date: Sat, 24 Mar 2018 08:30:24 -0400 Subject: [PATCH] adding commas to the code-block missing commas on this code block cause insert to fail. --- source/core/index-unique.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/index-unique.txt b/source/core/index-unique.txt index c3a628deefa..774f9c337ca 100644 --- a/source/core/index-unique.txt +++ b/source/core/index-unique.txt @@ -120,8 +120,8 @@ For example, consider a collection with the following documents: .. code-block:: javascript - { _id: 1, a: [ { loc: "A", qty: 5 }, { qty: 10 } ] } - { _id: 2, a: [ { loc: "A" }, { qty: 5 } ] } + { _id: 1, a: [ { loc: "A", qty: 5 }, { qty: 10 } ] }, + { _id: 2, a: [ { loc: "A" }, { qty: 5 } ] }, { _id: 3, a: [ { loc: "A", qty: 10 } ] } Create a unique compound multikey index on ``a.loc`` and ``a.qty``: