From e3542869f702ed08e242b93e2fd54a97fea4e698 Mon Sep 17 00:00:00 2001 From: evanchooly Date: Mon, 23 Nov 2026 19:03:12 -0500 Subject: [PATCH] Inventory documented examples with the structured extractor The example inventory came from the line-based RST extractor over pages fetch.py copied out of a docs checkout. It read one example per section and matched owners largely by title, so rewritten examples kept stale owners and sections that show several examples lost all but one. GenerateMainKt plan drafts the committed scenario-plan.json from the parsed operator pages, and inventory extracts the planned pages with the structured extractor, keeping the owner matching. discover.sh parses the operator pages instead of running fetch.py, and reports plan drift. The extractor gives a section's inserts to its input/output groups, lets a query inherit the inserts into its collection from an earlier section, and marks reads that follow a write. Sibling examples that share a title get reviewed names; three page errors are excluded with their evidence. Generation adds 27 cases, integrated under both mappers. --- audits/README.md | 5 +- audits/catalog/documented-examples.json | 9741 ++++++++-------- audits/catalog/example-names.json | 523 +- audits/catalog/generation-review.json | 4 + audits/catalog/scenario-plan.json | 9865 +++++++++++++++++ audits/discover.sh | 60 +- .../dev/morphia/audits/coverage/AuditJson.kt | 3 - .../morphia/audits/documents/DocumentsMain.kt | 3 + .../morphia/audits/generate/CaseGenerator.kt | 13 +- .../audits/generate/DocumentedExamples.kt | 427 +- .../morphia/audits/generate/GenerateMain.kt | 34 +- .../morphia/audits/generate/ScenarioPlans.kt | 220 + .../audits/publish/DiscoveryFindings.kt | 47 +- .../audits/scenarios/ScenarioExtraction.kt | 283 +- .../audits/scenarios/SectionPrograms.kt | 75 +- .../audits/offline/DiscoveryFindingsTest.kt | 29 + .../morphia/audits/offline/GeneratorTest.kt | 424 +- .../dev/morphia/audits/offline/ParsedPages.kt | 214 + .../audits/offline/ScenarioExtractionTest.kt | 206 +- .../generated/expressions/TestBitAnd.java | 36 + .../test/generated/expressions/TestBitOr.java | 2 +- .../test/generated/filters/TestAnd.java | 37 + .../test/generated/filters/TestElemMatch.java | 34 + .../test/generated/filters/TestEq.java | 51 + .../test/generated/stages/TestGroup.java | 46 +- .../test/generated/stages/TestProject.java | 34 +- .../generated/updates/TestPositionalAll.java | 9 + .../scenario.json | 84 + .../bitwiseAndWithTwoIntegers/scenario.json | 82 + .../bitwiseOrWithTwoIntegers/scenario.json | 2 +- .../combineConditionsOnOneField/scenario.json | 44 + .../and/matchEitherValueWithIn/scenario.json | 42 + .../scenario.json | 328 + .../matchWhenNoElementIsXyz/scenario.json | 185 + .../eq/matchAQuantityExactly/scenario.json | 236 + .../eq/matchAnArrayExactly/scenario.json | 240 + .../scenario.json | 181 + .../eq/matchOneArrayElement/scenario.json | 334 + .../stages/group/groupByNull/scenario.json | 90 + .../scenario.json | 4 +- .../group/groupDocumentsByYear/scenario.json | 149 + .../group/groupTitlesByYear/scenario.json | 133 + .../scenario.json | 4 +- .../scenario.json | 86 + .../scenario.json | 4 +- .../scenario.json | 93 + .../updateAllDocumentsInAnArray/scenario.json | 333 + .../dev/morphia/test/generated/manifest.json | 200 +- design/operator-audits-design.md | 63 +- design/operator-audits-progress.md | 5 + design/operator-audits-section-assembly.md | 23 +- 51 files changed, 19593 insertions(+), 5777 deletions(-) create mode 100644 audits/catalog/scenario-plan.json create mode 100644 audits/src/main/kotlin/dev/morphia/audits/generate/ScenarioPlans.kt create mode 100644 audits/src/test/kotlin/dev/morphia/audits/offline/ParsedPages.kt create mode 100644 core/src/test/java/dev/morphia/test/generated/expressions/TestBitAnd.java create mode 100644 core/src/test/java/dev/morphia/test/generated/filters/TestAnd.java create mode 100644 core/src/test/java/dev/morphia/test/generated/filters/TestElemMatch.java create mode 100644 core/src/test/java/dev/morphia/test/generated/filters/TestEq.java create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithALongAndInteger/scenario.json create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithTwoIntegers/scenario.json create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/filters/and/combineConditionsOnOneField/scenario.json create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/filters/and/matchEitherValueWithIn/scenario.json create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/filters/elemMatch/matchAnElementWithDotNotation/scenario.json create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/filters/elemMatch/matchWhenNoElementIsXyz/scenario.json create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAQuantityExactly/scenario.json create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAnArrayExactly/scenario.json create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAnEmbeddedFieldWithDotNotation/scenario.json create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchOneArrayElement/scenario.json create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupByNull/scenario.json rename core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/{calculateCountSumAndAverage => groupByYear}/scenario.json (96%) create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupDocumentsByYear/scenario.json create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupTitlesByYear/scenario.json rename core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/{excludeFieldsFromEmbeddedDocuments => excludeAnEmbeddedFieldWithDotNotation}/scenario.json (98%) create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/includeAnEmbeddedFieldWithDotNotation/scenario.json rename core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/{projectNewArrayFields => projectAnArrayOfFields}/scenario.json (94%) create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayWithAMissingField/scenario.json create mode 100644 core/src/test/resources/dev/morphia/test/generated/fixtures/updates/positional-all/updateAllDocumentsInAnArray/scenario.json diff --git a/audits/README.md b/audits/README.md index ada69f78277..e40d59d94cf 100644 --- a/audits/README.md +++ b/audits/README.md @@ -75,6 +75,9 @@ artifact: clone the docs as the workflow does, run `audits/discover.sh `, copy `/documented-examples.json` into `audits/catalog/`, then regenerate (below) and review both changes together. +- **`plan.diff` is not empty**: a page appeared, or its examples section or tabs changed, so the + plan drafted from the parsed pages differs from the committed `scenario-plan.json`. Review the + draft, copy `/scenario-plan.json` into `audits/catalog/`, and rerun `inventory`. - **Integration failed**: a generated case no longer passes. Its log is in the artifact; treat it like a failure under "Generating cases". @@ -87,7 +90,7 @@ git -C /tmp/docs sparse-checkout set --no-cone \ /content/manual/manual/source/includes/ /content/manual/manual/source/core/ \ /content/manual/manual/source/tutorial/ /content/manual/manual/source/images/ \ /content/manual/manual/source/code-examples/ /content/code-examples/tested/ -uv sync --frozen --project audits/parser # the pinned parser, for capability coverage +uv sync --frozen --project audits/parser # the pinned parser, for the inventory and coverage git -C /tmp/docs checkout -q audits/discover.sh /tmp/docs /tmp/discovery --integrate ``` diff --git a/audits/catalog/documented-examples.json b/audits/catalog/documented-examples.json index f266ca0fccb..e8bcecbe692 100644 --- a/audits/catalog/documented-examples.json +++ b/audits/catalog/documented-examples.json @@ -10,13 +10,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "bbf5c44a10e62dc8903402b5aaf9baf1323ef458", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null.yaml" - }, { - "blob" : "8623cf2a56423be1b837696232e1d7f56f12569c", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "abs", "pageBlob" : "fa3943933e8741a90cd27faa8b6a80b5bc716ef4", "source" : { @@ -29,58 +23,67 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "da01d2f436a8958afb1ee4755776e824a7a9246cd7eb5d260b8931a098debb27", - "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.rating\": { $type: \"double\" }\n }\n },\n {\n $group: {\n _id: \"$rated\",\n avgRating: {\n $accumulator: {\n init: function() { // Set the initial state\n return { count: 0, sum: 0 }\n },\n\n accumulate: function(state, rating) { // Define how to update the state\n return {\n count: state.count + 1,\n sum: state.sum + rating\n }\n },\n\n accumulateArgs: [ \"$imdb.rating\" ], // Argument required by the accumulate function\n\n merge: function(state1, state2) { // When the operator performs a merge,\n return { // add the fields from the two states\n count: state1.count + state2.count,\n sum: state1.sum + state2.sum\n }\n },\n\n finalize: function(state) { // After collecting the results from all documents,\n return (state.sum / state.count) // calculate the average\n },\n lang: \"js\"\n }\n }\n }\n },\n { $sort: { _id: 1 } }\n] )" + "sha256" : "8003fa1f5314454e6fbbe7ecdf0d6622f057132430cb9028c016c5de8b8f9396", + "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.rating\": { $type: \"double\" }\n }\n },\n {\n $group: {\n _id: \"$rated\",\n avgRating: {\n $accumulator: {\n init: function() { // Set the initial state\n return { count: 0, sum: 0 }\n },\n\n accumulate: function(state, rating) { // Define how to update the state\n return {\n count: state.count + 1,\n sum: state.sum + rating\n }\n },\n\n accumulateArgs: [ \"$imdb.rating\" ], // Argument required by the accumulate function\n\n merge: function(state1, state2) { // When the operator performs a merge,\n return { // add the fields from the two states\n count: state1.count + state2.count,\n sum: state1.sum + state2.sum\n }\n },\n\n finalize: function(state) { // After collecting the results from all documents,\n return (state.sum / state.count) // calculate the average\n },\n lang: \"js\"\n }\n }\n }\n },\n { $sort: { _id: 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "e100e59e5bb6de262af6899eda794347d6b3abba54a9075352c59b8f45c7a0c7", - "text" : "[\n {\n _id: 'G',\n avgRating: 6.628092243186578\n },\n {\n _id: 'PG',\n avgRating: 6.43525917926564\n },\n {\n _id: 'PG-13',\n avgRating: 6.404911676001717\n },\n {\n _id: 'R',\n avgRating: 6.456657633242984\n }\n]" + "sha256" : "ba13ad8265865828f9b0ec820cd31ca2c3c7e088e859f608285d68be933039d6", + "text" : "[\n {\n _id: 'G',\n avgRating: 6.628092243186578\n },\n {\n _id: 'PG',\n avgRating: 6.43525917926564\n },\n {\n _id: 'PG-13',\n avgRating: 6.404911676001717\n },\n {\n _id: 'R',\n avgRating: 6.456657633242984\n }\n]\n" } ], - "detail" : null, + "detail" : "UNSUPPORTED_AST", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "useAccumulatorToImplementTheAvgOperator", - "title" : "Use ``$accumulator`` to Implement the ``$avg`` Operator" + "title" : "Use $accumulator to Implement the $avg Operator" }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "6906f2eac9117e22ae13a6c33d2026a67b2cad5601715ce7da92d6e929c164fe", - "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.rating\": { $type: \"double\" }\n }\n },\n {\n $sort: { \"imdb.rating\": -1, title: 1 }\n },\n {\n $group: {\n _id: { rated: \"$rated\" },\n movies: {\n $accumulator: {\n init: function(rated, userProfileRated) { // Set the initial state\n return {\n max: rated === userProfileRated ? 3 : 1, // If the group matches the user's rating,\n movies: [] // return 3 movies. Otherwise, return 1.\n }\n },\n\n initArgs: [ \"$rated\", \"PG-13\" ], // Argument to pass to the init function\n\n accumulate: function(state, movieTitle) { // Define how to update the state\n if (state.movies.length < state.max) {\n state.movies.push(movieTitle);\n }\n return state;\n },\n\n accumulateArgs: [ \"$title\" ], // Argument required by the accumulate function\n\n merge: function(state1, state2) {\n return {\n max: state1.max,\n movies: state1.movies.concat(state2.movies).slice(0, state1.max)\n }\n },\n\n finalize: function(state) { // Adjust the state to only return the field we need\n return state.movies\n },\n lang: \"js\"\n }\n }\n }\n },\n { $sort: { \"_id.rated\": 1 } }\n] )" + "sha256" : "3eb25679c8e7719667ee0ef8d09303803f79c65bb26d0c7cdcfa2425263247ce", + "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.rating\": { $type: \"double\" }\n }\n },\n {\n $group: {\n _id: \"$rated\",\n avgRating: { $avg: \"$imdb.rating\" }\n }\n },\n { $sort: { _id: 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "64c6fa6dac2a121713ee235ffa12ad4c9bcedb3458e7a6e1d7f6afe28a1f8d7c", - "text" : "[\n {\n _id: {\n rated: 'G'\n },\n movies: [\n 'Modern Times'\n ]\n },\n {\n _id: {\n rated: 'PG'\n },\n movies: [\n 'Life'\n ]\n },\n {\n _id: {\n rated: 'PG-13'\n },\n movies: [\n 'A Brave Heart: The Lizzie Velasquez Story',\n 'The Dark Knight',\n 'The Lord of the Rings: The Return of the King'\n ]\n },\n {\n _id: {\n rated: 'R'\n },\n movies: [\n 'The Shawshank Redemption'\n ]\n }\n]" + "sha256" : "7e5d6d1df041541e57058d69034ee12be30affe0b8b9dbdcbb542ba3f3ea933c", + "text" : "[\n {\n _id: 'G',\n avgRating: 6.6280922431865825\n },\n {\n _id: 'PG',\n avgRating: 6.435259179265659\n },\n {\n _id: 'PG-13',\n avgRating: 6.404911676001723\n },\n {\n _id: 'R',\n avgRating: 6.456657633242999\n }\n]\n" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", + "stem" : "comparisonWithAvg", + "title" : "Comparison with $avg" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "8a935f5b817bb4b590b0ceb159d7b2f8a482143de231571febfc965ffc8d2d3f", + "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.rating\": { $type: \"double\" }\n }\n },\n {\n $sort: { \"imdb.rating\": -1, title: 1 }\n },\n {\n $group: {\n _id: { rated: \"$rated\" },\n movies: {\n $accumulator: {\n init: function(rated, userProfileRated) { // Set the initial state\n return {\n max: rated === userProfileRated ? 3 : 1, // If the group matches the user's rating,\n movies: [] // return 3 movies. Otherwise, return 1.\n }\n },\n\n initArgs: [ \"$rated\", \"PG-13\" ], // Argument to pass to the init function\n\n accumulate: function(state, movieTitle) { // Define how to update the state\n if (state.movies.length < state.max) {\n state.movies.push(movieTitle);\n }\n return state;\n },\n\n accumulateArgs: [ \"$title\" ], // Argument required by the accumulate function\n\n merge: function(state1, state2) {\n return {\n max: state1.max,\n movies: state1.movies.concat(state2.movies).slice(0, state1.max)\n }\n },\n\n finalize: function(state) { // Adjust the state to only return the field we need\n return state.movies\n },\n lang: \"js\"\n }\n }\n }\n },\n { $sort: { \"_id.rated\": 1 } }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "f057b1301c6a11cbbc9e9559d7e8b5e7b80249f6a3f271735367c800bab660af", + "text" : "[\n {\n _id: {\n rated: 'G'\n },\n movies: [\n 'Modern Times'\n ]\n },\n {\n _id: {\n rated: 'PG'\n },\n movies: [\n 'Life'\n ]\n },\n {\n _id: {\n rated: 'PG-13'\n },\n movies: [\n 'A Brave Heart: The Lizzie Velasquez Story',\n 'The Dark Knight',\n 'The Lord of the Rings: The Return of the King'\n ]\n },\n {\n _id: {\n rated: 'R'\n },\n movies: [\n 'The Shawshank Redemption'\n ]\n }\n]\n" + } ], + "detail" : "UNSUPPORTED_AST", + "owner" : null, + "status" : "UNSUPPORTED", "stem" : "useInitArgsToVaryTheInitialStateByGroup", - "title" : "Use ``initArgs`` to Vary the Initial State by Group" + "title" : "Use initArgs to Vary the Initial State by Group" } ], "includes" : [ { - "blob" : "d8a337e97df48c367aa29183604d96eb1da16b38", - "path" : "content/manual/manual/source/includes/fact-6.0-js-engine-change.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "843b14802a80bda8d7564eb9810d996ac2614ddb", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/accumulator/avg-equivalent-output.sh" }, { - "blob" : "57a8dd686cac4ed35fe0ef53dfa14a34a98b15a4", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/accumulator/implement-avg.snippet.implement-avg.js" + "blob" : "2637b18ef72f75bfed3f2147c4c1071629e23211", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/accumulator/avg-equivalent.snippet.avg-equivalent.js" }, { "blob" : "701beb587b85886890097fad6ff08e87c40f0265", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/accumulator/implement-avg-output.sh" }, { - "blob" : "2637b18ef72f75bfed3f2147c4c1071629e23211", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/accumulator/avg-equivalent.snippet.avg-equivalent.js" + "blob" : "57a8dd686cac4ed35fe0ef53dfa14a34a98b15a4", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/accumulator/implement-avg.snippet.implement-avg.js" }, { - "blob" : "843b14802a80bda8d7564eb9810d996ac2614ddb", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/accumulator/avg-equivalent-output.sh" + "blob" : "224154a03fe8626774b95ea96a4c2f29300a65bc", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/accumulator/vary-initial-state-output.sh" }, { "blob" : "d7ba9f2dd4c803de64a1442747dbb15684188b70", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/accumulator/vary-initial-state.snippet.vary-initial-state.js" - }, { - "blob" : "224154a03fe8626774b95ea96a4c2f29300a65bc", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/accumulator/vary-initial-state-output.sh" } ], "operator" : "accumulator", "pageBlob" : "6b935dec279168d6d8c3fb1dabd55b0c41fc1107", @@ -142,6 +145,17 @@ }, { "context" : "aggregation/expressions", "examples" : [ { + "blocks" : [ { + "role" : "DATA", + "sha256" : "2b934cb463adbadb36e2ce4df791b631d2581b12dfe552ec2d2c16d81f45b5c6", + "text" : "db.sales.insertMany( [\n { _id : 1, \"item\" : \"abc\", \"price\" : 10, \"fee\" : 2, date: ISODate(\"2014-03-01T08:00:00Z\") },\n { _id : 2, \"item\" : \"jkl\", \"price\" : 20, \"fee\" : 1, date: ISODate(\"2014-03-01T09:00:00Z\") },\n { _id : 3, \"item\" : \"xyz\", \"price\" : 5, \"fee\" : 0, date: ISODate(\"2014-03-15T09:00:00Z\") }\n] )" + } ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "performAdditionOnADate", + "title" : "Perform Addition on a Date" + }, { "blocks" : [ ], "detail" : null, "owner" : "aggregation/expressions/add/addNumbers", @@ -150,32 +164,13 @@ "title" : "Add Numbers" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "d69cf5d528127c3ee5c9701fa05305204af7e5411aab91b6dc2771c613e954ca", - "text" : "db.sales.aggregate(\n [\n { $project: { item: 1, billing_date: { $add: [ \"$date\", 3*24*60*60000 ] } } }\n ]\n)" - }, { "role" : "DATA", "sha256" : "2b934cb463adbadb36e2ce4df791b631d2581b12dfe552ec2d2c16d81f45b5c6", "text" : "db.sales.insertMany( [\n { _id : 1, \"item\" : \"abc\", \"price\" : 10, \"fee\" : 2, date: ISODate(\"2014-03-01T08:00:00Z\") },\n { _id : 2, \"item\" : \"jkl\", \"price\" : 20, \"fee\" : 1, date: ISODate(\"2014-03-01T09:00:00Z\") },\n { _id : 3, \"item\" : \"xyz\", \"price\" : 5, \"fee\" : 0, date: ISODate(\"2014-03-15T09:00:00Z\") }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "38b5204711d16a240819942ebaf275d27fa237346309d034979499d27ce22267", - "text" : "{ \"_id\" : 1, \"item\" : \"abc\", \"billing_date\" : ISODate(\"2014-03-04T08:00:00Z\") }\n{ \"_id\" : 2, \"item\" : \"jkl\", \"billing_date\" : ISODate(\"2014-03-04T09:00:00Z\") }\n{ \"_id\" : 3, \"item\" : \"xyz\", \"billing_date\" : ISODate(\"2014-03-18T09:00:00Z\") }" - } ], - "detail" : null, - "owner" : null, - "status" : "UNOWNED", - "stem" : "performAdditionOnADate", - "title" : "Perform Addition on a Date" - }, { - "blocks" : [ { "role" : "ACTION", "sha256" : "4ca07bf523ea7d15a0eea128f4fa9ab83e5c74234b5d9e185cca0844e08683cf", "text" : "db.sales.aggregate(\n [\n { $project: { item: 1, result: { $add: [ 1.5, 1.6, \"$date\", 1.5, 1.5 ] } } }\n ]\n)" - }, { - "role" : "DATA", - "sha256" : "2b934cb463adbadb36e2ce4df791b631d2581b12dfe552ec2d2c16d81f45b5c6", - "text" : "db.sales.insertMany( [\n { _id : 1, \"item\" : \"abc\", \"price\" : 10, \"fee\" : 2, date: ISODate(\"2014-03-01T08:00:00Z\") },\n { _id : 2, \"item\" : \"jkl\", \"price\" : 20, \"fee\" : 1, date: ISODate(\"2014-03-01T09:00:00Z\") },\n { _id : 3, \"item\" : \"xyz\", \"price\" : 5, \"fee\" : 0, date: ISODate(\"2014-03-15T09:00:00Z\") }\n] )" }, { "role" : "EXPECTED", "sha256" : "f2da066e7e448946b32c667a2b785c118ffeaec8f4fa060e8c037db43cd3d947", @@ -187,10 +182,7 @@ "stem" : "addNonIntegerValuesToADate", "title" : "Add Non-Integer Values to a Date" } ], - "includes" : [ { - "blob" : "f7fd73d828d6f219d9b36508700d241d1eca6b55", - "path" : "content/manual/manual/source/includes/agg-expression-order-of-return-behavior.rst" - } ], + "includes" : [ ], "operator" : "add", "pageBlob" : "23095b86f2007739485bb075654368533813ca11", "source" : { @@ -203,12 +195,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "2d9e3bbe1326348b788e7dcef099935f6dbb443e699f9709bef7d21152397e66", - "text" : "db.movies.aggregate( [\n {\n $unwind: \"$directors\"\n },\n {\n $unwind: \"$genres\"\n },\n {\n $group: {\n _id: \"$directors\",\n genres: { $addToSet: \"$genres\" }\n }\n },\n {\n $sort: { _id: 1 }\n },\n {\n $limit: 5\n }\n] )" + "sha256" : "53bb87e0636c400287f1545fc1dae534098282224a350345c81b33016d785919", + "text" : "db.movies.aggregate( [\n {\n $unwind: \"$directors\"\n },\n {\n $unwind: \"$genres\"\n },\n {\n $group: {\n _id: \"$directors\",\n genres: { $addToSet: \"$genres\" }\n }\n },\n {\n $sort: { _id: 1 }\n },\n {\n $limit: 5\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "e70a5f27d182fb59b190293dc0c4a82563d5737c2a7cfd99759536232ac92cf3", - "text" : "[\n { _id: 'A. Dean Bell', genres: [ 'Crime', 'Drama' ] },\n { _id: 'A. Karunakaran', genres: [ 'Romance' ] },\n { _id: 'A. Vanichkin', genres: [ 'Animation', 'Fantasy' ] },\n { _id: 'A.J. Edwards', genres: [ 'Biography', 'Drama', 'History' ] },\n {\n _id: 'A.R. Murugadoss',\n genres: [ 'Drama', 'Sci-Fi', 'Thriller', 'Action', 'Mystery' ]\n }\n]" + "sha256" : "a0764c79f08c139734e09c6c04a36092f13a8035532ab70186daed80f6e5204a", + "text" : "[\n { _id: 'A. Dean Bell', genres: [ 'Crime', 'Drama' ] },\n { _id: 'A. Karunakaran', genres: [ 'Romance' ] },\n { _id: 'A. Vanichkin', genres: [ 'Animation', 'Fantasy' ] },\n { _id: 'A.J. Edwards', genres: [ 'Biography', 'Drama', 'History' ] },\n {\n _id: 'A.R. Murugadoss',\n genres: [ 'Drama', 'Sci-Fi', 'Thriller', 'Action', 'Mystery' ]\n }\n]\n" } ], "detail" : null, "name" : "Collect the Genres of Each Director", @@ -218,17 +210,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "186acf372cd10a9eca146a126d8345063e4b574a", - "path" : "content/manual/manual/source/includes/addToSet-behavior.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "9b781e1105ac70827fe540ed193c64ba82193a95", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/addToSet/output.sh" }, { "blob" : "7bbbabf83b8ce42072f34907e540d8cfcb18b97f", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/addToSet/run-pipeline.snippet.addToSet-example.js" - }, { - "blob" : "9b781e1105ac70827fe540ed193c64ba82193a95", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/addToSet/output.sh" } ], "operator" : "addToSet", "pageBlob" : "0ce8087c09957d3d8a7ded7498b8162ce0ab553a", @@ -241,17 +227,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "d854e31b8c480746f81651ea0db98b83585c1c74bbdf058cf20c45dc33a96d1a", - "text" : "db.survey.aggregate(\n [\n { $project: { responses: 1, isAllTrue: { $allElementsTrue: [ \"$responses\" ] }, _id: 0 } }\n ]\n)" - }, { "role" : "DATA", "sha256" : "87b08bb9d401c9590184613334209d9974f467d64eb3e7987bc794fba8903ddc", "text" : "db.survey.insertMany([\n { \"_id\" : 1, \"responses\" : [ true ] },\n { \"_id\" : 2, \"responses\" : [ true, false ] },\n { \"_id\" : 3, \"responses\" : [ ] },\n { \"_id\" : 4, \"responses\" : [ 1, true, \"seven\" ] },\n { \"_id\" : 5, \"responses\" : [ 0 ] },\n { \"_id\" : 6, \"responses\" : [ [ ] ] },\n { \"_id\" : 7, \"responses\" : [ [ 0 ] ] },\n { \"_id\" : 8, \"responses\" : [ [ false ] ] },\n { \"_id\" : 9, \"responses\" : [ null ] },\n { \"_id\" : 10, \"responses\" : [ undefined ] }\n])" }, { - "role" : "EXPECTED", - "sha256" : "88c7046fe5ec3120f3c771099f5b7653ad1de0c32f7b72d7499ea562ff0d2e21", - "text" : "{ \"responses\" : [ true ], \"isAllTrue\" : true }\n{ \"responses\" : [ true, false ], \"isAllTrue\" : false }\n{ \"responses\" : [ ], \"isAllTrue\" : true }\n{ \"responses\" : [ 1, true, \"seven\" ], \"isAllTrue\" : true }\n{ \"responses\" : [ 0 ], \"isAllTrue\" : false }\n{ \"responses\" : [ [ ] ], \"isAllTrue\" : true }\n{ \"responses\" : [ [ 0 ] ], \"isAllTrue\" : true }\n{ \"responses\" : [ [ false ] ], \"isAllTrue\" : true }\n{ \"responses\" : [ null ], \"isAllTrue\" : false }\n{ \"responses\" : [ undefined ], \"isAllTrue\" : false }" + "role" : "ACTION", + "sha256" : "d854e31b8c480746f81651ea0db98b83585c1c74bbdf058cf20c45dc33a96d1a", + "text" : "db.survey.aggregate(\n [\n { $project: { responses: 1, isAllTrue: { $allElementsTrue: [ \"$responses\" ] }, _id: 0 } }\n ]\n)" } ], "detail" : null, "name" : "Check Whether Every Response Is True", @@ -260,19 +242,7 @@ "stem" : "checkWhetherEveryResponseIsTrue", "title" : "main" } ], - "includes" : [ { - "blob" : "3ae8bf736443eaa8cf84e56de8d30b33dd6449bc", - "path" : "content/manual/manual/source/includes/extracts-fact-agg-top-level-expressions.yaml" - }, { - "blob" : "5366b8d724f1705e143d55a10e620d6fe50b37de", - "path" : "content/manual/manual/source/includes/extracts-parent-fact-agg-top-level-expressions.yaml" - }, { - "blob" : "25b363e388e33d29d895431698182c839a02ea59", - "path" : "content/manual/manual/source/includes/extracts-fact-agg-boolean.yaml" - }, { - "blob" : "5111e303e5876308b7aa20736d4fd16bff348057", - "path" : "content/manual/manual/source/includes/extracts-parent-fact-agg-boolean.yaml" - } ], + "includes" : [ ], "operator" : "allElementsTrue", "pageBlob" : "a1c9612d980c60f8278aefffae573410f5a77c7c", "source" : { @@ -290,16 +260,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "25b363e388e33d29d895431698182c839a02ea59", - "path" : "content/manual/manual/source/includes/extracts-fact-agg-boolean.yaml" - }, { - "blob" : "5111e303e5876308b7aa20736d4fd16bff348057", - "path" : "content/manual/manual/source/includes/extracts-parent-fact-agg-boolean.yaml" - }, { - "blob" : "36b8606b42ed0e98425051200767e7f63870dbbf", - "path" : "content/manual/manual/source/includes/and-or-behavior.rst" - } ], + "includes" : [ ], "operator" : "and", "pageBlob" : "0b21d486ddc7344fefd1c618694fe292ad228073", "source" : { @@ -311,13 +272,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "ac564cbc13801311506b58471c649960fe7817f376979a21be3a5d2cee52f9fd", - "text" : "db.survey.aggregate(\n [\n { $project: { responses: 1, isAnyTrue: { $anyElementTrue: [ \"$responses\" ] }, _id: 1 } }\n ]\n)" - }, { "role" : "DATA", "sha256" : "1a279afe2fd247ce2fe369593a868c485639bc4edd8d222f8b38a008ceb4eafa", "text" : "db.survey.insertMany( [\n { _id: 1, responses: [ true ] },\n { _id: 2, responses: [ true, false ] },\n { _id: 3, responses: [ ] },\n { _id: 4, responses: [ 1, true, \"seven\" ] },\n { _id: 5, responses: [ 0 ] },\n { _id: 6, responses: [ [ ] ] },\n { _id: 7, responses: [ [ 0 ] ] },\n { _id: 8, responses: [ [ false ] ] },\n { _id: 9, responses: [ null ] },\n { _id: 10, responses: [ undefined ] }\n] )" + }, { + "role" : "ACTION", + "sha256" : "ac564cbc13801311506b58471c649960fe7817f376979a21be3a5d2cee52f9fd", + "text" : "db.survey.aggregate(\n [\n { $project: { responses: 1, isAnyTrue: { $anyElementTrue: [ \"$responses\" ] }, _id: 1 } }\n ]\n)" }, { "role" : "EXPECTED", "sha256" : "12734c98d461e2e3aa185c657e8326e8fb2ca727c88a59ba5dd85f7fb60a902b", @@ -330,19 +291,7 @@ "stem" : "checkWhetherAnyResponseIsTrue", "title" : "main" } ], - "includes" : [ { - "blob" : "3ae8bf736443eaa8cf84e56de8d30b33dd6449bc", - "path" : "content/manual/manual/source/includes/extracts-fact-agg-top-level-expressions.yaml" - }, { - "blob" : "5366b8d724f1705e143d55a10e620d6fe50b37de", - "path" : "content/manual/manual/source/includes/extracts-parent-fact-agg-top-level-expressions.yaml" - }, { - "blob" : "25b363e388e33d29d895431698182c839a02ea59", - "path" : "content/manual/manual/source/includes/extracts-fact-agg-boolean.yaml" - }, { - "blob" : "5111e303e5876308b7aa20736d4fd16bff348057", - "path" : "content/manual/manual/source/includes/extracts-parent-fact-agg-boolean.yaml" - } ], + "includes" : [ ], "operator" : "anyElementTrue", "pageBlob" : "d039b073f74f7704fbdb356635950ebe11215e6f", "source" : { @@ -360,19 +309,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - } ], + "includes" : [ ], "operator" : "arrayElemAt", "pageBlob" : "76762a3d1ed1063685a6fc1c13e80bdf3c38958c", "source" : { @@ -384,23 +321,20 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/arrayToObject/arrayToObjectExample", "status" : "OWNED", "stem" : null, - "title" : "``$arrayToObject`` Example" + "title" : "$arrayToObject Example" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/arrayToObject/objectToArrayArrayToObjectExample", "status" : "OWNED", "stem" : null, - "title" : "``$objectToArray`` + ``$arrayToObject`` Example" - } ], - "includes" : [ { - "blob" : "b444d27d9a82247bc17d50790add66bacd791f93", - "path" : "content/manual/manual/source/includes/example-objectToArray-arrayToObject.rst" + "title" : "$objectToArray + $arrayToObject Example" } ], + "includes" : [ ], "operator" : "arrayToObject", "pageBlob" : "92f5f21bded033eabf12e732ae19fb1f8c6151b5", "source" : { @@ -543,13 +477,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "ea748347e60c28c9df4d2e086ba529a0e082641a", - "path" : "content/manual/manual/source/includes/expressions/avg/result-type.rst" - }, { - "blob" : "b7653d0bcf198dab52f7ed1aca19a521fc667feb", - "path" : "content/manual/manual/source/includes/expressions/avg/non-numeric-values.rst" - } ], + "includes" : [ ], "operator" : "avg", "pageBlob" : "47bf756cf56e4574a315a4318116d1c58504af71", "source" : { @@ -560,21 +488,14 @@ }, { "context" : "aggregation/expressions", "examples" : [ { - "blocks" : [ ], - "detail" : null, - "owner" : "aggregation/expressions/binarySize/binarySizeExpressionOperator", - "status" : "OWNED", - "stem" : null, - "title" : "main" - }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "3715b2561e0cb5de6815ed9841da5b7e850538ecd991ae45e0679e577d2bf98d", - "text" : "db.images.aggregate([\n // First Stage\n { $project: { name: \"$name\", imageSize: { $binarySize: \"$binary\" } } },\n // Second Stage\n { $sort: { \"imageSize\" : -1 } },\n // Third Stage\n { $limit: 1 }\n])" - }, { "role" : "DATA", "sha256" : "e9865e507dfa07edee05010277556d55f851439c6d180424e0cc3c5872647eed", "text" : "db.images.insertMany([\n { _id: 1, name: \"cat.jpg\", binary: new BinData(0, \"OEJTfmD8twzaj/LPKLIVkA==\")},\n { _id: 2, name: \"big_ben.jpg\", binary: new BinData(0, \"aGVsZmRqYWZqYmxhaGJsYXJnYWZkYXJlcTU1NDE1Z2FmZCBmZGFmZGE=\")},\n { _id: 3, name: \"tea_set.jpg\", binary: new BinData(0, \"MyIRAFVEd2aImaq7zN3u/w==\")},\n { _id: 4, name: \"concert.jpg\", binary: new BinData(0, \"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGludWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=\")},\n { _id: 5, name: \"empty.jpg\", binary: new BinData(0, \"\") }\n])" + }, { + "role" : "ACTION", + "sha256" : "3715b2561e0cb5de6815ed9841da5b7e850538ecd991ae45e0679e577d2bf98d", + "text" : "db.images.aggregate([\n // First Stage\n { $project: { name: \"$name\", imageSize: { $binarySize: \"$binary\" } } },\n // Second Stage\n { $sort: { \"imageSize\" : -1 } },\n // Third Stage\n { $limit: 1 }\n])" }, { "role" : "EXPECTED", "sha256" : "9ca7300c5588a0cb20a904d6c259a4f4217b4f4d4bef45b74cf5597768594c8c", @@ -586,10 +507,7 @@ "stem" : "findLargestBinaryData", "title" : "Find Largest Binary Data" } ], - "includes" : [ { - "blob" : "7eee3e4fc94d66ea02bce51327c26b5b566409d0", - "path" : "content/manual/manual/source/includes/fact-utf8-char-byte-sizes.rst" - } ], + "includes" : [ ], "operator" : "binarySize", "pageBlob" : "7d8e648d4d45fdd03b615e0901157e7101d6a2cb", "source" : { @@ -601,53 +519,36 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "cde4a077ec402f392f039dd0db9c4448673e7d477ae867a53464ffdf227ba996", - "text" : "db.switches.aggregate( [\n { \n $project: { \n result: { \n $bitAnd: [ \"$a\", \"$b\" ]\n }\n }\n }\n])" - }, { "role" : "DATA", "sha256" : "b2a88d93c5c6a57747258e1afb0a59e50d7153194b9683d1440687a755ae7900", "text" : "db.switches.insertMany( [\n { _id: 0, a: Int32(0), b: Int32(127) },\n { _id: 1, a: Int32(2), b: Int32(3) },\n { _id: 2, a: Int32(3), b: Int32(5) }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "ae94462ea945269244ac4786ee65053a9de70c34a3058d2551d40e792c9fb6c2", - "text" : "[\n { _id: 0, result: 0 }\n { _id: 1, result: 2 }\n { _id: 2, result: 1 }\n]" + "role" : "ACTION", + "sha256" : "79f8bdf75b3b4985a980e8aa957f641220e021b5bff7e01ab128e0cf2b675d80", + "text" : "db.switches.aggregate( [\n {\n $project: {\n result: {\n $bitAnd: [ \"$a\", \"$b\" ]\n }\n }\n }\n])" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", "stem" : "bitwiseAndWithTwoIntegers", - "title" : "Bitwise ``AND`` with Two Integers " + "title" : "Bitwise AND with Two Integers" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "1aadffa313a8052ccf34cccc5fc442e15db9580eb0fd3fdb90a60d883f7432fe", - "text" : "db.switches.aggregate( [\n { \n $project: { \n result: { \n $bitAnd: [ \"$a\", Long(\"63\") ]\n }\n }\n }\n])" - }, { "role" : "DATA", "sha256" : "b2a88d93c5c6a57747258e1afb0a59e50d7153194b9683d1440687a755ae7900", "text" : "db.switches.insertMany( [\n { _id: 0, a: Int32(0), b: Int32(127) },\n { _id: 1, a: Int32(2), b: Int32(3) },\n { _id: 2, a: Int32(3), b: Int32(5) }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "dd4f6c27a92b2caf6a7525bb9626602b11d80f5681ee5178b65be76ffe8a1d70", - "text" : "[\n { _id: 0, result: Long(\"0\") }\n { _id: 1, result: Long(\"2\") }\n { _id: 2, result: Long(\"3\") }\n]" + "role" : "ACTION", + "sha256" : "a010bb32a96c1d53c41f2c6a680daf9869bdb10d939049029cb7eafe272af2ba", + "text" : "db.switches.aggregate( [\n {\n $project: {\n result: {\n $bitAnd: [ \"$a\", Long(\"63\") ]\n }\n }\n }\n])" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", "stem" : "bitwiseAndWithALongAndInteger", - "title" : "Bitwise ``AND`` with a Long and Integer " - } ], - "includes" : [ { - "blob" : "7b68cb38494a5453c3f554144ce753e2c567b103", - "path" : "content/manual/manual/source/includes/fact-bitwise-integer-long-results.rst" - }, { - "blob" : "01be6b132c2103c198b13c9eed278cc6e6b80f31", - "path" : "content/manual/manual/source/includes/fact-mongosh-integer-long-constructors.rst" - }, { - "blob" : "46bf74543ddd0fb44bfd819328710fb32821a554", - "path" : "content/manual/manual/source/includes/fact-bitwise-type-error.rst" + "title" : "Bitwise AND with a Long and Integer" } ], + "includes" : [ ], "operator" : "bitAnd", "pageBlob" : "918a0950ee157f6a0a8a92f6df669181c959784d", "source" : { @@ -665,13 +566,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "01be6b132c2103c198b13c9eed278cc6e6b80f31", - "path" : "content/manual/manual/source/includes/fact-mongosh-integer-long-constructors.rst" - }, { - "blob" : "46bf74543ddd0fb44bfd819328710fb32821a554", - "path" : "content/manual/manual/source/includes/fact-bitwise-type-error.rst" - } ], + "includes" : [ ], "operator" : "bitNot", "pageBlob" : "28a0e4bf910213140ef3873f9295cfc2d43f06eb", "source" : { @@ -683,53 +578,44 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "d3ec8d27f4ea50f4c876a00104cb9cd77ff4f1b94de97c2cf2cac9f95c007b7c", - "text" : "db.switches.aggregate( [\n { \n $project: { \n result: { \n $bitOr: [ \"$a\", \"$b\" ]\n }\n }\n }\n])" - }, { "role" : "DATA", "sha256" : "b2a88d93c5c6a57747258e1afb0a59e50d7153194b9683d1440687a755ae7900", "text" : "db.switches.insertMany( [\n { _id: 0, a: Int32(0), b: Int32(127) },\n { _id: 1, a: Int32(2), b: Int32(3) },\n { _id: 2, a: Int32(3), b: Int32(5) }\n] )" + }, { + "role" : "ACTION", + "sha256" : "cc340d6aece2014f57538f5d24676e1cb736f7041aaf4d2317296d5c677f7d45", + "text" : "db.switches.aggregate( [\n {\n $project: {\n result: {\n $bitOr: [ \"$a\", \"$b\" ]\n }\n }\n }\n])" }, { "role" : "EXPECTED", - "sha256" : "63f16b2d5279ff227a3f1cd6ad21905ffdfdcafc28707c36f38df3d553ef1704", - "text" : "[\n { _id: 0, result: 127 },\n { _id: 1, result: 3 },\n { _id: 2, result: 7 }\n]" + "sha256" : "da5e558ae81548ab38fd315fb7748bda6bc529f5909c46dabee7042fe12f9e57", + "text" : " [\n { _id: 0, result: 127 },\n { _id: 1, result: 3 },\n { _id: 2, result: 7 }\n ]" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", "stem" : "bitwiseOrWithTwoIntegers", - "title" : "Bitwise ``OR`` with Two Integers " + "title" : "Bitwise OR with Two Integers" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "3562bc55bfdf8a9d74f6a100315321a7eead79236e79543ef138d8a2915fab16", - "text" : "db.switches.aggregate( [\n { \n $project: { \n result: { \n $bitOr: [ \"$a\", Long(\"63\") ]\n }\n }\n }\n])" - }, { "role" : "DATA", "sha256" : "b2a88d93c5c6a57747258e1afb0a59e50d7153194b9683d1440687a755ae7900", "text" : "db.switches.insertMany( [\n { _id: 0, a: Int32(0), b: Int32(127) },\n { _id: 1, a: Int32(2), b: Int32(3) },\n { _id: 2, a: Int32(3), b: Int32(5) }\n] )" + }, { + "role" : "ACTION", + "sha256" : "9292d2194d0e439beb0eb2b225202ba183c5c1d74f711b27accd8b73301b3d0a", + "text" : "db.switches.aggregate( [\n {\n $project: {\n result: {\n $bitOr: [ \"$a\", Long(\"63\") ]\n }\n }\n }\n])" }, { "role" : "EXPECTED", - "sha256" : "7f781c5dcb9db120b52f2671a70c7570d3a97f2b99b67d3b72116fc9d44f5703", - "text" : "[\n { _id: 0, result: Long(\"0\") },\n { _id: 1, result: Long(\"2\") },\n { _id: 2, result: Long(\"3\") }\n]" + "sha256" : "c13f15c999cd3bcd15284cad2f7ab5bef83221a9d8ad7cff7dcb254cb3f03eb3", + "text" : " [\n { _id: 0, result: Long(\"0\") },\n { _id: 1, result: Long(\"2\") },\n { _id: 2, result: Long(\"3\") }\n ]" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", "stem" : "bitwiseOrWithALongAndInteger", - "title" : "Bitwise ``OR`` with a Long and Integer " - } ], - "includes" : [ { - "blob" : "7b68cb38494a5453c3f554144ce753e2c567b103", - "path" : "content/manual/manual/source/includes/fact-bitwise-integer-long-results.rst" - }, { - "blob" : "01be6b132c2103c198b13c9eed278cc6e6b80f31", - "path" : "content/manual/manual/source/includes/fact-mongosh-integer-long-constructors.rst" - }, { - "blob" : "46bf74543ddd0fb44bfd819328710fb32821a554", - "path" : "content/manual/manual/source/includes/fact-bitwise-type-error.rst" + "title" : "Bitwise OR with a Long and Integer" } ], + "includes" : [ ], "operator" : "bitOr", "pageBlob" : "414da80438ede5f95bd76a9fd0edd3e8c5784aed", "source" : { @@ -747,16 +633,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "7b68cb38494a5453c3f554144ce753e2c567b103", - "path" : "content/manual/manual/source/includes/fact-bitwise-integer-long-results.rst" - }, { - "blob" : "01be6b132c2103c198b13c9eed278cc6e6b80f31", - "path" : "content/manual/manual/source/includes/fact-mongosh-integer-long-constructors.rst" - }, { - "blob" : "46bf74543ddd0fb44bfd819328710fb32821a554", - "path" : "content/manual/manual/source/includes/fact-bitwise-type-error.rst" - } ], + "includes" : [ ], "operator" : "bitXor", "pageBlob" : "2055c786d498a8510c8eb8580a4298df3a902ec4", "source" : { @@ -769,12 +646,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "6be3ed376a49e59978f6e686bf2b554639ee0ea817b6192c9c26b44301b4b691", - "text" : "db.movies.aggregate( [\n {\n $match : { genres: \"Comedy\" }\n },\n {\n $group:\n {\n _id: \"Comedy\",\n lowestRatedMovie:\n {\n $bottom:\n {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1 }\n }\n }\n }\n }\n] )" + "sha256" : "b22941ec5fbf7622d205bd09c1c8090ce7f40dfe0fbba5a9c225298866614fe0", + "text" : "db.movies.aggregate( [\n {\n $match : { genres: \"Comedy\" }\n },\n {\n $group:\n {\n _id: \"Comedy\",\n lowestRatedMovie:\n {\n $bottom:\n {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1 }\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "b95148f964a66cd888544b4af8389c9f66e472a4be4dad16ad999c458ec4b777", - "text" : "[ { _id: 'Comedy', lowestRatedMovie: [ 'Saving Christmas', 1.6 ] } ]" + "sha256" : "f528db814341382f11d1e89e8bfac59e449894caa5bacad6b683fe9f91896f5a", + "text" : "[ { _id: 'Comedy', lowestRatedMovie: [ 'Saving Christmas', 1.6 ] } ]\n" } ], "detail" : null, "owner" : null, @@ -784,12 +661,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "c715d5f55ab10b0f201c2b2d4d46deb96c6ffb9bd8c67e8591fa22e685bb04b6", - "text" : "db.movies.aggregate( [\n {\n $match: {\n \"imdb.rating\": { $exists: true },\n year: { $gte: 2010, $lte: 2012 }\n }\n },\n {\n $group:\n {\n _id: \"$year\",\n lowestRatedMovie:\n {\n $bottom:\n {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1 }\n }\n }\n }\n },\n {\n $sort: { _id: 1 }\n }\n] )" + "sha256" : "ccdc531a4bb8a81f7f02b279325e680cfbc03fa2b02ffea145c8dd21dd492ef6", + "text" : "db.movies.aggregate( [\n {\n $match: {\n \"imdb.rating\": { $exists: true },\n year: { $gte: 2010, $lte: 2012 }\n }\n },\n {\n $group:\n {\n _id: \"$year\",\n lowestRatedMovie:\n {\n $bottom:\n {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1 }\n }\n }\n }\n },\n {\n $sort: { _id: 1 }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "80dd967923a92eba12cdd3ec4f26f205e8fa348d8fc4128fecd91f94a1825ac4", - "text" : "[\n { _id: 2010, lowestRatedMovie: [ 'Khan the Con', 2.5 ] },\n {\n _id: 2011,\n lowestRatedMovie: [ 'Justin Bieber: Never Say Never', 1.6 ]\n },\n { _id: 2012, lowestRatedMovie: [ 'USS Seaviper', 2.5 ] }\n]" + "sha256" : "8f55e333cc3bb915ba0a284850ad69cf1661d27245d3ed29c30232b0efa19903", + "text" : "[\n { _id: 2010, lowestRatedMovie: [ 'Khan the Con', 2.5 ] },\n {\n _id: 2011,\n lowestRatedMovie: [ 'Justin Bieber: Never Say Never', 1.6 ]\n },\n { _id: 2012, lowestRatedMovie: [ 'USS Seaviper', 2.5 ] }\n]\n" } ], "detail" : null, "owner" : null, @@ -798,23 +675,17 @@ "title" : "Find the Bottom Rating Across Multiple Years" } ], "includes" : [ { - "blob" : "0552164ccf463272d6051e17b68a2985224c7233", - "path" : "content/manual/manual/source/includes/accumulators/bottom-definition.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "f48215c8c088652c97641cf137def76b50d4a53a", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottom/find-bottom-rating-genre-output.sh" }, { "blob" : "31b7bd90e234a87583907f478d9c0e899e9d918d", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottom/find-bottom-rating-genre.snippet.find-bottom-rating-genre.js" }, { - "blob" : "f48215c8c088652c97641cf137def76b50d4a53a", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottom/find-bottom-rating-genre-output.sh" + "blob" : "c14d69a6fbc6cb9ae2dcfba0ae3984f65632b11c", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottom/find-bottom-rating-years-output.sh" }, { "blob" : "a066cbbd2bf308f25b65ac7222a95194089fa3ee", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottom/find-bottom-rating-years.snippet.find-bottom-rating-years.js" - }, { - "blob" : "c14d69a6fbc6cb9ae2dcfba0ae3984f65632b11c", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottom/find-bottom-rating-years-output.sh" } ], "operator" : "bottom", "pageBlob" : "09c132aa13207d6184617e20e2867a2505304562", @@ -828,12 +699,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "b92c67322c7207b39398fa7e57d34b174b46aea858b5bbccfee4a18185ae1e83", - "text" : "db.movies.aggregate( [\n {\n $match: {\n genres: \"Short\",\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group: {\n _id: \"Short\",\n lowestRatedMovies: {\n $bottomN: {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1, title: 1 },\n n: 3\n }\n }\n }\n }\n] )" + "sha256" : "7abc416f7b51ecb78c57db9251cfcef09ff9f2640796a7d1622d9184c86cc492", + "text" : "db.movies.aggregate( [\n {\n $match: {\n genres: \"Short\",\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group: {\n _id: \"Short\",\n lowestRatedMovies: {\n $bottomN: {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1, title: 1 },\n n: 3\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "df53ca8011474edaf90b38162d4a34e5648611c2ab040fb1c1d5ac2c5eb68e8c", - "text" : "[\n {\n _id: 'Short',\n lowestRatedMovies: [\n [ 'Andrè and Wally B.', 5.4 ],\n [ 'The Education of Mohammad Hussein', 5.4 ],\n [ 'Enigma', 5.3 ]\n ]\n }\n]" + "sha256" : "be618e6075b64e6a9b4fab72b3312aa66d49c901c085628d676536e8e74998e3", + "text" : "[\n {\n _id: 'Short',\n lowestRatedMovies: [\n [ 'Andrè and Wally B.', 5.4 ],\n [ 'The Education of Mohammad Hussein', 5.4 ],\n [ 'Enigma', 5.3 ]\n ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -843,12 +714,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "44fb1ca5309aa8d6fbbf15b35295b8134bfcdfb9dbe7d9dffa19a324063a73fe", - "text" : "db.movies.aggregate( [\n {\n $unwind: \"$genres\"\n },\n {\n $match: {\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group: {\n _id: \"$genres\",\n lowestRatedMovie: {\n $bottomN: {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1, title: 1 },\n n: 3\n }\n }\n }\n },\n {\n $sort: { _id: 1 }\n },\n {\n $limit: 5\n }\n] )" + "sha256" : "a1a6d823f0f038b6fa5c063df41fdd1f0d5d263c3b5eabc1ad7dd876bc52eaab", + "text" : "db.movies.aggregate( [\n {\n $unwind: \"$genres\"\n },\n {\n $match: {\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group: {\n _id: \"$genres\",\n lowestRatedMovie: {\n $bottomN: {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1, title: 1 },\n n: 3\n }\n }\n }\n },\n {\n $sort: { _id: 1 }\n },\n {\n $limit: 5\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "b45ed39776985f039e68addae34187c0c8f6ff62332eed6394c65cdcb36ab0eb", - "text" : "[\n {\n _id: 'Action',\n lowestRatedMovie: [\n [ 'Starship: Rising', 2.1 ],\n [ 'House of the Dead', 2 ],\n [ 'Krampus: The Christmas Devil', 2 ]\n ]\n },\n {\n _id: 'Adventure',\n lowestRatedMovie: [\n [ 'Battlefield Earth', 2.4 ],\n [ 'Epic Movie', 2.3 ],\n [ 'Son of the Mask', 2.1 ]\n ]\n },\n {\n _id: 'Animation',\n lowestRatedMovie: [\n [ 'The Adventures of Rocky & Bullwinkle', 4.1 ],\n [ 'The King and I', 4 ],\n [ 'Space Chimps 2: Zartog Strikes Back', 2.7 ]\n ]\n },\n {\n _id: 'Biography',\n lowestRatedMovie: [\n [ 'Man in the Mirror: The Michael Jackson Story', 3.5 ],\n [ 'The Gaul', 2.7 ],\n [ 'The Undefeated', 2.3 ]\n ]\n },\n {\n _id: 'Comedy',\n lowestRatedMovie: [\n [ 'Superbabies: Baby Geniuses 2', 1.9 ],\n [ 'The Hottie & the Nottie', 1.9 ],\n [ 'Saving Christmas', 1.6 ]\n ]\n }\n]" + "sha256" : "1d9b58ecb652db3fb785fd3e0e3d5b644fe702444d9f295830535943ffb8314b", + "text" : "[\n {\n _id: 'Action',\n lowestRatedMovie: [\n [ 'Starship: Rising', 2.1 ],\n [ 'House of the Dead', 2 ],\n [ 'Krampus: The Christmas Devil', 2 ]\n ]\n },\n {\n _id: 'Adventure',\n lowestRatedMovie: [\n [ 'Battlefield Earth', 2.4 ],\n [ 'Epic Movie', 2.3 ],\n [ 'Son of the Mask', 2.1 ]\n ]\n },\n {\n _id: 'Animation',\n lowestRatedMovie: [\n [ 'The Adventures of Rocky & Bullwinkle', 4.1 ],\n [ 'The King and I', 4 ],\n [ 'Space Chimps 2: Zartog Strikes Back', 2.7 ]\n ]\n },\n {\n _id: 'Biography',\n lowestRatedMovie: [\n [ 'Man in the Mirror: The Michael Jackson Story', 3.5 ],\n [ 'The Gaul', 2.7 ],\n [ 'The Undefeated', 2.3 ]\n ]\n },\n {\n _id: 'Comedy',\n lowestRatedMovie: [\n [ 'Superbabies: Baby Geniuses 2', 1.9 ],\n [ 'The Hottie & the Nottie', 1.9 ],\n [ 'Saving Christmas', 1.6 ]\n ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -862,8 +733,8 @@ "text" : "db.movies.aggregate([\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group:\n {\n _id: { rated: \"$rated\" },\n movies:\n {\n $bottomN:\n {\n output: { title: \"$title\", rating: \"$imdb.rating\" },\n n: { $cond: { if: { $eq: [ \"$rated\", \"PG\" ] }, then: 3, else: 1 } },\n sortBy: { \"imdb.rating\": -1 }\n }\n }\n }\n },\n {\n $sort: { \"_id.rated\": 1 }\n }\n] )" }, { "role" : "EXPECTED", - "sha256" : "f86f7748afb6c6805ca35450af0b82e1b803cd78ff9c52320f341ea57601ffd9", - "text" : "[\n {\n _id: { rated: 'G' },\n movies: [ { title: 'Justin Bieber: Never Say Never', rating: 1.6 } ]\n },\n {\n _id: { rated: 'PG' },\n movies: [\n { title: 'Superbabies: Baby Geniuses 2', rating: 1.9 },\n { title: \"Justin Bieber's Believe\", rating: 1.6 },\n { title: 'Saving Christmas', rating: 1.6 }\n ]\n },\n {\n _id: { rated: 'PG-13' },\n movies: [ { title: 'The Hottie & the Nottie', rating: 1.9 } ]\n },\n { _id: { rated: 'R' }, movies: [ { title: 'House of the Dead', rating: 2 } ] }\n]" + "sha256" : "3e2e442980cfab59d8207fce0953c6ce426acbff1c49ea6421724a9abee79efb", + "text" : "[\n {\n _id: { rated: 'G' },\n movies: [ { title: 'Justin Bieber: Never Say Never', rating: 1.6 } ]\n },\n {\n _id: { rated: 'PG' },\n movies: [\n { title: 'Superbabies: Baby Geniuses 2', rating: 1.9 },\n { title: \"Justin Bieber's Believe\", rating: 1.6 },\n { title: 'Saving Christmas', rating: 1.6 }\n ]\n },\n {\n _id: { rated: 'PG-13' },\n movies: [ { title: 'The Hottie & the Nottie', rating: 1.9 } ]\n },\n { _id: { rated: 'R' }, movies: [ { title: 'House of the Dead', rating: 2 } ] }\n]\n" } ], "detail" : null, "owner" : null, @@ -872,26 +743,23 @@ "title" : "Set n Dynamically Based on the Group Key" } ], "includes" : [ { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "2e967fd057c8e24eb92359cf351dd63851173e65", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottomN/compute-n-based-on-group-key-output.sh" }, { - "blob" : "a228ca736f5337a76ee32ee077a71e33ed8bebf1", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottomN/find-bottom-three-shorts.js" + "blob" : "5ffe043d8288dc1026b6f88f18e119830e9ceaa9", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottomN/compute-n-based-on-group-key.js" }, { - "blob" : "11d50a4aa0a430584f3db94c02cd2750d7c5fd98", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottomN/find-bottom-three-shorts-output.sh" + "blob" : "3cf7dd38d853ed34c2be886b7efe88069a9e94de", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottomN/find-bottom-per-genre-output.sh" }, { "blob" : "d228923ffa564473b716ef88b081cc796f24b293", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottomN/find-bottom-per-genre.js" }, { - "blob" : "3cf7dd38d853ed34c2be886b7efe88069a9e94de", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottomN/find-bottom-per-genre-output.sh" - }, { - "blob" : "5ffe043d8288dc1026b6f88f18e119830e9ceaa9", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottomN/compute-n-based-on-group-key.js" + "blob" : "11d50a4aa0a430584f3db94c02cd2750d7c5fd98", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottomN/find-bottom-three-shorts-output.sh" }, { - "blob" : "2e967fd057c8e24eb92359cf351dd63851173e65", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottomN/compute-n-based-on-group-key-output.sh" + "blob" : "a228ca736f5337a76ee32ee077a71e33ed8bebf1", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/bottomN/find-bottom-three-shorts.js" } ], "operator" : "bottomN", "pageBlob" : "e889d2a459bf25885175611a49408f65c55394f4", @@ -918,13 +786,13 @@ "title" : "Return Combined Size of All Documents in a Collection" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "1b57e639699cd0f247edcb0c29a8c84ff1618ea157e58df736f66262211dbfb3", - "text" : "db.employees.aggregate([\n // First Stage\n { $project: { name: \"$name\", task_object_size: { $bsonSize: \"$current_task\" } } },\n // Second Stage\n { $sort: { \"task_object_size\" : -1 } },\n // Third Stage\n { $limit: 1 }\n])" - }, { "role" : "DATA", "sha256" : "a4346f4ec97ec3e7ef98a198265d11db5b68845f8a60d66c20e17f1e679afaef", "text" : " db.employees.insertMany([\n {\n \"_id\": 1,\n \"name\": \"Alice\", \"email\": \"alice@company.com\", \"position\": \"Software Developer\",\n \"current_task\": {\n \"project_id\": 1,\n \"project_name\": \"Aggregation Improvements\",\n \"project_duration\": 5,\n \"hours\": 20\n }\n },\n {\n \"_id\": 2,\n \"name\": \"Bob\", \"email\": \"bob@company.com\", \"position\": \"Sales\",\n \"current_task\": {\n \"project_id\": 2,\n \"project_name\": \"Write Blog Posts\",\n \"project_duration\": 2,\n \"hours\": 10,\n \"notes\": \"Progress is slow. Waiting for feedback.\"\n }\n },\n {\n \"_id\": 3,\n \"name\": \"Charlie\", \"email\": \"charlie@company.com\", \"position\": \"HR (On Leave)\",\n \"current_task\": null\n },\n {\n \"_id\": 4,\n \"name\": \"Dianne\", \"email\": \"diane@company.com\", \"position\": \"Web Designer\",\n \"current_task\": {\n \"project_id\": 3,\n \"project_name\": \"Update Home Page\",\n \"notes\": \"Need to scope this project.\"\n }\n }\n]);" + }, { + "role" : "ACTION", + "sha256" : "1b57e639699cd0f247edcb0c29a8c84ff1618ea157e58df736f66262211dbfb3", + "text" : "db.employees.aggregate([\n // First Stage\n { $project: { name: \"$name\", task_object_size: { $bsonSize: \"$current_task\" } } },\n // Second Stage\n { $sort: { \"task_object_size\" : -1 } },\n // Third Stage\n { $limit: 1 }\n])" }, { "role" : "EXPECTED", "sha256" : "1bd9498f1de855f950424fe6363881898c8c57f5d7a99193eef188fdfa05d0db", @@ -954,13 +822,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "bbf5c44a10e62dc8903402b5aaf9baf1323ef458", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null.yaml" - }, { - "blob" : "8623cf2a56423be1b837696232e1d7f56f12569c", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "ceil", "pageBlob" : "0eb1e3a33b0aa37c85bae7b0cde6ce43dde1692c", "source" : { @@ -978,16 +840,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "a65b631cdba796d7101918731b989c384d6d0b6d", - "path" : "content/manual/manual/source/includes/extracts-examples-eval.yaml" - }, { - "blob" : "32c1c5529385658b35c67c3674bd23475ac158f7", - "path" : "content/manual/manual/source/includes/extracts-parent-agg-comparison-expressions.yaml" - }, { - "blob" : "6334ee614bbd303972f29a2de21560f4534d64c9", - "path" : "content/manual/manual/source/includes/examples-create-inventory-2.rst" - } ], + "includes" : [ ], "operator" : "cmp", "pageBlob" : "3c843a259566659074620184eed2194beba21aa4", "source" : { @@ -1006,14 +859,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "229b18c565a0524bcb3687d5661fa8650a3c93a5", - "path" : "content/manual/manual/source/includes/sample-data-usage-singular.rst" + "blob" : "4bacba08d0bbcec66e1f9df415b8b99cd5854456", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/concat/concat-title-rated-output.sh" }, { "blob" : "eb6a290ce030f7dd9408408ceeba02c60ae83593", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/concat/concat-title-rated.snippet.concat-title-rated.js" - }, { - "blob" : "4bacba08d0bbcec66e1f9df415b8b99cd5854456", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/concat/concat-title-rated-output.sh" } ], "operator" : "concat", "pageBlob" : "af151a3a8de4819f16d5adb6e6aee48e5dc974fd", @@ -1033,17 +883,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "c9b8e90aa4d07b9d9d2ec713e882eb5187ca30bf", - "path" : "content/manual/manual/source/includes/fact-agg-accumulator-null-missing-behavior.rst" - }, { - "blob" : "229b18c565a0524bcb3687d5661fa8650a3c93a5", - "path" : "content/manual/manual/source/includes/sample-data-usage-singular.rst" + "blob" : "7a0f5fa80524566adb0a43107fd6f2833c61ac38", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/concatArrays/concatArrays-group-example-output.sh" }, { "blob" : "d0b091b5430b9136f41b6d303e64fd30341de0b4", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/concatArrays/concatArrays-group-example.snippet.group-example.js" - }, { - "blob" : "7a0f5fa80524566adb0a43107fd6f2833c61ac38", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/concatArrays/concatArrays-group-example-output.sh" } ], "operator" : "concatArrays", "pageBlob" : "d81b6241b7998f0a2a2da8fa4bb6c548e37b32e0", @@ -1055,6 +899,21 @@ }, { "context" : "aggregation/expressions", "examples" : [ { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "8fff4fb0364f1f3c8237436072c06206d4f193845c70109dd5b850d4e4f7d0e6", + "text" : "db.movies.aggregate( [\n { $match: { runtime: { $gt: 1000 } } },\n {\n $project:\n {\n title: 1,\n rentalPrice:\n {\n $cond: {\n if: { $gte: [ \"$imdb.rating\", 9 ] },\n then: 5.99,\n else: 3.99\n }\n }\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "0cb275d680055cd3264c2dd43a682739436e7b039054de148968596887249d39", + "text" : "[\n { _id: ..., title: 'Baseball', rentalPrice: 5.99 },\n { _id: ..., title: 'Centennial', rentalPrice: 3.99 }\n]\n" + } ], + "detail" : "SYNTAX", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : null, + "title" : "main" + }, { "blocks" : [ ], "detail" : null, "owner" : "aggregation/expressions/cond/condExpressionOperator", @@ -1063,29 +922,14 @@ "title" : "main" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "e740c265336c6a287cde924505d9c99d3e319cbb", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/cond/object-syntax.snippet.cond-object-syntax.js" + "blob" : "ad850d15132275de3c75dd2e7dc77ba3974ddfd6", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/cond/array-syntax.snippet.cond-array-syntax.js" }, { "blob" : "4dc141dc66eb71b7e3bf866b12b36dc833710498", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/cond/object-syntax-output.sh" }, { - "blob" : "ad850d15132275de3c75dd2e7dc77ba3974ddfd6", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/cond/array-syntax.snippet.cond-array-syntax.js" + "blob" : "e740c265336c6a287cde924505d9c99d3e319cbb", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/cond/object-syntax.snippet.cond-object-syntax.js" } ], "operator" : "cond", "pageBlob" : "2cf88506f960832fe4928735d7eef6f26367955d", @@ -1099,12 +943,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "c7b542952bc7d3c599aa75a2f607020c639051d368d0ac559d6f003a339cc5e1", - "text" : "db.movies.aggregate( [\n { $match: { title: { $in: [\n \"The Godfather\",\n \"Toy Story\",\n \"Metropolis\"\n ] } } },\n { $sort: { title: 1 } },\n {\n $project: {\n _id: 0,\n title: 1,\n imdbId: \"$imdb.id\",\n hexId: { $convert: { input: \"$imdb.id\", to: \"string\", base: 16 } }\n }\n }\n] )" + "sha256" : "b39efcb6aadd0dcc35e8fd0ffa9aba3ebc02d4e43ab576f20cbe36690530a765", + "text" : "db.movies.aggregate( [\n { $match: { title: { $in: [\n \"The Godfather\",\n \"Toy Story\",\n \"Metropolis\"\n ] } } },\n { $sort: { title: 1 } },\n {\n $project: {\n _id: 0,\n title: 1,\n imdbId: \"$imdb.id\",\n hexId: { $convert: { input: \"$imdb.id\", to: \"string\", base: 16 } }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "1704a6ad610aa0391e34ab1bc9a8840f8e02960b5eb922548c6d7d26f225b48b", - "text" : "[\n {\n title: 'Metropolis',\n imdbId: 293416,\n hexId: '47A28'\n },\n {\n title: 'The Godfather',\n imdbId: 68646,\n hexId: '10C26'\n },\n {\n title: 'Toy Story',\n imdbId: 114709,\n hexId: '1C015'\n }\n]" + "sha256" : "d232b94b8954368e689bbaab61a946b2fa4072916b901bab0afa43c304608d39", + "text" : "[\n {\n title: 'Metropolis',\n imdbId: 293416,\n hexId: '47A28'\n },\n {\n title: 'The Godfather',\n imdbId: 68646,\n hexId: '10C26'\n },\n {\n title: 'Toy Story',\n imdbId: 114709,\n hexId: '1C015'\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -1114,12 +958,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "62434cf4d52bb5767732af0937429dda82407c0bdfcb3a7376155733b5832f29", - "text" : "db.movies.aggregate( [\n { $match: { title: { $in: [\n \"The Danish Girl\",\n \"The Godfather\",\n \"Gertie the Dinosaur\"\n ] } } },\n {\n $project: {\n _id: 0,\n title: 1,\n rating: {\n $convert: {\n input: \"$imdb.rating\",\n to: \"double\",\n onError: \"Error\",\n onNull: 0\n }\n },\n metacritic: {\n $convert: {\n input: \"$metacritic\",\n to: \"int\",\n onError: \"Error\",\n onNull: 0\n }\n }\n }\n },\n { $sort: { title: 1 } }\n] )" + "sha256" : "45a23a576f1b37a9a890ab755cec64a55b87692273ce4489235e60f5818c4ede", + "text" : "db.movies.aggregate( [\n { $match: { title: { $in: [\n \"The Danish Girl\",\n \"The Godfather\",\n \"Gertie the Dinosaur\"\n ] } } },\n {\n $project: {\n _id: 0,\n title: 1,\n rating: {\n $convert: {\n input: \"$imdb.rating\",\n to: \"double\",\n onError: \"Error\",\n onNull: 0\n }\n },\n metacritic: {\n $convert: {\n input: \"$metacritic\",\n to: \"int\",\n onError: \"Error\",\n onNull: 0\n }\n }\n }\n },\n { $sort: { title: 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "036c50df929d661823c8668b15fcefe991ed53496447f01b517b0bf03d2bfbc3", - "text" : "[\n {\n title: 'Gertie the Dinosaur',\n rating: 7.3,\n metacritic: 0\n },\n {\n title: 'The Danish Girl',\n rating: 'Error',\n metacritic: 0\n },\n {\n title: 'The Godfather',\n rating: 9.2,\n metacritic: 100\n }\n]" + "sha256" : "617436b782d113a1e086fb53b432d8e82f86cfabbe1ad43e31aff450fa81b142", + "text" : "[\n {\n title: 'Gertie the Dinosaur',\n rating: 7.3,\n metacritic: 0\n },\n {\n title: 'The Danish Girl',\n rating: 'Error',\n metacritic: 0\n },\n {\n title: 'The Godfather',\n rating: 9.2,\n metacritic: 100\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -1128,110 +972,71 @@ "title" : "Type Conversion Example" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" + "blob" : "e146eb28097013e57f6c5d8fd7a58be5143d07da", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/array/convert-array-to-bindata.snippet.convert-array-to-bindata.js" }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" + "blob" : "e767c3f9df3f0d8dc5bf2ead32fe02e8a64dbf6b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/array/load-data.snippet.insert-variants-array.js" }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" + "blob" : "5e3529053ab7bda30c8763e59b9fa4e92e815c1e", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/array/output.sh" }, { - "blob" : "174ffd5587ce566b589ba1d7ec48165c40619ad0", - "path" : "content/manual/manual/source/includes/binData-numeric-input.rst" + "blob" : "ca2594360ddcabde5f6c4e0bebb9bbcc04a22678", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/base-conversion/base-conversion-output.sh" }, { - "blob" : "e7ca56ab189b9f1856585de312fa705aff9596a9", - "path" : "content/manual/manual/source/includes/binary-subtypes.rst" - }, { - "blob" : "38fe1b65359193498fd8bb4c696048f0f5cf2f4d", - "path" : "content/manual/manual/source/includes/convert-subtype.rst" - }, { - "blob" : "46e56a01b3255844a09dfee92bc584b5f4b0cc70", - "path" : "content/manual/manual/source/includes/table-toArray-input-types.rst" - }, { - "blob" : "b633737537009b8fe1d953c489ac32a9e03f1515", - "path" : "content/manual/manual/source/includes/table-toObject-input-types.rst" - }, { - "blob" : "f8ab05af1fbde0294b3e67f09dd98e0c6a52b27b", - "path" : "content/manual/manual/source/includes/aggregation/convert-to-bool-table.rst" - }, { - "blob" : "934d83fed7a52db903577e36417cbfb92269024e", - "path" : "content/manual/manual/source/includes/fact-float-parse-behavior-8.3.rst" - }, { - "blob" : "8d9ac8e294a8050c751e0c54841a1286d10e037f", - "path" : "content/manual/manual/source/includes/convert-string-types.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "75f0be3db8eda5ffc4844341dde3db65a8d262cd", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/long/load-data.snippet.insert-long.js" - }, { - "blob" : "2fe91c7826115e23bad88fb741a917ffc0ca9e56", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/long/convert-long-to-bindata.snippet.convert-long-to-bindata.js" + "blob" : "5a2aaf59a7812a31f7c0f8f7bab2079f63e37183", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/base-conversion/base-conversion.snippet.base-conversion.js" }, { - "blob" : "c8b77ee2d20b17e88b978dcce825ba4c6128bb84", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/long/output.sh" + "blob" : "e53ff857661fea01749d806ed3bd69787e5ad1eb", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/bindata-to-array/variants/convert-bindata-to-array-variants.snippet.convert-bindata-to-array-variants.js" }, { - "blob" : "75f0be3db8eda5ffc4844341dde3db65a8d262cd", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/long-big-endian/load-data.snippet.insert-long-big-endian.js" + "blob" : "72736095896477fa9181955843fa6efd9df6d70c", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/bindata-to-array/variants/load-data.snippet.insert-bindata-variants.js" }, { - "blob" : "720475b9b706b214a7fec6e91737442dd2df3ecc", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/long-big-endian/convert-long-big-endian-to-bindata.snippet.convert-long-big-endian-to-bindata.js" + "blob" : "cc714487319140137d892e9b76a2e907fe78cf6e", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/bindata-to-array/variants/output.sh" }, { - "blob" : "d7c38c9ac9cbfb8d80095d95d99000fdb7dd10fe", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/long-big-endian/output.sh" + "blob" : "95c57c08533081295f33a0f36ad185b6018384c4", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/double/convert-double-to-bindata.snippet.convert-double-to-bindata.js" }, { "blob" : "d1f1cba9cde6660cd21df33900bb51e3abf59aba", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/double/load-data.snippet.insert-double.js" - }, { - "blob" : "95c57c08533081295f33a0f36ad185b6018384c4", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/double/convert-double-to-bindata.snippet.convert-double-to-bindata.js" }, { "blob" : "bb6c4c9af5caddd0030689e00a0c210bef5a0071", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/double/output.sh" - }, { - "blob" : "4343e640e7bb51ba76127ce957c1901d2b6b4f54", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/int/load-data.snippet.insert-int.js" }, { "blob" : "95c57c08533081295f33a0f36ad185b6018384c4", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/int/convert-int-to-bindata.snippet.convert-int-to-bindata.js" + }, { + "blob" : "4343e640e7bb51ba76127ce957c1901d2b6b4f54", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/int/load-data.snippet.insert-int.js" }, { "blob" : "edb861628b38ff9108a70187e3c10482f4bd31c6", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/int/output.sh" }, { - "blob" : "e767c3f9df3f0d8dc5bf2ead32fe02e8a64dbf6b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/array/load-data.snippet.insert-variants-array.js" - }, { - "blob" : "e146eb28097013e57f6c5d8fd7a58be5143d07da", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/array/convert-array-to-bindata.snippet.convert-array-to-bindata.js" + "blob" : "720475b9b706b214a7fec6e91737442dd2df3ecc", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/long-big-endian/convert-long-big-endian-to-bindata.snippet.convert-long-big-endian-to-bindata.js" }, { - "blob" : "5e3529053ab7bda30c8763e59b9fa4e92e815c1e", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/array/output.sh" + "blob" : "75f0be3db8eda5ffc4844341dde3db65a8d262cd", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/long-big-endian/load-data.snippet.insert-long-big-endian.js" }, { - "blob" : "72736095896477fa9181955843fa6efd9df6d70c", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/bindata-to-array/variants/load-data.snippet.insert-bindata-variants.js" + "blob" : "d7c38c9ac9cbfb8d80095d95d99000fdb7dd10fe", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/long-big-endian/output.sh" }, { - "blob" : "e53ff857661fea01749d806ed3bd69787e5ad1eb", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/bindata-to-array/variants/convert-bindata-to-array-variants.snippet.convert-bindata-to-array-variants.js" + "blob" : "2fe91c7826115e23bad88fb741a917ffc0ca9e56", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/long/convert-long-to-bindata.snippet.convert-long-to-bindata.js" }, { - "blob" : "cc714487319140137d892e9b76a2e907fe78cf6e", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/bindata-to-array/variants/output.sh" + "blob" : "75f0be3db8eda5ffc4844341dde3db65a8d262cd", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/long/load-data.snippet.insert-long.js" }, { - "blob" : "5a2aaf59a7812a31f7c0f8f7bab2079f63e37183", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/base-conversion/base-conversion.snippet.base-conversion.js" + "blob" : "c8b77ee2d20b17e88b978dcce825ba4c6128bb84", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/long/output.sh" }, { - "blob" : "ca2594360ddcabde5f6c4e0bebb9bbcc04a22678", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/base-conversion/base-conversion-output.sh" + "blob" : "87c5c92b33bd718d86f52ea819ba198d48b17715", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/type-conversion/type-conversion-output.sh" }, { "blob" : "89d593bca14341851105d76de56ce78322783d19", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/type-conversion/type-conversion.snippet.type-conversion.js" - }, { - "blob" : "87c5c92b33bd718d86f52ea819ba198d48b17715", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/type-conversion/type-conversion-output.sh" } ], "operator" : "convert", "pageBlob" : "7519c400c6b5aa504d7de45c3e5d9f76e926df45", @@ -1295,12 +1100,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "547ca4198a6a6587a9e3c721552fe0d3729d947cf48f022949322edc9b50e709", - "text" : "db.movies.aggregate( [\n { $unwind: \"$genres\" },\n { $match: { genres: { $in: [ \"Drama\", \"Short\" ] } } },\n {\n $group: {\n _id: \"$genres\",\n countNumberOfMoviesForGenre: {\n $count: {}\n }\n }\n },\n { $sort: { _id: 1 } }\n] )" + "sha256" : "1a94a92286a9b4a4439f4ba6dd23a6f7ac0cf8489d6955256b37fc17d8649645", + "text" : "db.movies.aggregate( [\n { $unwind: \"$genres\" },\n { $match: { genres: { $in: [ \"Drama\", \"Short\" ] } } },\n {\n $group: {\n _id: \"$genres\",\n countNumberOfMoviesForGenre: {\n $count: {}\n }\n }\n },\n { $sort: { _id: 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "c4a04a9725ecfb87d106222fb38ea92725ceaeb2dd7c7c3e28577f3d8ebbb614", - "text" : "[\n { _id: 'Drama', countNumberOfMoviesForGenre: 12385 },\n { _id: 'Short', countNumberOfMoviesForGenre: 442 }\n]" + "sha256" : "ee64e60e139f2657773ca1ad030724af21fb674bbd65d9c62ad7721087deee36", + "text" : "[\n { _id: 'Drama', countNumberOfMoviesForGenre: 12385 },\n { _id: 'Short', countNumberOfMoviesForGenre: 442 }\n]\n" } ], "detail" : null, "name" : "Count the Movies in Each Genre", @@ -1310,14 +1115,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "c78660a838290c3ddff54c0d7e924b7044bec5e8", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/count/count-movies-by-genre-output.sh" }, { "blob" : "83e52d37288012ba66e4d45928071f7e76bd1939", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/count/count-movies-by-genre.js" - }, { - "blob" : "c78660a838290c3ddff54c0d7e924b7044bec5e8", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/count/count-movies-by-genre-output.sh" } ], "operator" : "count-accumulator", "pageBlob" : "9fdd885a07aacfb161e54f531d726ab6a7271938", @@ -1337,15 +1139,6 @@ "title" : "main" } ], "includes" : [ { - "blob" : "7b9375e0bbd83bd1b7617e43f5ae375940208829", - "path" : "content/manual/manual/source/includes/covariance-behavior.rst" - }, { - "blob" : "340aee2ee6bcc83023c5de38fc0ce8a034386755", - "path" : "content/manual/manual/source/includes/setWindowFields-example-collection.rst" - }, { - "blob" : "13694f7d606928cb63fd6b471d29c52c8a6e7f40", - "path" : "content/manual/manual/source/includes/setWindowFields-partition-sort-date.rst" - }, { "blob" : "29a47bc3cb38c8d957f7ef25d9d7a450e3ba2a16", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cake-sales-insert.snippet.cake-sales-insert.js" } ], @@ -1367,15 +1160,6 @@ "title" : "main" } ], "includes" : [ { - "blob" : "7b9375e0bbd83bd1b7617e43f5ae375940208829", - "path" : "content/manual/manual/source/includes/covariance-behavior.rst" - }, { - "blob" : "340aee2ee6bcc83023c5de38fc0ce8a034386755", - "path" : "content/manual/manual/source/includes/setWindowFields-example-collection.rst" - }, { - "blob" : "13694f7d606928cb63fd6b471d29c52c8a6e7f40", - "path" : "content/manual/manual/source/includes/setWindowFields-partition-sort-date.rst" - }, { "blob" : "29a47bc3cb38c8d957f7ef25d9d7a450e3ba2a16", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cake-sales-insert.snippet.cake-sales-insert.js" } ], @@ -1393,14 +1177,6 @@ "role" : "ACTION", "sha256" : "e6910b9fae3e77fab31c30e1b834ea858ff0a4cf66fca56c933865f054b06ec7", "text" : "db.movies.aggregate( [\n {\n $graphLookup: {\n from: \"moviesViewWithId\",\n startWith: \"$cast\",\n connectFromField: \"cast\",\n connectToField: \"cast\",\n as: \"relatedMovies\"\n }\n }\n] )" - }, { - "role" : "DATA", - "sha256" : "3dbdbaeafa46b5764786669cba8422336e2cc3fa991eaf33d3d84d70d400abeb", - "text" : "db.createView(\n \"moviesView\",\n \"movies\",\n [\n { $project: { _id: 0, title: 1, cast: 1 } }\n ]\n)" - }, { - "role" : "DATA", - "sha256" : "45bf6b66b42668538fd1b403e9d2c0857a377f7881af8bcb211674842e28487c", - "text" : "db.createView(\n \"moviesViewWithId\",\n \"moviesView\",\n [\n {\n $project: {\n _id: { $createObjectId: {} }, // unique id\n title: 1,\n cast: 1\n }\n }\n ]\n)" } ], "detail" : null, "owner" : null, @@ -1408,10 +1184,7 @@ "stem" : "generateIdentifiersInAView", "title" : "Generate identifiers in a view" } ], - "includes" : [ { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - } ], + "includes" : [ ], "operator" : "createObjectId", "pageBlob" : "c5c5fbe97655ba96b12f57efc3261908c2d02056", "source" : { @@ -1430,32 +1203,32 @@ "title" : "Add a Future Date" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "fb2561241190d8177fa344bf2b483a2f1e2a0b71951167d12518fa0d54c38e4e", - "text" : "db.shipping.updateOne(\n { custId: 456 },\n { $set: { deliveryDate: ISODate( \"2021-01-10\" ) } }\n)\n\ndb.shipping.updateOne(\n { custId: 457 },\n { $set: { deliveryDate: ISODate( \"2021-03-01\" ) } }\n)\n\ndb.shipping.updateOne(\n { custId: 458 },\n { $set: { deliveryDate: ISODate( \"2021-03-02\" ) } }\n)" - }, { "role" : "DATA", "sha256" : "c2237dd846b4303d802fe4c40b39bdb16753cb9e2abf6f9dc34f6197b5372df3", "text" : "db.shipping.insertMany(\n [\n { custId: 456, purchaseDate: ISODate(\"2020-12-31\") },\n { custId: 457, purchaseDate: ISODate(\"2021-02-28\") },\n { custId: 458, purchaseDate: ISODate(\"2021-02-26\") }\n ]\n)" + }, { + "role" : "ACTION", + "sha256" : "13d158e99271254dab714cd6fa0b7ab90584ff2db4684ac2f0b08b0d8185783f", + "text" : "db.shipping.aggregate(\n [\n {\n $match:\n {\n $expr:\n {\n $gt:\n [ \"$deliveryDate\",\n {\n $dateAdd:\n {\n startDate: \"$purchaseDate\",\n unit: \"day\",\n amount: 5\n }\n }\n ]\n }\n }\n },\n {\n $project:\n {\n _id: 0,\n custId: 1,\n purchased:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d\",\n date: \"$purchaseDate\"\n }\n },\n delivery:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d\",\n date: \"$deliveryDate\"\n }\n }\n }\n }\n ]\n)" }, { "role" : "EXPECTED", "sha256" : "f266724a8b3a3cb38297839772f3f6441aacd9d058a5b4be06ddea9a86c77d72", "text" : "{ \"custId\" : 456, \"purchased\" : \"2020-12-31\", \"delivery\" : \"2021-01-10\" }" } ], - "detail" : null, + "detail" : "AFTER_EARLIER_WRITE", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "filterOnADateRange", "title" : "Filter on a Date Range" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "25cfd5e13e9bbb4ab4c50289ef0eb6842655635bd83688836460849775384d77", - "text" : "db.billing.aggregate(\n [\n {\n $project:\n {\n _id: 0,\n location: 1,\n start:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date: \"$login\"\n }\n },\n days:\n {\n $dateToString: \n {\n format: \"%Y-%m-%d %H:%M\", \n date: \n {\n $dateAdd:\n {\n startDate: \"$login\",\n unit: \"day\",\n amount: 1,\n timezone: \"$location\"\n }\n }\n }\n },\n hours:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateAdd:\n {\n startDate: \"$login\",\n unit: \"hour\",\n amount: 24,\n timezone: \"$location\"\n }\n }\n }\n },\n startTZInfo:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date: \"$login\",\n timezone: \"$location\"\n }\n },\n daysTZInfo:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateAdd:\n {\n startDate: \"$login\",\n unit: \"day\",\n amount: 1,\n timezone: \"$location\"\n }\n },\n timezone: \"$location\"\n }\n },\n hoursTZInfo:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateAdd:\n {\n startDate: \"$login\",\n unit: \"hour\",\n amount: 24,\n timezone: \"$location\"\n }\n },\n timezone: \"$location\"\n }\n },\n }\n }\n ]\n).pretty()" - }, { "role" : "DATA", "sha256" : "62cf7f0aa4169073208ddc0d5a85bf810bdf7a932257d51694edd96523b4fa73", "text" : "db.billing.insertMany(\n [\n {\n location: \"America/New_York\",\n login: ISODate(\"2021-03-13T10:00:00-0500\"),\n logout: ISODate(\"2021-03-14T18:00:00-0500\")\n },\n {\n location: \"America/Mexico_City\",\n login: ISODate(\"2021-03-13T10:00:00-00:00\"),\n logout: ISODate(\"2021-03-14T08:00:00-0500\")\n }\n ]\n)" + }, { + "role" : "ACTION", + "sha256" : "ccd2896ef01cd38017c353c5a09c675eb910a939112d1db46a92cbbfc7765aee", + "text" : "db.billing.aggregate(\n [\n {\n $project:\n {\n _id: 0,\n location: 1,\n start:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date: \"$login\"\n }\n },\n days:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateAdd:\n {\n startDate: \"$login\",\n unit: \"day\",\n amount: 1,\n timezone: \"$location\"\n }\n }\n }\n },\n hours:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateAdd:\n {\n startDate: \"$login\",\n unit: \"hour\",\n amount: 24,\n timezone: \"$location\"\n }\n }\n }\n },\n startTZInfo:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date: \"$login\",\n timezone: \"$location\"\n }\n },\n daysTZInfo:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateAdd:\n {\n startDate: \"$login\",\n unit: \"day\",\n amount: 1,\n timezone: \"$location\"\n }\n },\n timezone: \"$location\"\n }\n },\n hoursTZInfo:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateAdd:\n {\n startDate: \"$login\",\n unit: \"hour\",\n amount: 24,\n timezone: \"$location\"\n }\n },\n timezone: \"$location\"\n }\n },\n }\n }\n ]\n).pretty()" } ], "detail" : null, "owner" : null, @@ -1463,13 +1236,7 @@ "stem" : "adjustForDaylightSavingsTime", "title" : "Adjust for Daylight Savings Time" } ], - "includes" : [ { - "blob" : "d41edfcaa5d1f4eb1aa6c62d07153f48849962f9", - "path" : "content/manual/manual/source/includes/aggregation/fact-agg-epoch-millisecond-change.rst" - }, { - "blob" : "cc6876c8452c5cd0769a3671fb8da06cc3030425", - "path" : "content/manual/manual/source/includes/fact-olson-tz-behavior.rst" - } ], + "includes" : [ ], "operator" : "dateAdd", "pageBlob" : "099f72ebbdcdf570215315ac7e732b3aac310a82", "source" : { @@ -1489,27 +1256,23 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "1cd0d919311f7c4a6889235ef5f1c86c75d5c24f58e8df5a785a7b6e70d6c8e2", - "text" : "db.subscriptions.aggregate(\n [\n {\n $project:\n { \n Start: \"$start\",\n End: \"$end\", \n years:\n {\n $dateDiff:\n {\n startDate: \"$start\",\n endDate: \"$end\",\n unit: \"year\"\n }\n }, \n months:\n {\n $dateDiff:\n {\n startDate: \"$start\",\n endDate: \"$end\",\n unit: \"month\"\n }\n },\n days:\n {\n $dateDiff:\n {\n startDate: \"$start\",\n endDate: \"$end\",\n unit: \"day\"\n }\n },\n _id: 0 \n }\n }\n ]\n )" - }, { - "role" : "DATA", - "sha256" : "cf273c0581fccf8850a16637efebade5e3bae569f4f9d83b4c3ca53d56ae981f", - "text" : "db.subscriptions.insertMany(\n [\n { \n custId: 456,\n start: ISODate(\"2010-01-01\"),\n end: ISODate(\"2011-01-01\")\n },\n {\n custId: 457,\n start: ISODate(\"2010-01-01\"),\n end: ISODate(\"2011-06-31\")\n },\n {\n custId: 458, \n start: ISODate(\"2010-03-01\"),\n end: ISODate(\"2010-04-30\")\n }\n ]\n)" + "sha256" : "c9a1f56a4168365a56bf4ba6ee044eaa2f21ab4d2d9714908f3035c694ea3f4b", + "text" : "db.subscriptions.aggregate(\n [\n {\n $project:\n {\n Start: \"$start\",\n End: \"$end\",\n years:\n {\n $dateDiff:\n {\n startDate: \"$start\",\n endDate: \"$end\",\n unit: \"year\"\n }\n },\n months:\n {\n $dateDiff:\n {\n startDate: \"$start\",\n endDate: \"$end\",\n unit: \"month\"\n }\n },\n days:\n {\n $dateDiff:\n {\n startDate: \"$start\",\n endDate: \"$end\",\n unit: \"day\"\n }\n },\n _id: 0\n }\n }\n ]\n )" } ], - "detail" : null, + "detail" : "UNSUPPORTED_SETUP", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "resultPrecision", "title" : "Result Precision" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "a92d602f3f3ede531219f319c12d4428b5b48f87e06068298366984870ee63f4", - "text" : "db.events.aggregate(\n [\n {\n $project: {\n _id: 0,\n yearsApart: {\n $dateDiff: {\n startDate: \"$start\",\n endDate: \"$end\",\n unit: \"year\"\n }\n }\n }\n }\n ]\n)" - }, { "role" : "DATA", "sha256" : "8921dc0afdff0a73d1cd5d16bba91c2c38b1e1ea2a72497aaecac1b3ccb5fbaa", "text" : "db.events.insertOne(\n {\n start: ISODate(\"2022-12-31T20:00:00Z\"),\n end: ISODate(\"2023-01-01T02:00:00Z\")\n }\n)" + }, { + "role" : "ACTION", + "sha256" : "a92d602f3f3ede531219f319c12d4428b5b48f87e06068298366984870ee63f4", + "text" : "db.events.aggregate(\n [\n {\n $project: {\n _id: 0,\n yearsApart: {\n $dateDiff: {\n startDate: \"$start\",\n endDate: \"$end\",\n unit: \"year\"\n }\n }\n }\n }\n ]\n)" }, { "role" : "EXPECTED", "sha256" : "257a420a3be2af1217db1bd090519a135fcd36e8020d8921a2a9f595fa645994", @@ -1522,13 +1285,13 @@ "title" : "Year Boundary Crossing" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "dc84048d424822d9070ca83d0eea900aa1ba4259b922c92ae7ed55be9063a6a6", - "text" : "db.months.aggregate(\n [\n {\n $project:\n { \n wks_default:\n {\n $dateDiff:\n { \n startDate: \"$start\", \n endDate: \"$end\", \n unit: \"week\"\n }\n }, \n wks_monday:\n {\n $dateDiff:\n { \n startDate: \"$start\",\n endDate: \"$end\", \n unit: \"week\", \n startOfWeek: \"Monday\"\n }\n },\n wks_friday:\n {\n $dateDiff:\n { \n startDate: \"$start\",\n endDate: \"$end\",\n unit: \"week\",\n startOfWeek: \"fri\" \n }\n },\n _id: 0 \n }\n }\n ]\n )" - }, { "role" : "DATA", - "sha256" : "a95f640c1452b356318f73494e69be2ae7d1b850c4a87a987ccce165f84ec817", - "text" : "db.months.insertMany(\n [\n { \n month: \"January\",\n start: ISODate(\"2021-01-01\"),\n end: ISODate(\"2021-01-31\")\n },\n { \n month: \"February\",\n start: ISODate(\"2021-02-01\"),\n end: ISODate(\"2021-02-28\")\n },\n {\n month: \"March\",\n start: ISODate(\"2021-03-01\"),\n end: ISODate(\"2021-03-31\")\n },\n ]\n )" + "sha256" : "ee730bba62f21740e07558622d282a52499597728fe1cd521d6197c2eaf0eefb", + "text" : "db.months.insertMany(\n [\n {\n month: \"January\",\n start: ISODate(\"2021-01-01\"),\n end: ISODate(\"2021-01-31\")\n },\n {\n month: \"February\",\n start: ISODate(\"2021-02-01\"),\n end: ISODate(\"2021-02-28\")\n },\n {\n month: \"March\",\n start: ISODate(\"2021-03-01\"),\n end: ISODate(\"2021-03-31\")\n },\n ]\n )" + }, { + "role" : "ACTION", + "sha256" : "6e1a8efe1aa3986cc1b8c3c163a9a4f1cf0cd6069d33cc2941880fe10f284441", + "text" : "db.months.aggregate(\n [\n {\n $project:\n {\n wks_default:\n {\n $dateDiff:\n {\n startDate: \"$start\",\n endDate: \"$end\",\n unit: \"week\"\n }\n },\n wks_monday:\n {\n $dateDiff:\n {\n startDate: \"$start\",\n endDate: \"$end\",\n unit: \"week\",\n startOfWeek: \"Monday\"\n }\n },\n wks_friday:\n {\n $dateDiff:\n {\n startDate: \"$start\",\n endDate: \"$end\",\n unit: \"week\",\n startOfWeek: \"fri\"\n }\n },\n _id: 0\n }\n }\n ]\n )" } ], "detail" : null, "owner" : null, @@ -1536,10 +1299,7 @@ "stem" : "weeksPerMonth", "title" : "Weeks Per Month" } ], - "includes" : [ { - "blob" : "cc6876c8452c5cd0769a3671fb8da06cc3030425", - "path" : "content/manual/manual/source/includes/fact-olson-tz-behavior.rst" - } ], + "includes" : [ ], "operator" : "dateDiff", "pageBlob" : "1a62ae52cf0eb1d1064e30f41ba80ac7f0b1830a", "source" : { @@ -1566,10 +1326,7 @@ "stem" : "buildDatesFromTheirParts", "title" : "main" } ], - "includes" : [ { - "blob" : "cc6876c8452c5cd0769a3671fb8da06cc3030425", - "path" : "content/manual/manual/source/includes/fact-olson-tz-behavior.rst" - } ], + "includes" : [ ], "operator" : "dateFromParts", "pageBlob" : "46f513eb454e1c32455cfca9c05d76868d42aeeb", "source" : { @@ -1581,30 +1338,47 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/dateFromString/convertingDates", "status" : "OWNED", "stem" : null, "title" : "Converting Dates" }, { - "blocks" : [ ], + "blocks" : [ { + "role" : "DATA", + "sha256" : "e2a99e54b5a0b9dcab3f178f9331ebbced08596d6b6f5ba4e17702ebdb4b5f39", + "text" : "{ _id: 1, date: \"2017-02-08T12:10:40.787\", timezone: \"America/New_York\", message: \"Step 1: Started\" },\n{ _id: 2, date: \"2017-02-08\", timezone: \"-05:00\", message: \"Step 1: Ended\" },\n{ _id: 3, message: \" Step 1: Ended \" },\n{ _id: 4, date: \"2017-02-09\", timezone: \"Europe/London\", message: \"Step 2: Started\"},\n{ _id: 5, date: \"2017-02-09T03:35:02.055\", timezone: \"+0530\", message: \"Step 2: In Progress\"}" + }, { + "role" : "ACTION", + "sha256" : "ce57a2769a72071daff953cfb8ba1e515b848a4f82331367ff8dce121fa50a24", + "text" : "db.logmessages.aggregate( [ {\n $project: {\n date: {\n $dateFromString: {\n dateString: '$date',\n timezone: '$timezone'\n }\n }\n }\n} ] )" + }, { + "role" : "EXPECTED", + "sha256" : "14936dd2b612b6cb8ee22a9221546197c4af85a03853b283c3b4e6b6b2c0bf61", + "text" : "{ \"_id\" : 1, \"date\" : ISODate(\"2017-02-08T17:10:40.787Z\") }\n{ \"_id\" : 2, \"date\" : ISODate(\"2017-02-08T05:00:00Z\") }\n{ \"_id\" : 3, \"date\" : null }\n{ \"_id\" : 4, \"date\" : ISODate(\"2017-02-09T00:00:00Z\") }\n{ \"_id\" : 5, \"date\" : ISODate(\"2017-02-08T22:05:02.055Z\") }" + } ], "detail" : null, + "name" : "Convert Dates in Each Document's Time Zone", + "owner" : null, + "status" : "UNOWNED", + "stem" : "convertDatesInEachDocumentSTimeZone", + "title" : "Converting Dates" + }, { + "blocks" : [ ], + "detail" : "matched by action text", "owner" : "aggregation/expressions/dateFromString/onError", "status" : "OWNED", "stem" : null, - "title" : "``onError``" + "title" : "onError" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/dateFromString/onNull", "status" : "OWNED", "stem" : null, - "title" : "``onNull``" - } ], - "includes" : [ { - "blob" : "f8cea074d104c6d7540688c4a001bb12aef64c1a", - "path" : "content/manual/manual/source/includes/extracts-date-format-specifiers.yaml" + "title" : "onNull" } ], + "includes" : [ ], "operator" : "dateFromString", "pageBlob" : "9124c47ee54e14c6a0f226ca22d5328c8b480c7b", "source" : { @@ -1615,33 +1389,21 @@ }, { "context" : "aggregation/expressions", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "d641a43446f8177a55f296725d98d0747726a0da496df65f7bd5a6bd3a46cac9", - "text" : "db.connectionTime.aggregate(\n [\n {\n $match: \n {\n $expr:\n {\n $eq:\n [\n { $year: \"$logout\" },\n 2021 \n ]\n }, \n $expr:\n { \n $eq:\n [\n { $month: \"$logout\" },\n 1\n ]\n }\n }\n },\n {\n $project:\n {\n logoutTime: \n {\n $dateSubtract: \n {\n startDate: \"$logout\",\n unit: \"hour\",\n amount: 3 \n }\n }\n }\n },\n {\n $merge: \"connectionTime\"\n }\n ]\n)" - }, { - "role" : "DATA", - "sha256" : "a844776863c5c2a684992668538a7903663a49078ccc5e0f6ea3c931624de19d", - "text" : "db.connectionTime.insertMany(\n [\n { \n custId: 457,\n login: ISODate(\"2020-12-25T19:04:00\"),\n logout: ISODate(\"2020-12-28T09:04:00\") \n },\n {\n custId: 457,\n login: ISODate(\"2021-01-27T05:12:00\"),\n logout: ISODate(\"2021-01-28T13:05:00\")\n },\n { \n custId: 458,\n login: ISODate(\"2021-01-22T06:27:00\"),\n logout: ISODate(\"2021-01-31T11:00:00\")\n },\n { \n custId: 459,\n login: ISODate(\"2021-02-14T20:14:00\"),\n logout: ISODate(\"2021-02-17T16:05:00\") \n },\n { \n custId: 460,\n login: ISODate(\"2021-02-26T02:44:00\"),\n logout: ISODate(\"2021-02-18T14:13:00\")\n }\n ]\n)" - }, { - "role" : "EXPECTED", - "sha256" : "c6aea7023c40a3a402d5836547c0f6dc5727206cdae00e02abb93642b0d6444b", - "text" : "{\n \"_id\" : ObjectId(\"603dd94b044b995ad331c0b5\"),\n \"custId\" : 457,\n \"login\" : ISODate(\"2020-12-25T19:04:00Z\"),\n \"logout\" : ISODate(\"2020-12-28T09:04:00Z\")\n}\n{\n \"_id\" : ObjectId(\"603dd94b044b995ad331c0b6\"),\n \"custId\" : 457,\n \"login\" : ISODate(\"2021-01-27T05:12:00Z\"),\n \"logout\" : ISODate(\"2021-01-28T13:05:00Z\"),\n \"logoutTime\" : ISODate(\"2021-01-28T10:05:00Z\")\n}\n{\n \"_id\" : ObjectId(\"603dd94b044b995ad331c0b7\"),\n \"custId\" : 458,\n \"login\" : ISODate(\"2021-01-22T06:27:00Z\"),\n \"logout\" : ISODate(\"2021-01-31T11:00:00Z\"),\n \"logoutTime\" : ISODate(\"2021-01-31T08:00:00Z\")\n}\n{\n \"_id\" : ObjectId(\"603dd94b044b995ad331c0b8\"),\n \"custId\" : 459,\n \"login\" : ISODate(\"2021-02-14T20:14:00Z\"),\n \"logout\" : ISODate(\"2021-02-17T16:05:00Z\")\n}\n{\n \"_id\" : ObjectId(\"603dd94b044b995ad331c0b9\"),\n \"custId\" : 460,\n \"login\" : ISODate(\"2021-02-26T02:44:00Z\"),\n \"logout\" : ISODate(\"2021-02-18T14:13:00Z\")\n}" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "subtractAFixedAmount", "title" : "Subtract A Fixed Amount" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "8d2b4f50bd1fee72689677bbbc9875e0ceaf928d07436aa1b3f164425c55d976", - "text" : "db.connectionTime.aggregate(\n [\n {\n $match: \n {\n $expr:\n { \n $gt:\n [\n \"$logoutTime\", \n {\n $dateSubtract: \n {\n startDate: \"$$NOW\",\n unit: \"week\",\n amount: 1\n } \n }\n ] \n } \n }\n },\n {\n $project: \n {\n _id: 0,\n custId: 1, \n loggedOut: \n {\n $dateToString:\n {\n format: \"%Y-%m-%d\",\n date: \"$logoutTime\"\n }\n }\n }\n } \n ]\n) " - }, { "role" : "DATA", - "sha256" : "a844776863c5c2a684992668538a7903663a49078ccc5e0f6ea3c931624de19d", - "text" : "db.connectionTime.insertMany(\n [\n { \n custId: 457,\n login: ISODate(\"2020-12-25T19:04:00\"),\n logout: ISODate(\"2020-12-28T09:04:00\") \n },\n {\n custId: 457,\n login: ISODate(\"2021-01-27T05:12:00\"),\n logout: ISODate(\"2021-01-28T13:05:00\")\n },\n { \n custId: 458,\n login: ISODate(\"2021-01-22T06:27:00\"),\n logout: ISODate(\"2021-01-31T11:00:00\")\n },\n { \n custId: 459,\n login: ISODate(\"2021-02-14T20:14:00\"),\n logout: ISODate(\"2021-02-17T16:05:00\") \n },\n { \n custId: 460,\n login: ISODate(\"2021-02-26T02:44:00\"),\n logout: ISODate(\"2021-02-18T14:13:00\")\n }\n ]\n)" + "sha256" : "e27c54905516b545015da5ef0cb2342254fa225f3e6e6c01ab8a91a6be84f077", + "text" : "db.connectionTime.insertMany(\n [\n {\n custId: 457,\n login: ISODate(\"2020-12-25T19:04:00\"),\n logout: ISODate(\"2020-12-28T09:04:00\")\n },\n {\n custId: 457,\n login: ISODate(\"2021-01-27T05:12:00\"),\n logout: ISODate(\"2021-01-28T13:05:00\")\n },\n {\n custId: 458,\n login: ISODate(\"2021-01-22T06:27:00\"),\n logout: ISODate(\"2021-01-31T11:00:00\")\n },\n {\n custId: 459,\n login: ISODate(\"2021-02-14T20:14:00\"),\n logout: ISODate(\"2021-02-17T16:05:00\")\n },\n {\n custId: 460,\n login: ISODate(\"2021-02-26T02:44:00\"),\n logout: ISODate(\"2021-02-18T14:13:00\")\n }\n ]\n)" + }, { + "role" : "ACTION", + "sha256" : "b059fd6a8dac1c4453fdfcaad17db7b5deecb8d36f5e268f02be0cd7020256c8", + "text" : "db.connectionTime.aggregate(\n [\n {\n $match:\n {\n $expr:\n {\n $gt:\n [\n \"$logoutTime\",\n {\n $dateSubtract:\n {\n startDate: \"$$NOW\",\n unit: \"week\",\n amount: 1\n }\n }\n ]\n }\n }\n },\n {\n $project:\n {\n _id: 0,\n custId: 1,\n loggedOut:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d\",\n date: \"$logoutTime\"\n }\n }\n }\n }\n ]\n)" }, { "role" : "EXPECTED", "sha256" : "db1f1f3972cf0845c018de79b39dae330d52de106e9f449a2439811b8aa3b3fd", @@ -1654,13 +1416,13 @@ "title" : "Filter by Relative Dates" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "69a7f3d8c1f469788ba2e2643bfec915c1e4d763f658d8d2162543ca8969351c", - "text" : "db.billing.aggregate(\n [ \n {\n $project:\n {\n _id: 0,\n location: 1,\n start:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date: \"$login\"\n }\n },\n days:\n {\n $dateToString: \n {\n format: \"%Y-%m-%d %H:%M\", \n date: \n {\n $dateSubtract:\n {\n startDate: \"$login\",\n unit: \"day\",\n amount: 1,\n timezone: \"$location\"\n }\n }\n }\n },\n hours:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateSubtract:\n {\n startDate: \"$login\",\n unit: \"hour\",\n amount: 24,\n timezone: \"$location\"\n }\n }\n }\n },\n startTZInfo:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date: \"$login\",\n timezone: \"$location\"\n }\n },\n daysTZInfo:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateSubtract:\n {\n startDate: \"$login\",\n unit: \"day\",\n amount: 1,\n timezone: \"$location\"\n }\n },\n timezone: \"$location\"\n }\n },\n hoursTZInfo:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateSubtract:\n {\n startDate: \"$login\",\n unit: \"hour\",\n amount: 24,\n timezone: \"$location\"\n }\n },\n timezone: \"$location\"\n }\n },\n }\n }\n ]\n).pretty()" - }, { "role" : "DATA", - "sha256" : "0ca74034e1a9d9c80d17e4b467ba253afb74659e119bc1a78fd34e2deca3c2c8", - "text" : "db.billing.insertMany(\n [\n {\n location: \"America/New_York\", \n login: ISODate(\"2021-03-14T10:00:00-0500\"),\n logout: ISODate(\"2021-03-14T18:00:00-0500\")\n },\n {\n location: \"America/Mexico_City\",\n login: ISODate(\"2021-03-14T10:00:00-00:00\"),\n logout: ISODate(\"2021-03-15T08:00:00-0500\")\n }\n ]\n)" + "sha256" : "04650951638002e44477909f633a63571634372dc33ffae0124b9ab8af40f971", + "text" : "db.billing.insertMany(\n [\n {\n location: \"America/New_York\",\n login: ISODate(\"2021-03-14T10:00:00-0500\"),\n logout: ISODate(\"2021-03-14T18:00:00-0500\")\n },\n {\n location: \"America/Mexico_City\",\n login: ISODate(\"2021-03-14T10:00:00-00:00\"),\n logout: ISODate(\"2021-03-15T08:00:00-0500\")\n }\n ]\n)" + }, { + "role" : "ACTION", + "sha256" : "0afff6801e0ac64002781fd166d8cb935955cd7ca8867a63cc2404fe97340c5e", + "text" : "db.billing.aggregate(\n [\n {\n $project:\n {\n _id: 0,\n location: 1,\n start:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date: \"$login\"\n }\n },\n days:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateSubtract:\n {\n startDate: \"$login\",\n unit: \"day\",\n amount: 1,\n timezone: \"$location\"\n }\n }\n }\n },\n hours:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateSubtract:\n {\n startDate: \"$login\",\n unit: \"hour\",\n amount: 24,\n timezone: \"$location\"\n }\n }\n }\n },\n startTZInfo:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date: \"$login\",\n timezone: \"$location\"\n }\n },\n daysTZInfo:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateSubtract:\n {\n startDate: \"$login\",\n unit: \"day\",\n amount: 1,\n timezone: \"$location\"\n }\n },\n timezone: \"$location\"\n }\n },\n hoursTZInfo:\n {\n $dateToString:\n {\n format: \"%Y-%m-%d %H:%M\",\n date:\n {\n $dateSubtract:\n {\n startDate: \"$login\",\n unit: \"hour\",\n amount: 24,\n timezone: \"$location\"\n }\n },\n timezone: \"$location\"\n }\n },\n }\n }\n ]\n).pretty()" } ], "detail" : null, "owner" : null, @@ -1668,13 +1430,7 @@ "stem" : "adjustForDaylightSavingsTime", "title" : "Adjust for Daylight Savings Time" } ], - "includes" : [ { - "blob" : "d41edfcaa5d1f4eb1aa6c62d07153f48849962f9", - "path" : "content/manual/manual/source/includes/aggregation/fact-agg-epoch-millisecond-change.rst" - }, { - "blob" : "cc6876c8452c5cd0769a3671fb8da06cc3030425", - "path" : "content/manual/manual/source/includes/fact-olson-tz-behavior.rst" - } ], + "includes" : [ ], "operator" : "dateSubtract", "pageBlob" : "b02f975cf6f9e7f37409b879a2fe5bcb7d3c2e73", "source" : { @@ -1692,10 +1448,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "cc6876c8452c5cd0769a3671fb8da06cc3030425", - "path" : "content/manual/manual/source/includes/fact-olson-tz-behavior.rst" - } ], + "includes" : [ ], "operator" : "dateToParts", "pageBlob" : "cba32c448416d26638cc340a18418540f45b61ec", "source" : { @@ -1713,22 +1466,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "f8cea074d104c6d7540688c4a001bb12aef64c1a", - "path" : "content/manual/manual/source/includes/extracts-date-format-specifiers.yaml" - } ], + "includes" : [ ], "operator" : "dateToString", "pageBlob" : "1426356ae53f3e30573b1f49657b043f8eebe47a", "source" : { @@ -1740,13 +1478,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "dfa28d65b6eeb8e5f5baa57fedba635d606f36d78b8a6fb3a6f4a2b33f34c75d", - "text" : "db.cakeSales.aggregate( [\n {\n $project: {\n _id: 1,\n orderDate: 1,\n truncatedOrderDate: {\n $dateTrunc: {\n date: \"$orderDate\", unit: \"week\", binSize: 2,\n timezone: \"America/Los_Angeles\", startOfWeek: \"Monday\"\n }\n }\n }\n }\n] )" - }, { "role" : "DATA", "sha256" : "e88f442a53cb47382215af3d0802548ba7c2169006abc81169adec86231e65b1", "text" : "db.cakeSales.insertMany( [\n { _id: 0, type: \"chocolate\", orderDate: new Date(\"2020-05-18T14:10:30Z\"),\n state: \"CA\", price: 13, quantity: 120 },\n { _id: 1, type: \"chocolate\", orderDate: new Date(\"2021-03-20T11:30:05Z\"),\n state: \"WA\", price: 14, quantity: 140 },\n { _id: 2, type: \"vanilla\", orderDate: new Date(\"2021-01-11T06:31:15Z\"),\n state: \"CA\", price: 12, quantity: 145 },\n { _id: 3, type: \"vanilla\", orderDate: new Date(\"2020-02-08T13:13:23Z\"),\n state: \"WA\", price: 13, quantity: 104 },\n { _id: 4, type: \"strawberry\", orderDate: new Date(\"2019-05-18T16:09:01Z\"),\n state: \"CA\", price: 41, quantity: 162 },\n { _id: 5, type: \"strawberry\", orderDate: new Date(\"2019-01-08T06:12:03Z\"),\n state: \"WA\", price: 43, quantity: 134 }\n] )" + }, { + "role" : "ACTION", + "sha256" : "dfa28d65b6eeb8e5f5baa57fedba635d606f36d78b8a6fb3a6f4a2b33f34c75d", + "text" : "db.cakeSales.aggregate( [\n {\n $project: {\n _id: 1,\n orderDate: 1,\n truncatedOrderDate: {\n $dateTrunc: {\n date: \"$orderDate\", unit: \"week\", binSize: 2,\n timezone: \"America/Los_Angeles\", startOfWeek: \"Monday\"\n }\n }\n }\n }\n] )" }, { "role" : "EXPECTED", "sha256" : "c2e142d6f7a5060225cfb76d5687aa92258aafc165c54c77178dfe1522369a7e", @@ -1756,22 +1494,16 @@ "owner" : null, "status" : "UNOWNED", "stem" : "truncateOrderDatesInAProjectPipelineStage", - "title" : "Truncate Order Dates in a ``$project`` Pipeline Stage" + "title" : "Truncate Order Dates in a $project Pipeline Stage" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/dateTrunc/truncateOrderDatesAndObtainQuantitySumInAGroupPipelineStage", "status" : "OWNED", "stem" : null, - "title" : "Truncate Order Dates and Obtain Quantity Sum in a ``$group`` Pipeline Stage" - } ], - "includes" : [ { - "blob" : "d7675ae2c036ae527b45c1fefcad370c4f9a6975", - "path" : "content/manual/manual/source/includes/dateTrunc-binSize-unit.rst" - }, { - "blob" : "f56012674985fd6d9fe5f558a661d55d6a717156", - "path" : "content/manual/manual/source/includes/cakeSales-example-collection.rst" + "title" : "Truncate Order Dates and Obtain Quantity Sum in a $group Pipeline Stage" } ], + "includes" : [ ], "operator" : "dateTrunc", "pageBlob" : "769f45e8ce75acc795cd903efa4dae3b0b5e6f2a", "source" : { @@ -1789,10 +1521,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - } ], + "includes" : [ ], "operator" : "dayOfMonth", "pageBlob" : "6264951695175c1db3a14898896b3ee89db19d55", "source" : { @@ -1810,10 +1539,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - } ], + "includes" : [ ], "operator" : "dayOfWeek", "pageBlob" : "1ab9f9eae92172087b38ccd0b49177f29764baa6", "source" : { @@ -1831,10 +1557,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - } ], + "includes" : [ ], "operator" : "dayOfYear", "pageBlob" : "5c95c413efb724d41cb84d4d0de0923aa059b2ab", "source" : { @@ -1885,21 +1608,6 @@ "title" : "Dense Rank for Duplicate, Null, and Missing Values" } ], "includes" : [ { - "blob" : "fedff0803bf6ef49336cf0a6588ffc5131dc7c91", - "path" : "content/manual/manual/source/includes/rank-and-denseRank-behavior.rst" - }, { - "blob" : "340aee2ee6bcc83023c5de38fc0ce8a034386755", - "path" : "content/manual/manual/source/includes/setWindowFields-example-collection.rst" - }, { - "blob" : "1d8936541da3975a89e1e7e5e7c984ed7d5467f9", - "path" : "content/manual/manual/source/includes/setWindowFields-partition-sort-quantity.rst" - }, { - "blob" : "13694f7d606928cb63fd6b471d29c52c8a6e7f40", - "path" : "content/manual/manual/source/includes/setWindowFields-partition-sort-date.rst" - }, { - "blob" : "177e415a22d946c759fe429251695e8961f515e5", - "path" : "content/manual/manual/source/includes/setWindowFields-duplicates-example-collection.rst" - }, { "blob" : "29a47bc3cb38c8d957f7ef25d9d7a450e3ba2a16", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cake-sales-insert.snippet.cake-sales-insert.js" } ], @@ -1920,10 +1628,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "1291ecdbc618596b976b913c86e6d95df3033b0b", - "path" : "content/manual/manual/source/includes/outputUnit-behavior.rst" - } ], + "includes" : [ ], "operator" : "derivative", "pageBlob" : "dac37b4a46b75a93dae6ec6d8f882b3a9c4f6bae", "source" : { @@ -1951,16 +1656,16 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "355e54a8b86395ac7554108fe9668080cd8387016406a7c09cbf92a088a644b3", - "text" : "db.aggregate([\n {\n $documents: [\n {\n jsonData: '{\"_id\":{\"$oid\":\"507f1f77bcf86cd799439011\"},' +\n '\"title\":\"The Matrix\",' +\n '\"year\":{\"$numberInt\":\"1999\"},' +\n '\"rating\":{\"$numberDouble\":\"8.7\"}}'\n }\n ]\n },\n {\n $project: {\n parsed: { \n $convert: { \n input: \"$jsonData\", \n to: \"object\" \n }\n }\n }\n },\n {\n $project: {\n movie: { $deserializeEJSON: { input: \"$parsed\" } }\n }\n }\n])" + "sha256" : "7c24f39026fed4eb4a1658dc076e857270b10b3761ba3f403569f77dc909f12e", + "text" : "db.aggregate([\n {\n $documents: [\n {\n jsonData: '{\"_id\":{\"$oid\":\"507f1f77bcf86cd799439011\"},' +\n '\"title\":\"The Matrix\",' +\n '\"year\":{\"$numberInt\":\"1999\"},' +\n '\"rating\":{\"$numberDouble\":\"8.7\"}}'\n }\n ]\n },\n {\n $project: {\n parsed: {\n $convert: {\n input: \"$jsonData\",\n to: \"object\"\n }\n }\n }\n },\n {\n $project: {\n movie: { $deserializeEJSON: { input: \"$parsed\" } }\n }\n }\n])" }, { "role" : "EXPECTED", "sha256" : "145aa2637b4f85361d8eb0422dd42f811ee2d507351b964ef84899477861f636", "text" : "{\n _id: ObjectId(\"...\"),\n movie: {\n _id: ObjectId(\"507f1f77bcf86cd799439011\"),\n title: \"The Matrix\",\n year: 1999,\n rating: 8.7\n }\n}" } ], - "detail" : null, + "detail" : "COLLECTION_REQUIRED", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "parseJsonStringAndDeserialize", "title" : "Parse JSON String and Deserialize" }, { @@ -1981,8 +1686,8 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "8ba4e4991eeb9378fd93768c7f2dd35acc0da49c586d317db3b340d80e46bbfe", - "text" : "db.data.aggregate([\n {\n $project: {\n result: { \n $deserializeEJSON: { \n input: \"$ejsonField\",\n onError: { error: \"Invalid EJSON format\" }\n }\n }\n }\n }\n])" + "sha256" : "106c7b31559ee405fef254e2e79e501cc5ead67bef3bf50b93306409a90c225c", + "text" : "db.data.aggregate([\n {\n $project: {\n result: {\n $deserializeEJSON: {\n input: \"$ejsonField\",\n onError: { error: \"Invalid EJSON format\" }\n }\n }\n }\n }\n])" } ], "detail" : null, "owner" : null, @@ -1990,10 +1695,7 @@ "stem" : "useOnErrorForErrorHandling", "title" : "Use onError for Error Handling" } ], - "includes" : [ { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - } ], + "includes" : [ ], "operator" : "deserializeEJSON", "pageBlob" : "7afb19ace9bb64d16331d041e46e3483951978f2", "source" : { @@ -2005,13 +1707,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "802367d4ce0b501d7fa38509c295bd9d34d8849cd82ecf3a3a43d67be37c32a0", - "text" : "db.planning.aggregate(\n [\n { $project: { city: 1, workdays: { $divide: [ \"$hours\", 8 ] } } }\n ]\n)" - }, { "role" : "DATA", "sha256" : "cf5ea91d06a8fcc8de16ca452a75b171ad234f6f53871b9aec04240c4753bf56", "text" : "db.conferencePlanning.insertMany( [\n { \"_id\" : 1, \"city\" : \"New York\", \"hours\" : 80, \"tasks\" : 7 },\n { \"_id\" : 2, \"city\" : \"Singapore\", \"hours\" : 40, \"tasks\" : 4 }\n] )" + }, { + "role" : "ACTION", + "sha256" : "802367d4ce0b501d7fa38509c295bd9d34d8849cd82ecf3a3a43d67be37c32a0", + "text" : "db.planning.aggregate(\n [\n { $project: { city: 1, workdays: { $divide: [ \"$hours\", 8 ] } } }\n ]\n)" }, { "role" : "EXPECTED", "sha256" : "21c8828429ebfdb740d1c1891fd5ca2a2a7d27430648c26235008bce882483fa", @@ -2024,10 +1726,7 @@ "stem" : "divideHoursIntoWorkdays", "title" : "main" } ], - "includes" : [ { - "blob" : "8ba36fce905ce2036b2aa0ddd85bccf5d2b3b780", - "path" : "content/manual/manual/source/includes/agg-expression-double-unless-decimal-behavior.rst" - } ], + "includes" : [ ], "operator" : "divide", "pageBlob" : "3f5ab35211a44472bce0dc500d800302dcae5bd4", "source" : { @@ -2053,15 +1752,6 @@ "title" : "Document Number for Duplicate, Null, and Missing Values" } ], "includes" : [ { - "blob" : "340aee2ee6bcc83023c5de38fc0ce8a034386755", - "path" : "content/manual/manual/source/includes/setWindowFields-example-collection.rst" - }, { - "blob" : "1d8936541da3975a89e1e7e5e7c984ed7d5467f9", - "path" : "content/manual/manual/source/includes/setWindowFields-partition-sort-quantity.rst" - }, { - "blob" : "177e415a22d946c759fe429251695e8961f515e5", - "path" : "content/manual/manual/source/includes/setWindowFields-duplicates-example-collection.rst" - }, { "blob" : "29a47bc3cb38c8d957f7ef25d9d7a450e3ba2a16", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cake-sales-insert.snippet.cake-sales-insert.js" } ], @@ -2075,22 +1765,14 @@ }, { "context" : "aggregation/expressions", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "439165b8d124f4b30952bf22c75e335a74f3841b06ade05c09ba116214dcd02e", - "text" : "db.collection('MyCollection').aggregate([\n {\n $match: {\n $expr: {\n $encStrContains: {\n input: '$employeeLastName',\n substring: 'earso'\n }\n }\n }\n }\n])" - } ], - "detail" : null, - "name" : "Match an Encrypted Substring", + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", - "stem" : "matchAnEncryptedSubstring", + "status" : "UNSUPPORTED", + "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "6c6d8854ffacb2ccc5ef50ceb0d71f032279abd8", - "path" : "content/manual/manual/source/includes/queryable-encryption/qe-aggregation-operator.rst" - } ], + "includes" : [ ], "operator" : "encStrContains", "pageBlob" : "6479075cff97219a4bc6aecd03b2fd56deea6d38", "source" : { @@ -2101,22 +1783,14 @@ }, { "context" : "aggregation/expressions", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "31a65962f19997c88759b2c7986bb385d7f2673137d91318f083336a7ffa95b9", - "text" : "db.collection('MyCollection').aggregate([\n {\n $match: {\n $expr: {\n $encStrEndsWith: {\n input: '$employeeFirstName',\n suffix: 'son'\n }\n }\n }\n }\n])" - } ], - "detail" : null, - "name" : "Match an Encrypted Suffix", + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", - "stem" : "matchAnEncryptedSuffix", + "status" : "UNSUPPORTED", + "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "6c6d8854ffacb2ccc5ef50ceb0d71f032279abd8", - "path" : "content/manual/manual/source/includes/queryable-encryption/qe-aggregation-operator.rst" - } ], + "includes" : [ ], "operator" : "encStrEndsWith", "pageBlob" : "f7bdd8433a2f8643339b558e7fa5ab73b7f58791", "source" : { @@ -2127,22 +1801,14 @@ }, { "context" : "aggregation/expressions", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "9f83861d081923ddacc1dadbf61d4d8e7541203e1fd94e802d3264d23d98210a", - "text" : "db.collection('MyCollection').aggregate([\n {\n $match: {\n $expr: {\n $encStrNormalizedEq: {\n input: '$employeeLastName',\n string: 'BĂ©atrice'\n }\n }\n }\n }\n])" - } ], - "detail" : null, - "name" : "Match a Normalized Encrypted String", + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", - "stem" : "matchANormalizedEncryptedString", + "status" : "UNSUPPORTED", + "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "6c6d8854ffacb2ccc5ef50ceb0d71f032279abd8", - "path" : "content/manual/manual/source/includes/queryable-encryption/qe-aggregation-operator.rst" - } ], + "includes" : [ ], "operator" : "encStrNormalizedEq", "pageBlob" : "c9aca01712353f28537c330a33877e86612d1a5a", "source" : { @@ -2153,22 +1819,14 @@ }, { "context" : "aggregation/expressions", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "9d269e8a85656803552e70bf616cda49c8bfef42194941f93df701ffae3bba5b", - "text" : "db.collection('MyCollection').aggregate([\n {\n $match: {\n $expr: {\n $encStrStartsWith: {\n input: '$employeeFirstName',\n prefix: 'Sam'\n }\n }\n }\n }\n])" - } ], - "detail" : null, - "name" : "Match an Encrypted Prefix", + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", - "stem" : "matchAnEncryptedPrefix", + "status" : "UNSUPPORTED", + "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "6c6d8854ffacb2ccc5ef50ceb0d71f032279abd8", - "path" : "content/manual/manual/source/includes/queryable-encryption/qe-aggregation-operator.rst" - } ], + "includes" : [ ], "operator" : "encStrStartsWith", "pageBlob" : "7ea9831cbb1b91e0d5845e68a23db38df156795d", "source" : { @@ -2187,20 +1845,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "a65b631cdba796d7101918731b989c384d6d0b6d", - "path" : "content/manual/manual/source/includes/extracts-examples-eval.yaml" - }, { - "blob" : "32c1c5529385658b35c67c3674bd23475ac158f7", - "path" : "content/manual/manual/source/includes/extracts-parent-agg-comparison-expressions.yaml" - }, { - "blob" : "229b18c565a0524bcb3687d5661fa8650a3c93a5", - "path" : "content/manual/manual/source/includes/sample-data-usage-singular.rst" + "blob" : "019e6ef63ca6c60d33d70c2aba20d1a5338cce2e", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/eq/eq-year-output.sh" }, { "blob" : "e7acf73ce86944fafffa54787bb5de1c24e8ed3b", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/eq/eq-year.snippet.eq-year.js" - }, { - "blob" : "019e6ef63ca6c60d33d70c2aba20d1a5338cce2e", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/eq/eq-year-output.sh" } ], "operator" : "eq", "pageBlob" : "507dee903f0dd9c5021e531119956fd8d56d526f", @@ -2219,16 +1868,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "8ba36fce905ce2036b2aa0ddd85bccf5d2b3b780", - "path" : "content/manual/manual/source/includes/agg-expression-double-unless-decimal-behavior.rst" - }, { - "blob" : "bbf5c44a10e62dc8903402b5aaf9baf1323ef458", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null.yaml" - }, { - "blob" : "8623cf2a56423be1b837696232e1d7f56f12569c", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "exp", "pageBlob" : "ac8410bdc096e158188ed5a76b084fb357253519", "source" : { @@ -2240,23 +1880,20 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/expMovingAvg/exponentialMovingAverageUsingN", "status" : "OWNED", "stem" : null, - "title" : "Exponential Moving Average Using ``N``" + "title" : "Exponential Moving Average Using N" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/expMovingAvg/exponentialMovingAverageUsingAlpha", "status" : "OWNED", "stem" : null, - "title" : "Exponential Moving Average Using ``alpha``" - } ], - "includes" : [ { - "blob" : "948b9f3acd260fe7f96aacc1928eac43c95a46ae", - "path" : "content/manual/manual/source/includes/expMovingAvg-N-or-alpha.rst" + "title" : "Exponential Moving Average Using alpha" } ], + "includes" : [ ], "operator" : "expMovingAvg", "pageBlob" : "41b7f4e113a6d91ff02162bec562e88ca7191216", "source" : { @@ -2282,13 +1919,13 @@ "title" : "Use the limit Field" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "e98692a240ae3eddc6529f70d53ec382177727a7485537a7e46381bdf5225db7", - "text" : "db.sales.aggregate( [\n {\n $project: {\n items: {\n $filter: {\n input: \"$items\",\n as: \"item\", \n cond: { $gte: [ \"$$item.price\", 100] },\n limit: 5\n }\n }\n }\n }\n] )" - }, { "role" : "DATA", "sha256" : "53e42fa432e886682843ec99b0feceaa38d28ab39e463d880b2539d2794b3e93", "text" : "db.sales.insertMany( [\n {\n _id: 0,\n items: [\n { item_id: 43, quantity: 2, price: 10, name: \"pen\" },\n { item_id: 2, quantity: 1, price: 240, name: \"briefcase\" }\n ]\n },\n {\n _id: 1,\n items: [\n { item_id: 23, quantity: 3, price: 110, name: \"notebook\" },\n { item_id: 103, quantity: 4, price: 5, name: \"pen\" },\n { item_id: 38, quantity: 1, price: 300, name: \"printer\" }\n ]\n },\n {\n _id: 2,\n items: [\n { item_id: 4, quantity: 1, price: 23, name: \"paper\" }\n ]\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "864de0e0f2b051fa19237f3dbd57ae1b315aab77b990fc6f41b682a083a661f3", + "text" : "db.sales.aggregate( [\n {\n $project: {\n items: {\n $filter: {\n input: \"$items\",\n as: \"item\",\n cond: { $gte: [ \"$$item.price\", 100] },\n limit: 5\n }\n }\n }\n }\n] )" }, { "role" : "EXPECTED", "sha256" : "78473a959048be81bed3d5a7446d67ad48459db0a9121956cbb03f48270ebb04", @@ -2315,17 +1952,17 @@ "title" : "Filter Based on Regular Expression Match" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "f15f49fea4a8e5667b61996d7ca7f224b89c968536e167ed83e455f0b1faec26", - "text" : "db.people.aggregate( [\n {\n $project: {\n _id: 0,\n name: 1,\n secondaryHobbies: {\n $filter: {\n input: \"$hobbies\",\n arrayIndexAs: \"myIndex\",\n cond: { $eq: [ { $mod: [ \"$$myIndex\", 2 ] }, 0 ] }\n }\n }\n }\n }\n] )" + "role" : "DATA", + "sha256" : "53e42fa432e886682843ec99b0feceaa38d28ab39e463d880b2539d2794b3e93", + "text" : "db.sales.insertMany( [\n {\n _id: 0,\n items: [\n { item_id: 43, quantity: 2, price: 10, name: \"pen\" },\n { item_id: 2, quantity: 1, price: 240, name: \"briefcase\" }\n ]\n },\n {\n _id: 1,\n items: [\n { item_id: 23, quantity: 3, price: 110, name: \"notebook\" },\n { item_id: 103, quantity: 4, price: 5, name: \"pen\" },\n { item_id: 38, quantity: 1, price: 300, name: \"printer\" }\n ]\n },\n {\n _id: 2,\n items: [\n { item_id: 4, quantity: 1, price: 23, name: \"paper\" }\n ]\n }\n] )" }, { "role" : "DATA", "sha256" : "80e6402e0dac8d11723826a9402d2496b074dbe1ef3141d713a6d0872e9f2208", "text" : "db.people.insertMany( [\n { _id: 1, name: \"Melissa\", hobbies: [ \"softball\", \"drawing\", \"reading\" ] },\n { _id: 2, name: \"Brad\", hobbies: [ \"gaming\", \"skateboarding\" ] },\n { _id: 3, name: \"Scott\", hobbies: [ \"basketball\", \"music\", \"fishing\" ] },\n { _id: 4, name: \"Tracey\", hobbies: [ \"acting\", \"yoga\" ] },\n { _id: 5, name: \"Josh\", hobbies: [ \"programming\" ] },\n { _id: 6, name: \"Claire\" }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "c9f559113eb7f6674c51b501dd2fcd11705e41472177d9c5f238b347eee3f4f8", - "text" : "[\n { \"name\" : \"Melissa\", \"secondaryHobbies\" : [ \"softball\", \"reading\" ] }\n { \"name\" : \"Brad\", \"secondaryHobbies\" : [ \"gaming\" ] }\n { \"name\" : \"Scott\", \"secondaryHobbies\" : [ \"basketball\", \"fishing\" ] }\n { \"name\" : \"Tracey\", \"secondaryHobbies\" : [ \"acting\" ] }\n { \"name\" : \"Josh\", \"secondaryHobbies\" : [ \"programming\" ] }\n { \"name\" : \"Claire\", \"secondaryHobbies\" : null }\n]" + "role" : "ACTION", + "sha256" : "f15f49fea4a8e5667b61996d7ca7f224b89c968536e167ed83e455f0b1faec26", + "text" : "db.people.aggregate( [\n {\n $project: {\n _id: 0,\n name: 1,\n secondaryHobbies: {\n $filter: {\n input: \"$hobbies\",\n arrayIndexAs: \"myIndex\",\n cond: { $eq: [ { $mod: [ \"$$myIndex\", 2 ] }, 0 ] }\n }\n }\n }\n }\n] )" } ], "detail" : null, "owner" : null, @@ -2334,48 +1971,29 @@ "title" : "Access the Index of Each Item in an Array" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "9fa249b3279a44120a5709143536c48a265fb559557f80b0308cfbb0a95a9bcd", - "text" : "db.people.aggregate( [\n {\n $project: {\n _id: 0,\n name: 1,\n secondaryHobbies: {\n $filter: {\n input: \"$hobbies\",\n cond: { $eq: [ { $mod: [ \"$$IDX\", 2 ] }, 0 ] }\n }\n }\n }\n }\n] )" + "role" : "DATA", + "sha256" : "53e42fa432e886682843ec99b0feceaa38d28ab39e463d880b2539d2794b3e93", + "text" : "db.sales.insertMany( [\n {\n _id: 0,\n items: [\n { item_id: 43, quantity: 2, price: 10, name: \"pen\" },\n { item_id: 2, quantity: 1, price: 240, name: \"briefcase\" }\n ]\n },\n {\n _id: 1,\n items: [\n { item_id: 23, quantity: 3, price: 110, name: \"notebook\" },\n { item_id: 103, quantity: 4, price: 5, name: \"pen\" },\n { item_id: 38, quantity: 1, price: 300, name: \"printer\" }\n ]\n },\n {\n _id: 2,\n items: [\n { item_id: 4, quantity: 1, price: 23, name: \"paper\" }\n ]\n }\n] )" + }, { + "role" : "DATA", + "sha256" : "80e6402e0dac8d11723826a9402d2496b074dbe1ef3141d713a6d0872e9f2208", + "text" : "db.people.insertMany( [\n { _id: 1, name: \"Melissa\", hobbies: [ \"softball\", \"drawing\", \"reading\" ] },\n { _id: 2, name: \"Brad\", hobbies: [ \"gaming\", \"skateboarding\" ] },\n { _id: 3, name: \"Scott\", hobbies: [ \"basketball\", \"music\", \"fishing\" ] },\n { _id: 4, name: \"Tracey\", hobbies: [ \"acting\", \"yoga\" ] },\n { _id: 5, name: \"Josh\", hobbies: [ \"programming\" ] },\n { _id: 6, name: \"Claire\" }\n] )" }, { "role" : "DATA", "sha256" : "53e42fa432e886682843ec99b0feceaa38d28ab39e463d880b2539d2794b3e93", "text" : "db.sales.insertMany( [\n {\n _id: 0,\n items: [\n { item_id: 43, quantity: 2, price: 10, name: \"pen\" },\n { item_id: 2, quantity: 1, price: 240, name: \"briefcase\" }\n ]\n },\n {\n _id: 1,\n items: [\n { item_id: 23, quantity: 3, price: 110, name: \"notebook\" },\n { item_id: 103, quantity: 4, price: 5, name: \"pen\" },\n { item_id: 38, quantity: 1, price: 300, name: \"printer\" }\n ]\n },\n {\n _id: 2,\n items: [\n { item_id: 4, quantity: 1, price: 23, name: \"paper\" }\n ]\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "9fa249b3279a44120a5709143536c48a265fb559557f80b0308cfbb0a95a9bcd", + "text" : "db.people.aggregate( [\n {\n $project: {\n _id: 0,\n name: 1,\n secondaryHobbies: {\n $filter: {\n input: \"$hobbies\",\n cond: { $eq: [ { $mod: [ \"$$IDX\", 2 ] }, 0 ] }\n }\n }\n }\n }\n] )" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", "stem" : "useIdxToAccessTheIndex", - "title" : "Use ``$$IDX`` to Access the Index" - } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "9a1cc4f06a0eb57ad2f38108c43274e218115f4e", - "path" : "content/manual/manual/source/includes/aggregation/null-input-behavior.rst" - }, { - "blob" : "89ca5380b16550b123b1b89173ff2450bfd4386f", - "path" : "content/manual/manual/source/includes/aggregation/non-array-input-error.rst" - }, { - "blob" : "0516c5852f57b4a3519679fb038cb202fa4b00f2", - "path" : "content/manual/manual/source/includes/people-collection.rst" - }, { - "blob" : "a74c99b5109a258f67f8dc8728cca76da16da7e2", - "path" : "content/manual/manual/source/includes/filter-index-example-output.rst" - }, { - "blob" : "2fdfeda0983550843de7b5305cf2f4a7453e7511", - "path" : "content/manual/manual/source/includes/IDX-use.rst" + "title" : "Use $$IDX to Access the Index" } ], + "includes" : [ ], "operator" : "filter", "pageBlob" : "e04f7d1db758fc5f0eab0cb09544bb1e6160d6a8", "source" : { @@ -2388,12 +2006,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "99e7a077d4f186a6186965e5188771a3c2c1b06e5cbd848a1f592eb468826943", - "text" : "db.movies.aggregate( [\n { $sort: { year: 1, title: 1 } },\n { $unwind: \"$genres\" },\n {\n $group: {\n _id: \"$genres\",\n firstMovieTitle: { $first: \"$title\" },\n firstMovieYear: { $first: \"$year\" }\n }\n },\n { $sort: { _id: 1 } },\n { $limit: 5 }\n] )" + "sha256" : "84d4c5beb3b9d3f385f9b604ad5623d2789047d3b5e132dc1de32d8325a847ec", + "text" : "db.movies.aggregate( [\n { $sort: { year: 1, title: 1 } },\n { $unwind: \"$genres\" },\n {\n $group: {\n _id: \"$genres\",\n firstMovieTitle: { $first: \"$title\" },\n firstMovieYear: { $first: \"$year\" }\n }\n },\n { $sort: { _id: 1 } },\n { $limit: 5 }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "2b0d30d3cfb3aa1fc4ac587631e62fbfcfafbf18dc048cd10174cd9083163873", - "text" : "[\n {\n _id: 'Action',\n firstMovieTitle: 'The Perils of Pauline',\n firstMovieYear: 1914\n },\n {\n _id: 'Adventure',\n firstMovieTitle: 'Robin Hood',\n firstMovieYear: 1922\n },\n {\n _id: 'Animation',\n firstMovieTitle: 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n firstMovieYear: 1911\n },\n {\n _id: 'Biography',\n firstMovieTitle: 'Regeneration',\n firstMovieYear: 1915\n },\n {\n _id: 'Comedy',\n firstMovieTitle: 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n firstMovieYear: 1911\n }\n]" + "sha256" : "eed4ead3ab8dc2982a9df36e1abb468efdd328bf5772ee207c25864c11279745", + "text" : "[\n {\n _id: 'Action',\n firstMovieTitle: 'The Perils of Pauline',\n firstMovieYear: 1914\n },\n {\n _id: 'Adventure',\n firstMovieTitle: 'Robin Hood',\n firstMovieYear: 1922\n },\n {\n _id: 'Animation',\n firstMovieTitle: 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n firstMovieYear: 1911\n },\n {\n _id: 'Biography',\n firstMovieTitle: 'Regeneration',\n firstMovieYear: 1915\n },\n {\n _id: 'Comedy',\n firstMovieTitle: 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n firstMovieYear: 1911\n }\n]\n" } ], "detail" : null, "name" : "Find the First Movie in Each Genre", @@ -2403,23 +2021,20 @@ "title" : "main" } ], "includes" : [ { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "67bf77021f47f44380f689b7365ed88688ae6e46", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/first/missing-values.snippet.missing-values-insert.js" + "blob" : "e5a3b6ea49e8fd899f4a56059f192768be591ad9", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/first/find-first-movie-per-genre-output.sh" }, { - "blob" : "442f6a1d5ed41beec15eb3ca2b523060f89dd4c3", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/first/missing-values.snippet.missing-values-query.js" + "blob" : "28b6162e3558124c8a8692631593e7495d52772e", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/first/find-first-movie-per-genre.js" }, { "blob" : "3ebb743ad8a602d6a99eab7b6c63162fdbe3c500", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/first/missing-values-output.sh" }, { - "blob" : "28b6162e3558124c8a8692631593e7495d52772e", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/first/find-first-movie-per-genre.js" + "blob" : "67bf77021f47f44380f689b7365ed88688ae6e46", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/first/missing-values.snippet.missing-values-insert.js" }, { - "blob" : "e5a3b6ea49e8fd899f4a56059f192768be591ad9", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/first/find-first-movie-per-genre-output.sh" + "blob" : "442f6a1d5ed41beec15eb3ca2b523060f89dd4c3", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/first/missing-values.snippet.missing-values-query.js" } ], "operator" : "first", "pageBlob" : "83ec8d6a7173ec8b9e2613dae6d82f74cb64a7e4", @@ -2433,12 +2048,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "fed744c8e9644efa57c70a452ac1665ec9fc8338c0ae5ca36fe25a6de0e29ec1", - "text" : "db.movies.aggregate( [\n {\n $match: { genres: \"Horror\" }\n },\n { \n $sort: { year: 1 }\n },\n {\n $group:\n {\n _id: \"Horror\",\n firstThreeMovies:\n {\n $firstN:\n {\n input: [ \"$title\", \"$year\" ],\n n: 3\n }\n }\n }\n }\n] )" + "sha256" : "a7f9293a59aada7a4edce07aa5c7b6d210e2e754b7e4c66dba3a94bd200c4a63", + "text" : "db.movies.aggregate( [\n {\n $match: { genres: \"Horror\" }\n },\n { \n $sort: { year: 1 }\n },\n {\n $group:\n {\n _id: \"Horror\",\n firstThreeMovies:\n {\n $firstN:\n {\n input: [ \"$title\", \"$year\" ],\n n: 3\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "ee19cc0f9f2ad7c5429ddd2890f07af57bbfeb913d021061a771f0555493ec18", - "text" : "[\n {\n _id: 'Horror',\n firstThreeMovies: [\n [ 'Dr. Jekyll and Mr. Hyde', 1931 ],\n [ 'Dracula', 1931 ],\n [ 'The Black Cat', 1934 ]\n ]\n }\n]" + "sha256" : "a36687ab139a14a431fe072f0333a0112bd28cf0192ff6df08292eabb2db4b73", + "text" : "[\n {\n _id: 'Horror',\n firstThreeMovies: [\n [ 'Dr. Jekyll and Mr. Hyde', 1931 ],\n [ 'Dracula', 1931 ],\n [ 'The Black Cat', 1934 ]\n ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -2448,12 +2063,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "bbe3c7797f9067866628f8b2a0a81bdfd3171a29b755fbc69ba6becf76c5564f", - "text" : "db.movies.aggregate( [\n {\n $unwind: \"$genres\"\n },\n {\n $sort: { year: 1 }\n },\n {\n $group:\n {\n _id: \"$genres\",\n movies:\n {\n $firstN:\n {\n input: [ \"$title\", \"$year\" ],\n n: 3\n }\n }\n }\n },\n { $sort: { _id: 1 } },\n { $limit: 5 }\n] )" + "sha256" : "0a412515cfef8fa06c272bc9c045b78afafd3cef15db773b102752447a9602eb", + "text" : "db.movies.aggregate( [\n {\n $unwind: \"$genres\"\n },\n {\n $sort: { year: 1 }\n },\n {\n $group:\n {\n _id: \"$genres\",\n movies:\n {\n $firstN:\n {\n input: [ \"$title\", \"$year\" ],\n n: 3\n }\n }\n }\n },\n { $sort: { _id: 1 } },\n { $limit: 5 }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "74d253a7fbd5d7a1e5c4293ae202a293fd51e8f7bc39e409ed84bc0593a123a4", - "text" : "[\n {\n _id: 'Action',\n movies: [\n [ 'The Perils of Pauline', 1914 ],\n [ 'From Hand to Mouth', 1919 ],\n [ \"For Heaven's Sake\", 1926 ]\n ]\n },\n {\n _id: 'Adventure',\n movies: [\n [ 'Robin Hood', 1922 ],\n [ 'Peter Pan', 1924 ],\n [ 'The Thief of Bagdad', 1924 ]\n ]\n },\n {\n _id: 'Animation',\n movies: [\n [\n 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n 1911\n ],\n [\n 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n 1911\n ],\n [ 'Gertie the Dinosaur', 1914 ]\n ]\n },\n {\n _id: 'Biography',\n movies: [ [ 'Regeneration', 1915 ], [ 'Salomè', 1922 ], [ 'Napoleon', 1927 ] ]\n },\n {\n _id: 'Comedy',\n movies: [\n [\n 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n 1911\n ],\n [\n 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n 1911\n ],\n [ 'Gertie the Dinosaur', 1914 ]\n ]\n }\n]" + "sha256" : "738a075201986f84261fee247365eb412f077353f785fd19e0d1724064aa28f7", + "text" : "[\n {\n _id: 'Action',\n movies: [\n [ 'The Perils of Pauline', 1914 ],\n [ 'From Hand to Mouth', 1919 ],\n [ \"For Heaven's Sake\", 1926 ]\n ]\n },\n {\n _id: 'Adventure',\n movies: [\n [ 'Robin Hood', 1922 ],\n [ 'Peter Pan', 1924 ],\n [ 'The Thief of Bagdad', 1924 ]\n ]\n },\n {\n _id: 'Animation',\n movies: [\n [\n 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n 1911\n ],\n [\n 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n 1911\n ],\n [ 'Gertie the Dinosaur', 1914 ]\n ]\n },\n {\n _id: 'Biography',\n movies: [ [ 'Regeneration', 1915 ], [ 'Salomè', 1922 ], [ 'Napoleon', 1927 ] ]\n },\n {\n _id: 'Comedy',\n movies: [\n [\n 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n 1911\n ],\n [\n 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n 1911\n ],\n [ 'Gertie the Dinosaur', 1914 ]\n ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -2463,12 +2078,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "1b8ee961f99aaff4d463ebf9d42cf3096bde048a11a1dc6da9ce2fe0a2a438ee", - "text" : "db.movies.aggregate([\n { $match: { rated: { $in: [\"G\", \"PG\", \"PG-13\", \"R\"] } } },\n { $sort: { title: 1 } },\n {\n $group:\n {\n _id: {\"rated\": \"$rated\"},\n movies:\n {\n $firstN:\n {\n input: \"$title\",\n n: { $cond: { if: { $eq: [\"$rated\", \"PG\"] }, then: 3, else: 1 } }\n }\n }\n }\n }\n] )" + "sha256" : "1927d5cd339a69d6675af92aecb78d3d8a4eddfcac3a425fea02b6619d942380", + "text" : "db.movies.aggregate([\n { $match: { rated: { $in: [\"G\", \"PG\", \"PG-13\", \"R\"] } } },\n { $sort: { title: 1 } },\n {\n $group:\n {\n _id: {\"rated\": \"$rated\"},\n movies:\n {\n $firstN:\n {\n input: \"$title\",\n n: { $cond: { if: { $eq: [\"$rated\", \"PG\"] }, then: 3, else: 1 } }\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "a234912e9c4f3bb95abc5c5852f0280db8cbde1aef6dae3f7727aa93c79e5065", - "text" : "[\n { _id: { rated: 'PG-13' }, movies: [ \"'night, Mother\" ] },\n {\n _id: { rated: 'PG' },\n movies: [ '*batteries not included', '...And God Created Woman', '1776' ]\n },\n { _id: { rated: 'G' }, movies: [ '101 Dalmatians' ] },\n { _id: { rated: 'R' }, movies: [ '$' ] }\n]" + "sha256" : "a1eb3580002ac6754afb03588f4c7af06972a7d6dfd282303e54585fab6220ea", + "text" : "[\n { _id: { rated: 'PG-13' }, movies: [ \"'night, Mother\" ] },\n {\n _id: { rated: 'PG' },\n movies: [ '*batteries not included', '...And God Created Woman', '1776' ]\n },\n { _id: { rated: 'G' }, movies: [ '101 Dalmatians' ] },\n { _id: { rated: 'R' }, movies: [ '$' ] }\n]\n" } ], "detail" : null, "owner" : null, @@ -2477,23 +2092,23 @@ "title" : "Set n Based on the Group Key" } ], "includes" : [ { - "blob" : "42d767d969b0e7373e01dfc49f32dc687c17e6a1", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/firstN/find-first-three-horror.js" - }, { - "blob" : "ccf640865c2bff734fa453341ccff14b6984fb49", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/firstN/find-first-three-horror-output.sh" + "blob" : "b8dd9d26fba260490495f0950e5edf7378fc5fe7", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/firstN/compute-n-based-on-group-key-output.sh" }, { - "blob" : "65a3972d583bbc4c883e3e66e106af98ce768301", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/firstN/find-first-three-across-genres.js" + "blob" : "675aa8a4b6c03ceda3f010adee1f26527adf2473", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/firstN/compute-n-based-on-group-key.js" }, { "blob" : "9c8e693788bc9e7bd4353e5eb8ceae85f738b29d", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/firstN/find-first-three-across-genres-output.sh" }, { - "blob" : "675aa8a4b6c03ceda3f010adee1f26527adf2473", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/firstN/compute-n-based-on-group-key.js" + "blob" : "65a3972d583bbc4c883e3e66e106af98ce768301", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/firstN/find-first-three-across-genres.js" }, { - "blob" : "b8dd9d26fba260490495f0950e5edf7378fc5fe7", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/firstN/compute-n-based-on-group-key-output.sh" + "blob" : "ccf640865c2bff734fa453341ccff14b6984fb49", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/firstN/find-first-three-horror-output.sh" + }, { + "blob" : "42d767d969b0e7373e01dfc49f32dc687c17e6a1", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/firstN/find-first-three-horror.js" } ], "operator" : "firstN", "pageBlob" : "0bc605aac52ba143b2d5c2f4be44cb68254dcafe", @@ -2512,13 +2127,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "bbf5c44a10e62dc8903402b5aaf9baf1323ef458", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null.yaml" - }, { - "blob" : "8623cf2a56423be1b837696232e1d7f56f12569c", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "floor", "pageBlob" : "4f037549c93c3869006bccb95c7dc15f9400fa19", "source" : { @@ -2529,48 +2138,21 @@ }, { "context" : "aggregation/expressions", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "c94be6aae60653f55ac62329910ceaa674cd7d54e1e0f8bad9d0babebb18c59c", - "text" : "db.players.aggregate( [\n { $addFields:\n {\n isFound:\n { $function:\n {\n body: function(name) { \n return hex_md5(name) == \"15b0a220baa16331e8d80e15367677ad\"\n },\n args: [ \"$name\" ],\n lang: \"js\"\n }\n },\n message: \n { $function:\n {\n body: function(name, scores) {\n let total = Array.sum(scores);\n return `Hello ${name}. Your total score is ${total}.`\n },\n args: [ \"$name\", \"$scores\"],\n lang: \"js\"\n }\n }\n }\n }\n] )" - }, { - "role" : "DATA", - "sha256" : "ec77fc93769aec890333efbd0246e80a32c16f66788c8bc898a241885efd8d76", - "text" : "db.players.insertMany([\n { _id: 1, name: \"Miss Cheevous\", scores: [ 10, 5, 10 ] },\n { _id: 2, name: \"Miss Ann Thrope\", scores: [ 10, 10, 10 ] },\n { _id: 3, name: \"Mrs. Eppie Delta \", scores: [ 9, 8, 8 ] }\n])" - }, { - "role" : "EXPECTED", - "sha256" : "9bffe694ed9d8ac47800b029a6044353c1dff89c99fb37e18287e6776ba4c50d", - "text" : "{ \"_id\" : 1, \"name\" : \"Miss Cheevous\", \"scores\" : [ 10, 5, 10 ], \"isFound\" : false, \"message\" : \"Hello Miss Cheevous. Your total score is 25.\" }\n{ \"_id\" : 2, \"name\" : \"Miss Ann Thrope\", \"scores\" : [ 10, 10, 10 ], \"isFound\" : true, \"message\" : \"Hello Miss Ann Thrope. Your total score is 30.\" }\n{ \"_id\" : 3, \"name\" : \"Mrs. Eppie Delta \", \"scores\" : [ 9, 8, 8 ], \"isFound\" : false, \"message\" : \"Hello Mrs. Eppie Delta . Your total score is 25.\" }" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "example1UsageExample", "title" : "Example 1: Usage Example" }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "0fe59af9d14cfc364bc0f6d1f91ca3e1dfa148b40fbc9061c4b884ff4001ec0a", - "text" : "db.players.find( { $where: function() { \n return (hex_md5(this.name) == \"15b0a220baa16331e8d80e15367677ad\") \n} } );" - }, { - "role" : "DATA", - "sha256" : "ec77fc93769aec890333efbd0246e80a32c16f66788c8bc898a241885efd8d76", - "text" : "db.players.insertMany([\n { _id: 1, name: \"Miss Cheevous\", scores: [ 10, 5, 10 ] },\n { _id: 2, name: \"Miss Ann Thrope\", scores: [ 10, 10, 10 ] },\n { _id: 3, name: \"Mrs. Eppie Delta \", scores: [ 9, 8, 8 ] }\n])" - }, { - "role" : "EXPECTED", - "sha256" : "f2f34f37f8c7468a569d77a62ddefe35854d0b9c5115f1ada01c9ca219470a2c", - "text" : "{ \"_id\" : 2, \"name\" : \"Miss Ann Thrope\", \"scores\" : [ 10, 10, 10 ] }" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "example2AlternativeToWhere", - "title" : "Example 2: Alternative to ``$where``" - } ], - "includes" : [ { - "blob" : "d8a337e97df48c367aa29183604d96eb1da16b38", - "path" : "content/manual/manual/source/includes/fact-6.0-js-engine-change.rst" + "title" : "Example 2: Alternative to $where" } ], + "includes" : [ ], "operator" : "function", "pageBlob" : "e733da17d7237a837059b9ed2c0bdf80fec7ca28", "source" : { @@ -2582,18 +2164,18 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/getField/queryFieldsThatContainPeriods", "status" : "OWNED", "stem" : null, - "title" : "Query Fields that Contain Periods (``.``)" + "title" : "Query Fields that Contain Periods (.)" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/getField/queryFieldsThatStartWithADollarSign", "status" : "OWNED", "stem" : null, - "title" : "Query Fields that Start with a Dollar Sign (``$``)" + "title" : "Query Fields that Start with a Dollar Sign ($)" }, { "blocks" : [ ], "detail" : null, @@ -2620,16 +2202,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "a65b631cdba796d7101918731b989c384d6d0b6d", - "path" : "content/manual/manual/source/includes/extracts-examples-eval.yaml" - }, { - "blob" : "32c1c5529385658b35c67c3674bd23475ac158f7", - "path" : "content/manual/manual/source/includes/extracts-parent-agg-comparison-expressions.yaml" - }, { - "blob" : "6334ee614bbd303972f29a2de21560f4534d64c9", - "path" : "content/manual/manual/source/includes/examples-create-inventory-2.rst" - } ], + "includes" : [ ], "operator" : "gt", "pageBlob" : "486d9b659b1d7a008d2f410816ee4762a344b552", "source" : { @@ -2647,16 +2220,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "a65b631cdba796d7101918731b989c384d6d0b6d", - "path" : "content/manual/manual/source/includes/extracts-examples-eval.yaml" - }, { - "blob" : "32c1c5529385658b35c67c3674bd23475ac158f7", - "path" : "content/manual/manual/source/includes/extracts-parent-agg-comparison-expressions.yaml" - }, { - "blob" : "6334ee614bbd303972f29a2de21560f4534d64c9", - "path" : "content/manual/manual/source/includes/examples-create-inventory-2.rst" - } ], + "includes" : [ ], "operator" : "gte", "pageBlob" : "b5e68917c9d1bddb52415d1dbce926315db3ef09", "source" : { @@ -2668,87 +2232,100 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "8de394aba1985c7995b8cd231a2d53feaedc015b1d89645c41a82ab2e216a4a4", - "text" : "db.files.aggregate( [\n {\n $project: {\n filename: 1,\n hash: {\n $hash: {\n input: \"$filename\",\n algorithm: \"sha256\"\n }\n }\n }\n }\n] )" - }, { "role" : "DATA", - "sha256" : "e4b92713d694ec4b6f5f40b75270fa16d80d47de915a90993b1f7401a8f050b5", - "text" : "db.files.insertMany( [\n { _id: 1, filename: \"report.pdf\" },\n { _id: 2, filename: \"archive.zip\" }\n] )" + "sha256" : "759d00513f2679c85423f94cce8ed735accad4eb292ae9118611b37a3a0c4744", + "text" : "db.files.insertMany( [\n { _id: 1, filename: \"report.pdf\" },\n { _id: 2, filename: \"archive.zip\" }\n] )\n" + }, { + "role" : "ACTION", + "sha256" : "09d2f90eb670de82d213112a58b046f528ad8b84b6079ed490fcbfd31b138e6c", + "text" : "db.files.aggregate( [\n {\n $project: {\n filename: 1,\n hash: {\n $hash: {\n input: \"$filename\",\n algorithm: \"sha256\"\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "7b33927922ed30b1faab97f1d2a911a52259c0f120a08cdec669ecb3a1ad0be5", - "text" : "[\n {\n _id: 1,\n filename: 'report.pdf',\n hash: Binary.createFromBase64('ZGbkUKFrd7hlxYKda2xW2fiSlWR1ZC2+uczENA/gGxU=', 0)\n },\n {\n _id: 2,\n filename: 'archive.zip',\n hash: Binary.createFromBase64('jsO6p+AcJW/43CrXux9Tpmq+hHLmCKPmqJjcARAsmVA=', 0)\n }\n]" + "sha256" : "cca3686d26521afe0fe3daea86957c5d72ecec80470130b7104f9cda8c9425bc", + "text" : "[\n {\n _id: 1,\n filename: 'report.pdf',\n hash: Binary.createFromBase64('ZGbkUKFrd7hlxYKda2xW2fiSlWR1ZC2+uczENA/gGxU=', 0)\n },\n {\n _id: 2,\n filename: 'archive.zip',\n hash: Binary.createFromBase64('jsO6p+AcJW/43CrXux9Tpmq+hHLmCKPmqJjcARAsmVA=', 0)\n }\n]\n" } ], - "detail" : null, + "detail" : "CALL_TARGET", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "hashAFieldValue", "title" : "Hash a Field Value" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "9d582447d4b111eea01c0b878206dcd4513b6a7afd75bad166c4a8963197eb23", - "text" : "db.aggregate( [\n { $documents: [ { val: \"hello\" } ] },\n {\n $project: {\n _id: 0,\n hash: {\n $hash: {\n input: \"$val\",\n algorithm: \"xxh64\"\n }\n }\n }\n }\n] )" - }, { "role" : "DATA", - "sha256" : "e4b92713d694ec4b6f5f40b75270fa16d80d47de915a90993b1f7401a8f050b5", - "text" : "db.files.insertMany( [\n { _id: 1, filename: \"report.pdf\" },\n { _id: 2, filename: \"archive.zip\" }\n] )" + "sha256" : "759d00513f2679c85423f94cce8ed735accad4eb292ae9118611b37a3a0c4744", + "text" : "db.files.insertMany( [\n { _id: 1, filename: \"report.pdf\" },\n { _id: 2, filename: \"archive.zip\" }\n] )\n" + }, { + "role" : "ACTION", + "sha256" : "e50d0738c4945d846f851527b3582d840eef91ec3984be9cad867532dd3499c2", + "text" : "db.aggregate( [\n { $documents: [ { val: \"hello\" } ] },\n {\n $project: {\n _id: 0,\n hash: {\n $hash: {\n input: \"$val\",\n algorithm: \"xxh64\"\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "ec787cfe5c2b840a766aea77a16984c0449afc389673b1875a70979c73c46246", - "text" : "[\n {\n hash: Binary.createFromBase64('JseCfYifbaM=', 0)\n }\n]" + "sha256" : "83bc33a6200ee5e6b8a0e688a95b6b360ab766b32ea5a43434a97a0a67c9e0ae", + "text" : "[\n {\n hash: Binary.createFromBase64('JseCfYifbaM=', 0)\n }\n]\n" } ], - "detail" : null, + "detail" : "COLLECTION_REQUIRED", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "hashALiteralString", "title" : "Hash a Literal String" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "4f532f97c9382b033d7431377dd30b88261bbe528e286f0d6228fc8be7c3729a", - "text" : "db.binaries.aggregate( [\n {\n $project: {\n hash: {\n $hash: {\n input: \"$data\",\n algorithm: \"sha256\"\n }\n }\n }\n }\n] )" + "role" : "DATA", + "sha256" : "759d00513f2679c85423f94cce8ed735accad4eb292ae9118611b37a3a0c4744", + "text" : "db.files.insertMany( [\n { _id: 1, filename: \"report.pdf\" },\n { _id: 2, filename: \"archive.zip\" }\n] )\n" }, { "role" : "DATA", - "sha256" : "75efd5b2729d4372a152223ccc9da9ec42de4de3e5d732a2caf02835fb9aaa00", - "text" : "db.binaries.insertMany( [\n { _id: 1, data: new BinData(0, \"aGVsbG8=\") }\n] )" + "sha256" : "39e7861abc8fa6aad8e281026234ff81a34eb8f508582fb8ca60712664d738d2", + "text" : "db.binaries.insertMany( [\n { _id: 1, data: new BinData(0, \"aGVsbG8=\") }\n] )\n" + }, { + "role" : "ACTION", + "sha256" : "5681c1da7726d2f54d74c4d6603f05ca7d59dfc05dd6525fea8e59afd5ad73de", + "text" : "db.binaries.aggregate( [\n {\n $project: {\n hash: {\n $hash: {\n input: \"$data\",\n algorithm: \"sha256\"\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "f618bbec9215757d6182656d3bbdec83adae706bd83878f1bc23a96a77aa761e", - "text" : "[\n {\n _id: 1,\n hash: Binary.createFromBase64('LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=', 0)\n }\n]" + "sha256" : "8bdc9c3d65d0dacd663384482a5a230306b87e365c461b3392e8b79332f9281e", + "text" : "[\n {\n _id: 1,\n hash: Binary.createFromBase64('LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=', 0)\n }\n]\n" } ], - "detail" : null, + "detail" : "CALL_TARGET", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "hashBinData", "title" : "Hash BinData" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "cfceb5ed92c348d43d5847f17f5236368a0be17a53fb549a32597d86c35fc637", - "text" : "db.aggregate( [\n {\n $documents: [\n { val: null },\n {}\n ]\n },\n {\n $project: {\n hash: {\n $hash: {\n input: \"$val\",\n algorithm: \"sha256\"\n }\n }\n }\n }\n] )" - }, { "role" : "DATA", - "sha256" : "e4b92713d694ec4b6f5f40b75270fa16d80d47de915a90993b1f7401a8f050b5", - "text" : "db.files.insertMany( [\n { _id: 1, filename: \"report.pdf\" },\n { _id: 2, filename: \"archive.zip\" }\n] )" + "sha256" : "759d00513f2679c85423f94cce8ed735accad4eb292ae9118611b37a3a0c4744", + "text" : "db.files.insertMany( [\n { _id: 1, filename: \"report.pdf\" },\n { _id: 2, filename: \"archive.zip\" }\n] )\n" + }, { + "role" : "ACTION", + "sha256" : "2ba9254fba5209a5e23bcad6e8ad84614d57d4292227265685e73f9985bad4b9", + "text" : "db.aggregate( [\n {\n $documents: [\n { val: null },\n {}\n ]\n },\n {\n $project: {\n hash: {\n $hash: {\n input: \"$val\",\n algorithm: \"sha256\"\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "c284fb34f7dc60750f798d7b33007f46764b279b0ad509970dfeefe056837e01", - "text" : "[\n {\n hash: null\n },\n {\n hash: null\n }\n]" + "sha256" : "7e71bb9d0f3aa42cb9ca7446d3f9f9e0e775b49120e41c8b55addac88c35ba7c", + "text" : "[\n {\n hash: null\n },\n {\n hash: null\n }\n]\n" } ], - "detail" : null, + "detail" : "COLLECTION_REQUIRED", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "nullOrMissingInput", "title" : "Null or Missing Input" } ], "includes" : [ { - "blob" : "e978e1fd097ca6b330ba2b61650f1ae95797ad0e", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hash/hash-field-value/load-data.js" + "blob" : "9079e02175adcdd0ace976d3c8df0af7e2d73980", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hash/hash-bindata/hash-bindata.js" + }, { + "blob" : "81dbc9e9af07dd57d120b7c7e5b65e713e1fe10a", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hash/hash-bindata/load-data.js" + }, { + "blob" : "ec15726fe17d833670f30f7efb6276fe9b106744", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hash/hash-bindata/output.sh" }, { "blob" : "8f551ac102f7d3426fc240593372cf742575a379", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hash/hash-field-value/hash-field-value.js" + }, { + "blob" : "e978e1fd097ca6b330ba2b61650f1ae95797ad0e", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hash/hash-field-value/load-data.js" }, { "blob" : "3a7e4c87021f19ed6b674699fdc59682cdd74617", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hash/hash-field-value/output.sh" @@ -2758,15 +2335,6 @@ }, { "blob" : "a54757addb6cafacfa9fac82b9f1792ba043a4be", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hash/hash-literal-string/output.sh" - }, { - "blob" : "81dbc9e9af07dd57d120b7c7e5b65e713e1fe10a", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hash/hash-bindata/load-data.js" - }, { - "blob" : "9079e02175adcdd0ace976d3c8df0af7e2d73980", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hash/hash-bindata/hash-bindata.js" - }, { - "blob" : "ec15726fe17d833670f30f7efb6276fe9b106744", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hash/hash-bindata/output.sh" }, { "blob" : "6184cc314e9fb15d205496dbfa37832f679074cd", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hash/null-missing/null-missing.js" @@ -2785,17 +2353,17 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "7bcdf560376121a6b5ad5e41b93768896ef6223ce994d678acd4d6e8ed8db222", - "text" : "db.files.aggregate( [\n {\n $project: {\n filename: 1,\n hexHash: {\n $hexHash: {\n input: \"$filename\",\n algorithm: \"sha256\"\n }\n }\n }\n }\n] )" - }, { "role" : "DATA", - "sha256" : "74d7e9a121da4ed5474ae8c7469037dcd1d739b088e8d102ccf50b496096f575", - "text" : "db.files.insertMany( [\n { _id: 1, filename: \"report.pdf\" }\n] )" + "sha256" : "4df53162ffc222e64af7ac6fda5aa71eb5e61869f4bb1a20bbcb2587ed17e0ec", + "text" : "db.files.insertMany( [\n { _id: 1, filename: \"report.pdf\" }\n] )\n" + }, { + "role" : "ACTION", + "sha256" : "8fc5731bc50813b01ab5fc36203b2ef709f50c833a22200b746736302de7861c", + "text" : "db.files.aggregate( [\n {\n $project: {\n filename: 1,\n hexHash: {\n $hexHash: {\n input: \"$filename\",\n algorithm: \"sha256\"\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "eb79065361019027c0b37882b25c9894bf925a7c3bb5a5d28d6a423044a177fc", - "text" : "[\n {\n _id: 1,\n filename: 'report.pdf',\n hexHash: '6466E450A16B77B865C5829D6B6C56D9F892956475642DBEB9CCC4340FE01B15'\n }\n]" + "sha256" : "1f452bc501983132f48ea9ed56add34d9b030dbd178a6f65a9d011ab23712364", + "text" : "[\n {\n _id: 1,\n filename: 'report.pdf',\n hexHash: '6466E450A16B77B865C5829D6B6C56D9F892956475642DBEB9CCC4340FE01B15'\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -2804,30 +2372,30 @@ "title" : "Hash a Field Value" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "5fcfd444f26e80581a0ea9955d299190ddfa6b55dc36082be43887d2fcca0649", - "text" : "db.aggregate( [\n {\n $documents: [\n { val: null },\n {}\n ]\n },\n {\n $project: {\n hexHash: {\n $hexHash: {\n input: \"$val\",\n algorithm: \"sha256\"\n }\n }\n }\n }\n] )" - }, { "role" : "DATA", - "sha256" : "74d7e9a121da4ed5474ae8c7469037dcd1d739b088e8d102ccf50b496096f575", - "text" : "db.files.insertMany( [\n { _id: 1, filename: \"report.pdf\" }\n] )" + "sha256" : "4df53162ffc222e64af7ac6fda5aa71eb5e61869f4bb1a20bbcb2587ed17e0ec", + "text" : "db.files.insertMany( [\n { _id: 1, filename: \"report.pdf\" }\n] )\n" + }, { + "role" : "ACTION", + "sha256" : "72aa1f312b38731adf4632f769ee1d52a3c926e3e6b77fedf6a8027e5b1c5e92", + "text" : "db.aggregate( [\n {\n $documents: [\n { val: null },\n {}\n ]\n },\n {\n $project: {\n hexHash: {\n $hexHash: {\n input: \"$val\",\n algorithm: \"sha256\"\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "09e104eec2f7a329154b86d2275d10c8113af4eecebd32251c42cc92235577f0", - "text" : "[\n {\n hexHash: null\n },\n {\n hexHash: null\n }\n]" + "sha256" : "1539bad788e66f11d93747650d4d116175272258b102407c50733c5ae478ecff", + "text" : "[\n {\n hexHash: null\n },\n {\n hexHash: null\n }\n]\n" } ], - "detail" : null, + "detail" : "COLLECTION_REQUIRED", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "nullOrMissingInput", "title" : "Null or Missing Input" } ], "includes" : [ { - "blob" : "58f5a6aa79682341066763a9db533254839a74e7", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hexHash/hash-field-value/load-data.js" - }, { "blob" : "ce9669d4f16bab216bb238664d2699af279069c3", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hexHash/hash-field-value/hash-field-value.js" + }, { + "blob" : "58f5a6aa79682341066763a9db533254839a74e7", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hexHash/hash-field-value/load-data.js" }, { "blob" : "d62a1328453cd5c37cc3565c22ecbcf0c43513fc", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/hexHash/hash-field-value/output.sh" @@ -2855,10 +2423,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - } ], + "includes" : [ ], "operator" : "hour", "pageBlob" : "2048ebf387a95d251230cd357738ebef116428f8", "source" : { @@ -2884,32 +2449,17 @@ "title" : "Multiple Input Expressions" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "9178747b76d53a2798a662794b32aee5bcfa3576", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/ifNull/multiple-input-output.sh" }, { - "blob" : "2058d30dbb1c8ddab21bcd845a9f945e666de394", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/ifNull/single-input.snippet.if-null-single-input.js" + "blob" : "3732ad5b795ce80cb6a2195130fa23d6c1677a1e", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/ifNull/multiple-input.snippet.if-null-multiple-input.js" }, { "blob" : "2e4cd6f4d9cca028a4c4c719f5c8e0b029866b85", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/ifNull/single-input-output.sh" }, { - "blob" : "3732ad5b795ce80cb6a2195130fa23d6c1677a1e", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/ifNull/multiple-input.snippet.if-null-multiple-input.js" - }, { - "blob" : "9178747b76d53a2798a662794b32aee5bcfa3576", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/ifNull/multiple-input-output.sh" + "blob" : "2058d30dbb1c8ddab21bcd845a9f945e666de394", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/ifNull/single-input.snippet.if-null-single-input.js" } ], "operator" : "ifNull", "pageBlob" : "cbf1037ba8c6b20e11f4c40f029b0d96483a7371", @@ -2929,14 +2479,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "229b18c565a0524bcb3687d5661fa8650a3c93a5", - "path" : "content/manual/manual/source/includes/sample-data-usage-singular.rst" + "blob" : "0530869fe4d15ee7edf0073261c9f61f072fe6ce", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/in/in-genre-output.sh" }, { "blob" : "f6315d7e5f73f0b638043103231bdfd91bf6e0af", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/in/in-genre.snippet.in-genre.js" - }, { - "blob" : "0530869fe4d15ee7edf0073261c9f61f072fe6ce", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/in/in-genre-output.sh" } ], "operator" : "in", "pageBlob" : "a9dd6e9fba080da2c2966af4c6b9775a3ba9758a", @@ -2967,13 +2514,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "c2e4b37daf4c7037b5b3f3339d23d1c4bc4674d4748b43410953ad629186b1ac", - "text" : "db.inventory.aggregate(\n [\n {\n $project:\n {\n byteLocation: { $indexOfBytes: [ \"$item\", \"foo\" ] },\n }\n }\n ]\n)" - }, { "role" : "DATA", "sha256" : "4eded75528a9a21af66ddd60a32e9bcce9fd987df85aaa272c69fe38d5a62a89", "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"foo\" },\n { _id: 2, item: \"fĂ³ofoo\" },\n { _id: 3, item: \"the foo bar\" },\n { _id: 4, item: \"hello world fĂ³o\" },\n { _id: 5, item: null },\n { _id: 6, amount: 3 }\n] )" + }, { + "role" : "ACTION", + "sha256" : "c2e4b37daf4c7037b5b3f3339d23d1c4bc4674d4748b43410953ad629186b1ac", + "text" : "db.inventory.aggregate(\n [\n {\n $project:\n {\n byteLocation: { $indexOfBytes: [ \"$item\", \"foo\" ] },\n }\n }\n ]\n)" }, { "role" : "EXPECTED", "sha256" : "996d56ae6187d674ff6c62dba1354d31fec936c2ee08783ace87eb9a2dbb1d02", @@ -3001,19 +2548,15 @@ "role" : "ACTION", "sha256" : "26abb3b56b8f489bcbc5c690066ffb31daee26b701dd4c5cda812edfac805970", "text" : "db.inventory.aggregate(\n [\n {\n $project:\n {\n cpLocation: { $indexOfCP: [ \"$item\", \"foo\" ] },\n }\n }\n ]\n)" - }, { - "role" : "DATA", - "sha256" : "b28db7a25933188f54eca38f35c83bcb0fd9c80c2f917a1ab5c432a6401e3a53", - "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"foo\" }\n { _id: 2, item: \"fĂ³ofoo\" }\n { _id: 3, item: \"the foo bar\" }\n { _id: 4, item: \"hello world fĂ³o\" }\n { _id: 5, item: null }\n { _id: 6, amount: 3 }\n] )" }, { "role" : "EXPECTED", "sha256" : "6f011b98850b56c89cb0541ff4a707617735e6186f9e9c57704535202a7736ce", "text" : "{ _id: 1, cpLocation: \"0\" }\n{ _id: 2, cpLocation: \"3\" }\n{ _id: 3, cpLocation: \"4\" }\n{ _id: 4, cpLocation: \"-1\" }\n{ _id: 5, cpLocation: null }\n{ _id: 6, cpLocation: null }" } ], - "detail" : null, + "detail" : "UNSUPPORTED_SETUP", "name" : "Find a Substring's Code Point Index", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "findASubstringSCodePointIndex", "title" : "main" } ], @@ -3035,13 +2578,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "1291ecdbc618596b976b913c86e6d95df3033b0b", - "path" : "content/manual/manual/source/includes/outputUnit-behavior.rst" - }, { - "blob" : "1f627588938ff10e40926a1d115ca2b466887318", - "path" : "content/manual/manual/source/includes/fact-timeseries-example-aggregation-book.rst" - } ], + "includes" : [ ], "operator" : "integral", "pageBlob" : "ee0921ad62013553214a3a2712021d4fd56a459f", "source" : { @@ -3059,10 +2596,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "fb7443cdd8dd6104b19a12acca96cb9208824776", - "path" : "content/manual/manual/source/includes/aggregation/fact-arrays-in-arguments.rst" - } ], + "includes" : [ ], "operator" : "isArray", "pageBlob" : "bd99bee2b18f6ec360398268a99e9770e6132974", "source" : { @@ -3074,13 +2608,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "e9e1f940738a3ff7d52e4ca3a18f3be2678aa7ec36032fc7caed24a372143204", - "text" : "db.sensors.aggregate([{ \n $addFields : { \n \"isNumber\" : { $isNumber : \"$reading\" },\n \"hasType\" : {$type : \"$reading\"} \n } \n}])" - }, { "role" : "DATA", "sha256" : "fd2385deb74a508071e80ce7fd39db5d53ce4c74634afa51edca9f08ac7cae87", "text" : "db.getSiblingDB(\"examples\").sensors.insertMany([\n\n { \"_id\" : 1, \"reading\" : Decimal128(\"26.0\") },\n { \"_id\" : 2, \"reading\" : Long(25) },\n { \"_id\" : 3, \"reading\" : Int32(24) },\n { \"_id\" : 4, \"reading\" : 24.0 },\n { \"_id\" : 5, \"reading\" : \"24\" },\n { \"_id\" : 6, \"reading\" : [ Decimal128(\"26\") ]}\n])" + }, { + "role" : "ACTION", + "sha256" : "12d9c17a7b01f272d1f89a3844717ecb73fb34e05b04ebd85f0771c658115d19", + "text" : "db.sensors.aggregate([{\n $addFields : {\n \"isNumber\" : { $isNumber : \"$reading\" },\n \"hasType\" : {$type : \"$reading\"}\n }\n}])" }, { "role" : "EXPECTED", "sha256" : "a61e539b39ea2d2d438ebc84fc3bc0ad622e07a25bb59500351d758c45c95b7c", @@ -3093,13 +2627,13 @@ "title" : "Use $isNumber to Check if a Field is Numeric" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "55b5a755dacfeed2e422c1cc2e3ea2106058198253dd7736c45622e16932f42d", - "text" : " db.getSiblingDB(\"examples\").grades.aggregate([\n {\n $addFields: {\n \"points\" : {\n $cond : {\n if : { $isNumber : \"$grade\" },\n then: \"$grade\" ,\n else: {\n $switch : {\n branches: [\n { case: {$eq : [\"$grade\" , \"A\"]}, then : 4.0 },\n { case: {$eq : [\"$grade\" , \"B\"]}, then : 3.0 },\n { case: {$eq : [\"$grade\" , \"C\"]}, then : 2.0 },\n { case: {$eq : [\"$grade\" , \"D\"]}, then : 1.0 },\n { case: {$eq : [\"$grade\" , \"F\"]}, then : 0.0 }\n ]\n }\n }\n }\n }\n }\n },\n {\n $group : {\n _id : \"$student_id\",\n GPA : {\n $avg : \"$points\"\n }\n }\n }\n])" - }, { "role" : "DATA", "sha256" : "9107665feb1d08bc89b3afd9444eb982a5bfed25c64f18755df0f8449852ada8", "text" : "db.getSiblingDB(\"examples\").grades.insertMany([\n {\n \"student_id\" : 457864153,\n \"class_id\" : \"01\",\n \"class_desc\" : \"Algebra\",\n \"grade\" : \"A\"\n },\n {\n \"student_id\" : 457864153,\n \"class_id\" : \"02\",\n \"class_desc\" : \"Chemistry\",\n \"grade\" : 3.0\n },\n {\n \"student_id\" : 978451637,\n \"class_id\" : \"03\",\n \"class_desc\" : \"Physics\",\n \"grade\" : \"C\"\n },\n {\n \"student_id\" : 978451637,\n \"class_id\" : \"04\",\n \"class_desc\" : \"English\",\n \"grade\" : 4.0\n }\n])" + }, { + "role" : "ACTION", + "sha256" : "55b5a755dacfeed2e422c1cc2e3ea2106058198253dd7736c45622e16932f42d", + "text" : " db.getSiblingDB(\"examples\").grades.aggregate([\n {\n $addFields: {\n \"points\" : {\n $cond : {\n if : { $isNumber : \"$grade\" },\n then: \"$grade\" ,\n else: {\n $switch : {\n branches: [\n { case: {$eq : [\"$grade\" , \"A\"]}, then : 4.0 },\n { case: {$eq : [\"$grade\" , \"B\"]}, then : 3.0 },\n { case: {$eq : [\"$grade\" , \"C\"]}, then : 2.0 },\n { case: {$eq : [\"$grade\" , \"D\"]}, then : 1.0 },\n { case: {$eq : [\"$grade\" , \"F\"]}, then : 0.0 }\n ]\n }\n }\n }\n }\n }\n },\n {\n $group : {\n _id : \"$student_id\",\n GPA : {\n $avg : \"$points\"\n }\n }\n }\n])" }, { "role" : "EXPECTED", "sha256" : "91ebb70e2afc08c926f37183baec1d428ad3ddca212e6bca17ad8e2cacd02871", @@ -3129,10 +2663,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - } ], + "includes" : [ ], "operator" : "isoDayOfWeek", "pageBlob" : "bc977cbb3222eb0dfe2d85b4365c5c9ed1e027f9", "source" : { @@ -3150,10 +2681,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - } ], + "includes" : [ ], "operator" : "isoWeek", "pageBlob" : "713976b3ead89c90caa26ca21681018e1a422005", "source" : { @@ -3171,10 +2699,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - } ], + "includes" : [ ], "operator" : "isoWeekYear", "pageBlob" : "67de6ce45f38991b4ccda859e070a79c4d197441", "source" : { @@ -3187,12 +2712,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "d405687abd3755d309ea59681b98811681fbf01d8bc954e367b83f4c04dc3ec2", - "text" : "db.movies.aggregate( [\n { $match: { year: { $type: \"int\" } } },\n { $sort: { year: 1, title: 1 } },\n { $unwind: \"$genres\" },\n {\n $group: {\n _id: \"$genres\",\n lastMovieTitle: { $last: \"$title\" },\n lastMovieYear: { $last: \"$year\" }\n }\n },\n { $sort: { _id: 1 } },\n { $limit: 5 }\n] )" + "sha256" : "e13e16c1f6b2543bd6075cd3d454e3fc4751561eb2db79a45dcffaac540dad49", + "text" : "db.movies.aggregate( [\n { $match: { year: { $type: \"int\" } } },\n { $sort: { year: 1, title: 1 } },\n { $unwind: \"$genres\" },\n {\n $group: {\n _id: \"$genres\",\n lastMovieTitle: { $last: \"$title\" },\n lastMovieYear: { $last: \"$year\" }\n }\n },\n { $sort: { _id: 1 } },\n { $limit: 5 }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "f25e5dfef43c90ca37eedfb58c83a3893128024c072c10925a00811216334757", - "text" : "[\n {\n _id: 'Action',\n lastMovieTitle: 'The Masked Saint',\n lastMovieYear: 2016\n },\n {\n _id: 'Adventure',\n lastMovieTitle: 'Wolf Totem',\n lastMovieYear: 2015\n },\n {\n _id: 'Animation',\n lastMovieTitle: 'World of Tomorrow',\n lastMovieYear: 2015\n },\n {\n _id: 'Biography',\n lastMovieTitle: 'The Masked Saint',\n lastMovieYear: 2016\n },\n {\n _id: 'Comedy',\n lastMovieTitle: \"You're Ugly Too\",\n lastMovieYear: 2015\n }\n]" + "sha256" : "5eebe5cdd5f3e2c0b1643343a7eab5cc46133d80d7872a9960ed6e9c2a849ca4", + "text" : "[\n {\n _id: 'Action',\n lastMovieTitle: 'The Masked Saint',\n lastMovieYear: 2016\n },\n {\n _id: 'Adventure',\n lastMovieTitle: 'Wolf Totem',\n lastMovieYear: 2015\n },\n {\n _id: 'Animation',\n lastMovieTitle: 'World of Tomorrow',\n lastMovieYear: 2015\n },\n {\n _id: 'Biography',\n lastMovieTitle: 'The Masked Saint',\n lastMovieYear: 2016\n },\n {\n _id: 'Comedy',\n lastMovieTitle: \"You're Ugly Too\",\n lastMovieYear: 2015\n }\n]\n" } ], "detail" : null, "name" : "Find the Last Movie in Each Genre", @@ -3202,14 +2727,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "739a670aec4e8155c7a1f87148faaeb9882ce4b0", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/last/find-last-movie-per-genre-output.sh" }, { "blob" : "f82b3f32c984d3252f751ec7fc9b1dfc52e4d7c1", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/last/find-last-movie-per-genre.js" - }, { - "blob" : "739a670aec4e8155c7a1f87148faaeb9882ce4b0", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/last/find-last-movie-per-genre-output.sh" } ], "operator" : "last", "pageBlob" : "68c30010273c09fc939a8bc67d91676ed4c4dac4", @@ -3223,12 +2745,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "0cd82be55085504a2b9bea875fe4a7402d7a847be15b5908ae6ba934753679a0", - "text" : "db.movies.aggregate( [\n {\n $match: { genres: \"Horror\", year: { $type: \"int\" } }\n },\n {\n $sort: { year: 1, title: 1 }\n },\n {\n $group:\n {\n _id: \"Horror\",\n lastThreeMovies:\n {\n $lastN:\n {\n input: [ \"$title\", \"$year\" ],\n n: 3\n }\n }\n }\n }\n] )" + "sha256" : "147961f1553503cbbb9c32eabcf95a23116c42fa0f0abb2837f535b4db944242", + "text" : "db.movies.aggregate( [\n {\n $match: { genres: \"Horror\", year: { $type: \"int\" } }\n },\n {\n $sort: { year: 1, title: 1 }\n },\n {\n $group:\n {\n _id: \"Horror\",\n lastThreeMovies:\n {\n $lastN:\n {\n input: [ \"$title\", \"$year\" ],\n n: 3\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "2de183c1f5a2a025f971b1ea650476508c91d7166a06129e2cb0559555fe21fd", - "text" : "[\n {\n _id: 'Horror',\n lastThreeMovies: [\n [ 'The Final Girls', 2015 ],\n [ 'The Hoarder', 2015 ],\n [ 'The Witch', 2015 ]\n ]\n }\n]" + "sha256" : "239d3c102f35637e7a4525a70b46b8f6f031dbda296b436204e76772429cc647", + "text" : "[\n {\n _id: 'Horror',\n lastThreeMovies: [\n [ 'The Final Girls', 2015 ],\n [ 'The Hoarder', 2015 ],\n [ 'The Witch', 2015 ]\n ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -3238,12 +2760,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "816e60b74187333e164975fc77168943ce1755d121d78031eb9c68da904d4383", - "text" : "db.movies.aggregate( [\n {\n $match: { year: { $type: \"int\" } }\n },\n {\n $unwind: \"$genres\"\n },\n {\n $sort: { year: 1, title: 1 }\n },\n {\n $group:\n {\n _id: \"$genres\",\n movies:\n {\n $lastN:\n {\n input: [ \"$title\", \"$year\" ],\n n: 3\n }\n }\n }\n },\n { $sort: { _id: 1 } },\n { $limit: 5 }\n] )" + "sha256" : "c2b6d3e7ce2a69d98d06f93775ac9fe52b13119ce45923c62b4c4f4e1ea0b85e", + "text" : "db.movies.aggregate( [\n {\n $match: { year: { $type: \"int\" } }\n },\n {\n $unwind: \"$genres\"\n },\n {\n $sort: { year: 1, title: 1 }\n },\n {\n $group:\n {\n _id: \"$genres\",\n movies:\n {\n $lastN:\n {\n input: [ \"$title\", \"$year\" ],\n n: 3\n }\n }\n }\n },\n { $sort: { _id: 1 } },\n { $limit: 5 }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "9b7a46364c33b56dd2999dacb9d1f9ff3ec3d760df126f1a6492d3aaf0eab271", - "text" : "[\n {\n _id: 'Action',\n movies: [\n [ 'War Pigs', 2015 ],\n [ 'Wolf Warrior', 2015 ],\n [ 'The Masked Saint', 2016 ]\n ]\n },\n {\n _id: 'Adventure',\n movies: [\n [ 'The SpongeBob Movie: Sponge Out of Water', 2015 ],\n [ 'Tomorrowland', 2015 ],\n [ 'Wolf Totem', 2015 ]\n ]\n },\n {\n _id: 'Animation',\n movies: [\n [ 'The Magic Mountain', 2015 ],\n [ 'The SpongeBob Movie: Sponge Out of Water', 2015 ],\n [ 'World of Tomorrow', 2015 ]\n ]\n },\n {\n _id: 'Biography',\n movies: [\n [ 'Twinsters', 2015 ],\n [ 'Whitney', 2015 ],\n [ 'The Masked Saint', 2016 ]\n ]\n },\n {\n _id: 'Comedy',\n movies: [\n [ 'Wondrous Boccaccio', 2015 ],\n [ 'World of Tomorrow', 2015 ],\n [ \"You're Ugly Too\", 2015 ]\n ]\n }\n]" + "sha256" : "ed1a555a80f211c978651d28d109655e4c316aaa6cc60a4f5cd2a320e3380d2c", + "text" : "[\n {\n _id: 'Action',\n movies: [\n [ 'War Pigs', 2015 ],\n [ 'Wolf Warrior', 2015 ],\n [ 'The Masked Saint', 2016 ]\n ]\n },\n {\n _id: 'Adventure',\n movies: [\n [ 'The SpongeBob Movie: Sponge Out of Water', 2015 ],\n [ 'Tomorrowland', 2015 ],\n [ 'Wolf Totem', 2015 ]\n ]\n },\n {\n _id: 'Animation',\n movies: [\n [ 'The Magic Mountain', 2015 ],\n [ 'The SpongeBob Movie: Sponge Out of Water', 2015 ],\n [ 'World of Tomorrow', 2015 ]\n ]\n },\n {\n _id: 'Biography',\n movies: [\n [ 'Twinsters', 2015 ],\n [ 'Whitney', 2015 ],\n [ 'The Masked Saint', 2016 ]\n ]\n },\n {\n _id: 'Comedy',\n movies: [\n [ 'Wondrous Boccaccio', 2015 ],\n [ 'World of Tomorrow', 2015 ],\n [ \"You're Ugly Too\", 2015 ]\n ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -3253,12 +2775,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "88f1f4040f502029ceca1a0573b6d65af6248d0185669c33138abacd10358972", - "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n year: { $type: \"int\" },\n title: { $regex: \"^[A-Za-z0-9]\" }\n }\n },\n { $sort: { title: 1 } },\n {\n $group:\n {\n _id: { rated: \"$rated\" },\n movies:\n {\n $lastN:\n {\n input: \"$title\",\n n: { $cond: { if: { $eq: [\"$rated\", \"PG\"] }, then: 3, else: 1 } }\n }\n }\n }\n },\n { $sort: { \"_id.rated\": 1 } }\n] )" + "sha256" : "0a613e01f8910d883b62dcfdf8b0ee6348bae6144322a6911555a4a3fe6cb791", + "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n year: { $type: \"int\" },\n title: { $regex: \"^[A-Za-z0-9]\" }\n }\n },\n { $sort: { title: 1 } },\n {\n $group:\n {\n _id: { rated: \"$rated\" },\n movies:\n {\n $lastN:\n {\n input: \"$title\",\n n: { $cond: { if: { $eq: [\"$rated\", \"PG\"] }, then: 3, else: 1 } }\n }\n }\n }\n },\n { $sort: { \"_id.rated\": 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "43b6c756ce69f88888ac0c16512445856f23fcf167f81535a4bbe097957d6899", - "text" : "[\n { _id: { rated: 'G' }, movies: [ 'Zambezia' ] },\n {\n _id: { rated: 'PG' },\n movies: [ 'Zoom', 'Zorro: The Gay Blade', 'Zulu Dawn' ]\n },\n { _id: { rated: 'PG-13' }, movies: [ 'xXx: State of the Union' ] },\n { _id: { rated: 'R' }, movies: [ 'eXistenZ' ] }\n]" + "sha256" : "5d34b30e8b7720a55604bde33163b7333692dc9593bb7d833f9469c45a4e772e", + "text" : "[\n { _id: { rated: 'G' }, movies: [ 'Zambezia' ] },\n {\n _id: { rated: 'PG' },\n movies: [ 'Zoom', 'Zorro: The Gay Blade', 'Zulu Dawn' ]\n },\n { _id: { rated: 'PG-13' }, movies: [ 'xXx: State of the Union' ] },\n { _id: { rated: 'R' }, movies: [ 'eXistenZ' ] }\n]\n" } ], "detail" : null, "owner" : null, @@ -3267,23 +2789,23 @@ "title" : "Set n Based on the Group Key" } ], "includes" : [ { - "blob" : "58d6c8cd1d2ab1720bc8b138f77e62ee7dd961a8", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/lastN/find-last-three-horror.js" - }, { - "blob" : "be2a8ace47be088e70b6064d4a8185786cf83437", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/lastN/find-last-three-horror-output.sh" + "blob" : "c5dcb6441553ded8dd7a70dc80ea438fbdae449c", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/lastN/compute-n-based-on-group-key-output.sh" }, { - "blob" : "0bc30db69660d807ec7fcde36cf10bff6b916a17", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/lastN/find-last-three-across-genres.js" + "blob" : "102a91d8f4d865544d23786489f4bc93ec407bdb", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/lastN/compute-n-based-on-group-key.js" }, { "blob" : "ca22d68917c58e9544c85370dab08cf79662a2e0", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/lastN/find-last-three-across-genres-output.sh" }, { - "blob" : "102a91d8f4d865544d23786489f4bc93ec407bdb", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/lastN/compute-n-based-on-group-key.js" + "blob" : "0bc30db69660d807ec7fcde36cf10bff6b916a17", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/lastN/find-last-three-across-genres.js" }, { - "blob" : "c5dcb6441553ded8dd7a70dc80ea438fbdae449c", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/lastN/compute-n-based-on-group-key-output.sh" + "blob" : "be2a8ace47be088e70b6064d4a8185786cf83437", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/lastN/find-last-three-horror-output.sh" + }, { + "blob" : "58d6c8cd1d2ab1720bc8b138f77e62ee7dd961a8", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/lastN/find-last-three-horror.js" } ], "operator" : "lastN", "pageBlob" : "98dafefa7632bb0e385d2997600ec03d4e304ae7", @@ -3327,13 +2849,7 @@ "stem" : null, "title" : "Use Multiple Fill Methods in a Single Stage" } ], - "includes" : [ { - "blob" : "5eaa730a9a6093d0faca440ed2568bdd9ef73cdb", - "path" : "content/manual/manual/source/includes/fact-linear-fill-description.rst" - }, { - "blob" : "8c226c41d6de20160444b523f83395577ed7bbe2", - "path" : "content/manual/manual/source/includes/example-multiple-fill-methods.rst" - } ], + "includes" : [ ], "operator" : "linearFill", "pageBlob" : "5b6480b278b537a1b1a4e385f9ce2ad5715edd8f", "source" : { @@ -3345,18 +2861,18 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/literal/treatAsALiteral", "status" : "OWNED", "stem" : null, - "title" : "Treat ``$`` as a Literal" + "title" : "Treat $ as a Literal" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/literal/projectANewFieldWithValue1", "status" : "OWNED", "stem" : null, - "title" : "Project a New Field with Value ``1``" + "title" : "Project a New Field with Value 1" } ], "includes" : [ ], "operator" : "literal", @@ -3376,16 +2892,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "8ba36fce905ce2036b2aa0ddd85bccf5d2b3b780", - "path" : "content/manual/manual/source/includes/agg-expression-double-unless-decimal-behavior.rst" - }, { - "blob" : "bbf5c44a10e62dc8903402b5aaf9baf1323ef458", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null.yaml" - }, { - "blob" : "8623cf2a56423be1b837696232e1d7f56f12569c", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "ln", "pageBlob" : "af46a969d1cfb9794c23df60d179953cb7b03ac4", "source" : { @@ -3410,13 +2917,7 @@ "stem" : null, "title" : "Use Multiple Fill Methods in a Single Stage" } ], - "includes" : [ { - "blob" : "c9c9d31a7c127d6a973d288385710564054fec86", - "path" : "content/manual/manual/source/includes/fact-locf-description.rst" - }, { - "blob" : "8c226c41d6de20160444b523f83395577ed7bbe2", - "path" : "content/manual/manual/source/includes/example-multiple-fill-methods.rst" - } ], + "includes" : [ ], "operator" : "locf", "pageBlob" : "c1a8ad56454881bb3e6aebc5df5e4bc7f34608ab", "source" : { @@ -3434,16 +2935,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "8ba36fce905ce2036b2aa0ddd85bccf5d2b3b780", - "path" : "content/manual/manual/source/includes/agg-expression-double-unless-decimal-behavior.rst" - }, { - "blob" : "bbf5c44a10e62dc8903402b5aaf9baf1323ef458", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null.yaml" - }, { - "blob" : "8623cf2a56423be1b837696232e1d7f56f12569c", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "log", "pageBlob" : "dfa289762d3d560966f3b46fe6853970a2f9e9f7", "source" : { @@ -3461,16 +2953,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "8ba36fce905ce2036b2aa0ddd85bccf5d2b3b780", - "path" : "content/manual/manual/source/includes/agg-expression-double-unless-decimal-behavior.rst" - }, { - "blob" : "bbf5c44a10e62dc8903402b5aaf9baf1323ef458", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null.yaml" - }, { - "blob" : "8623cf2a56423be1b837696232e1d7f56f12569c", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "log10", "pageBlob" : "f5eabb9995ef7f148c5033a3af86195c76e88b1f", "source" : { @@ -3488,16 +2971,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "a65b631cdba796d7101918731b989c384d6d0b6d", - "path" : "content/manual/manual/source/includes/extracts-examples-eval.yaml" - }, { - "blob" : "32c1c5529385658b35c67c3674bd23475ac158f7", - "path" : "content/manual/manual/source/includes/extracts-parent-agg-comparison-expressions.yaml" - }, { - "blob" : "6334ee614bbd303972f29a2de21560f4534d64c9", - "path" : "content/manual/manual/source/includes/lt-lte-sample-data.rst" - } ], + "includes" : [ ], "operator" : "lt", "pageBlob" : "44d808e3cffe42e86ce271d8cab87bbac8f7fbd5", "source" : { @@ -3515,16 +2989,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "a65b631cdba796d7101918731b989c384d6d0b6d", - "path" : "content/manual/manual/source/includes/extracts-examples-eval.yaml" - }, { - "blob" : "32c1c5529385658b35c67c3674bd23475ac158f7", - "path" : "content/manual/manual/source/includes/extracts-parent-agg-comparison-expressions.yaml" - }, { - "blob" : "6334ee614bbd303972f29a2de21560f4534d64c9", - "path" : "content/manual/manual/source/includes/lt-lte-sample-data.rst" - } ], + "includes" : [ ], "operator" : "lte", "pageBlob" : "29ae5212434b4823a529411fb22f1dafe53a3515", "source" : { @@ -3536,13 +3001,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "461e55ebeebca43925fb687cd5b71690c26bcf8372ae42f1401cef167b4b040b", - "text" : "db.inventory.aggregate([\n { $project: { item: 1, description: { $ltrim: { input: \"$description\" } } } }\n])" - }, { "role" : "DATA", "sha256" : "fbc4c0094bb172e14be2f3b3f0395c1c92e936ce4d0b1063d030a9ea2d3f7605", "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"ABC1\", quarter: \"13Q1\", description: \" product 1\" },\n { _id: 2, item: \"ABC2\", quarter: \"13Q4\", description: \"product 2 \\n The product is in stock. \\n\\n \" },\n { _id: 3, item: \"XYZ1\", quarter: \"14Q2\", description: null },\n] )" + }, { + "role" : "ACTION", + "sha256" : "461e55ebeebca43925fb687cd5b71690c26bcf8372ae42f1401cef167b4b040b", + "text" : "db.inventory.aggregate([\n { $project: { item: 1, description: { $ltrim: { input: \"$description\" } } } }\n])" }, { "role" : "EXPECTED", "sha256" : "505ac865bcd2a53d46cd1f848b1d4b334487f5d94477a20d8840ed48a29ccbe7", @@ -3555,13 +3020,7 @@ "stem" : "trimLeadingWhitespace", "title" : "main" } ], - "includes" : [ { - "blob" : "5b6497933c4c19e238a411142ae6e1299c6fc339", - "path" : "content/manual/manual/source/includes/list-table-trim-white-space.rst" - }, { - "blob" : "7f91e8f456a6fcb886f568ea04dd0966fe7f7f5d", - "path" : "content/manual/manual/source/includes/fact-trim-chars-length-limit.rst" - } ], + "includes" : [ ], "operator" : "ltrim", "pageBlob" : "7f9e608685609479b5adf030ce1b3e168be17344", "source" : { @@ -3588,12 +3047,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "36f4cfa7751c103e917416970cb1f4bcc47118011c9bdafe0ada1199ab2d73df", - "text" : "db.movies.aggregate( [\n {\n $match: { runtime: { $gt: 1000 } }\n },\n {\n $addFields: {\n genreScores: {\n $map: {\n input: \"$genres\",\n as: \"genre\",\n in: {\n $add: [\n { $multiply: [ { $strLenCP: \"$$genre\" }, 2 ] },\n 1\n ]\n }\n }\n }\n }\n },\n { $project: { _id: 0, title: 1, genres: 1, genreScores: 1 } },\n { $sort: { title: 1 } }\n] )" + "sha256" : "058c001f1ff1631f7f437fed07144f500e3d5f97e28ab6e73a40994fc1173b9a", + "text" : "db.movies.aggregate( [\n {\n $match: { runtime: { $gt: 1000 } }\n },\n {\n $addFields: {\n genreScores: {\n $map: {\n input: \"$genres\",\n as: \"genre\",\n in: {\n $add: [\n { $multiply: [ { $strLenCP: \"$$genre\" }, 2 ] },\n 1\n ]\n }\n }\n }\n }\n },\n { $project: { _id: 0, title: 1, genres: 1, genreScores: 1 } },\n { $sort: { title: 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "ed92d3c4396e1e4a6221fdb8617f5f2460050c0f315bcd4a3c8e9b03e565e1ca", - "text" : "[\n {\n genres: [ 'Documentary', 'History', 'Sport' ],\n title: 'Baseball',\n genreScores: [ 23, 15, 11 ]\n },\n {\n genres: [ 'Action', 'Adventure', 'Drama' ],\n title: 'Centennial',\n genreScores: [ 13, 19, 11 ]\n }\n]" + "sha256" : "63f4eeca31153d08902140587b120876bdaec257e29805fe0e26b483ea35f279", + "text" : "[\n {\n genres: [ 'Documentary', 'History', 'Sport' ],\n title: 'Baseball',\n genreScores: [ 23, 15, 11 ]\n },\n {\n genres: [ 'Action', 'Adventure', 'Drama' ],\n title: 'Centennial',\n genreScores: [ 13, 19, 11 ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -3603,12 +3062,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "735ca895bafed68390e12a38bb7ec971fe1d9d37be0af8e14a0465056141f60f", - "text" : "db.movies.aggregate( [\n {\n $match: { runtime: { $gt: 1000 } }\n },\n {\n $project: {\n _id: 0,\n title: 1,\n rankedGenres: {\n $map: {\n input: \"$genres\",\n as: \"genre\",\n arrayIndexAs: \"myIndex\",\n in: {\n genre: \"$$genre\",\n rank: { $add: [ \"$$myIndex\", 1 ] },\n isPrimary: { $eq: [ \"$$myIndex\", 0 ] }\n }\n }\n }\n }\n },\n { $sort: { title: 1 } }\n] )" + "sha256" : "55ad81dbc615559ff57423204c9c6ef7868201177faca4d01bfe1f7a0adf7a39", + "text" : "db.movies.aggregate( [\n {\n $match: { runtime: { $gt: 1000 } }\n },\n {\n $project: {\n _id: 0,\n title: 1,\n rankedGenres: {\n $map: {\n input: \"$genres\",\n as: \"genre\",\n arrayIndexAs: \"myIndex\",\n in: {\n genre: \"$$genre\",\n rank: { $add: [ \"$$myIndex\", 1 ] },\n isPrimary: { $eq: [ \"$$myIndex\", 0 ] }\n }\n }\n }\n }\n },\n { $sort: { title: 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "1890d36577a57f017426175b897b1e6c55ccf5bf3e8eaf9f44bb9e5aebd95e77", - "text" : "[\n {\n title: 'Baseball',\n rankedGenres: [\n { genre: 'Documentary', rank: 1, isPrimary: true },\n { genre: 'History', rank: 2, isPrimary: false },\n { genre: 'Sport', rank: 3, isPrimary: false }\n ]\n },\n {\n title: 'Centennial',\n rankedGenres: [\n { genre: 'Action', rank: 1, isPrimary: true },\n { genre: 'Adventure', rank: 2, isPrimary: false },\n { genre: 'Drama', rank: 3, isPrimary: false }\n ]\n }\n]" + "sha256" : "997cdef40170822dcaa6005922d34c3a5d84bbcf6f598a3a1fab8683e7d6fc2d", + "text" : "[\n {\n title: 'Baseball',\n rankedGenres: [\n { genre: 'Documentary', rank: 1, isPrimary: true },\n { genre: 'History', rank: 2, isPrimary: false },\n { genre: 'Sport', rank: 3, isPrimary: false }\n ]\n },\n {\n title: 'Centennial',\n rankedGenres: [\n { genre: 'Action', rank: 1, isPrimary: true },\n { genre: 'Adventure', rank: 2, isPrimary: false },\n { genre: 'Drama', rank: 3, isPrimary: false }\n ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -3618,73 +3077,49 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "06a8325a8625df8885d0ff5b3f794c1ac877008f2d53ce96b47b708c24bfb6e6", - "text" : "db.movies.aggregate( [\n {\n $match: { runtime: { $gt: 1000 } }\n },\n {\n $project: {\n _id: 0,\n title: 1,\n rankedGenres: {\n $map: {\n input: \"$genres\",\n as: \"genre\",\n in: {\n genre: \"$$genre\",\n rank: { $add: [ \"$$IDX\", 1 ] },\n isPrimary: { $eq: [ \"$$IDX\", 0 ] }\n }\n }\n }\n }\n },\n { $sort: { title: 1 } }\n] )" + "sha256" : "6ce88d5280238d2d3a5fe4b07542a8771bdeba4ea634be9c781a8543ce6f1d8e", + "text" : "db.movies.aggregate( [\n {\n $match: { runtime: { $gt: 1000 } }\n },\n {\n $project: {\n _id: 0,\n title: 1,\n rankedGenres: {\n $map: {\n input: \"$genres\",\n as: \"genre\",\n in: {\n genre: \"$$genre\",\n rank: { $add: [ \"$$IDX\", 1 ] },\n isPrimary: { $eq: [ \"$$IDX\", 0 ] }\n }\n }\n }\n }\n },\n { $sort: { title: 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "1890d36577a57f017426175b897b1e6c55ccf5bf3e8eaf9f44bb9e5aebd95e77", - "text" : "[\n {\n title: 'Baseball',\n rankedGenres: [\n { genre: 'Documentary', rank: 1, isPrimary: true },\n { genre: 'History', rank: 2, isPrimary: false },\n { genre: 'Sport', rank: 3, isPrimary: false }\n ]\n },\n {\n title: 'Centennial',\n rankedGenres: [\n { genre: 'Action', rank: 1, isPrimary: true },\n { genre: 'Adventure', rank: 2, isPrimary: false },\n { genre: 'Drama', rank: 3, isPrimary: false }\n ]\n }\n]" + "sha256" : "997cdef40170822dcaa6005922d34c3a5d84bbcf6f598a3a1fab8683e7d6fc2d", + "text" : "[\n {\n title: 'Baseball',\n rankedGenres: [\n { genre: 'Documentary', rank: 1, isPrimary: true },\n { genre: 'History', rank: 2, isPrimary: false },\n { genre: 'Sport', rank: 3, isPrimary: false }\n ]\n },\n {\n title: 'Centennial',\n rankedGenres: [\n { genre: 'Action', rank: 1, isPrimary: true },\n { genre: 'Adventure', rank: 2, isPrimary: false },\n { genre: 'Drama', rank: 3, isPrimary: false }\n ]\n }\n]\n" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", "stem" : "useIdxToAccessTheIndex", - "title" : "Use ``$$IDX`` to Access the Index" + "title" : "Use $$IDX to Access the Index" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "9a1cc4f06a0eb57ad2f38108c43274e218115f4e", - "path" : "content/manual/manual/source/includes/aggregation/null-input-behavior.rst" - }, { - "blob" : "89ca5380b16550b123b1b89173ff2450bfd4386f", - "path" : "content/manual/manual/source/includes/aggregation/non-array-input-error.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "2fdfeda0983550843de7b5305cf2f4a7453e7511", - "path" : "content/manual/manual/source/includes/IDX-use.rst" - }, { - "blob" : "74dd3d0821fd1c007a2f70c012a52076b2310203", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/add-to-each-element.snippet.add-to-each-element.js" - }, { "blob" : "add4e32831e50cd5ce8d42ed4833f58db40bd980", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/add-to-each-element-output.sh" }, { - "blob" : "4141dc7552e0ddc0aa8a717f81c5a58e9209b84b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/truncate-each-element.snippet.truncate-each-element.js" + "blob" : "74dd3d0821fd1c007a2f70c012a52076b2310203", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/add-to-each-element.snippet.add-to-each-element.js" }, { - "blob" : "77a4bacc01229bc277ee1bf5e920a888dd837f42", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/truncate-each-element-output.sh" + "blob" : "89b6d81ac29600abd611123daa1ca16125842f30", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/arithmetic-operators-output.sh" }, { "blob" : "345b8854a773017869790bb33474b157e10915a3", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/arithmetic-operators.snippet.arithmetic-operators.js" }, { - "blob" : "89b6d81ac29600abd611123daa1ca16125842f30", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/arithmetic-operators-output.sh" + "blob" : "9a6a94de52ac19550d7040e8247158fd0803b707", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/array-index-as-output.sh" }, { "blob" : "3d2c31f4d72837514aacfb05eb3e7ec1ff5aff39", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/array-index-as.snippet.array-index-as.js" }, { "blob" : "9a6a94de52ac19550d7040e8247158fd0803b707", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/array-index-as-output.sh" + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/idx-variable-output.sh" }, { "blob" : "d1385cb5a548faf626065de24c3c11ba1edcdcec", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/idx-variable.snippet.idx-variable.js" }, { - "blob" : "9a6a94de52ac19550d7040e8247158fd0803b707", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/idx-variable-output.sh" + "blob" : "77a4bacc01229bc277ee1bf5e920a888dd837f42", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/truncate-each-element-output.sh" + }, { + "blob" : "4141dc7552e0ddc0aa8a717f81c5a58e9209b84b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/map/truncate-each-element.snippet.truncate-each-element.js" } ], "operator" : "map", "pageBlob" : "e32fcad0e5cdb1baa3cfe863b23e04342fc157c3", @@ -3693,46 +3128,17 @@ "path" : "content/manual/manual/source/reference/operator/aggregation/map.txt", "relation" : "AT_ORIGIN" } - }, { - "context" : "aggregation/expressions", - "examples" : [ ], - "includes" : [ { - "blob" : "ce381146b5f35e7b7080a5737e773efdb08b637e", - "path" : "content/manual/manual/source/includes/expressions/max/result-type.rst" - }, { - "blob" : "cd44820ec969131700bcf953f0b02901b3fd53a0", - "path" : "content/manual/manual/source/includes/expressions/max/null-missing-values.rst" - }, { - "blob" : "97711bc7b418bb547027b376cad61271651d4425", - "path" : "content/manual/manual/source/includes/aggregate-max-min-equal-values.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "f6338daf02f9f454035440418023f286aafdbadf", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/max/max-by-rating.js" - }, { - "blob" : "1186551853339190ad29ce6ee1990f16992d9067", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/max/max-by-rating-output.sh" - } ], - "operator" : "max", - "pageBlob" : "a74099344a4eda0d30e74744e1eaab6a87672d36", - "source" : { - "commit" : "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", - "path" : "content/manual/manual/source/reference/operator/aggregation/max.txt", - "relation" : "AT_ORIGIN" - } }, { "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "3536bf6ff1178c97c8c038517a02eae9717979842dc01f177336b994ce503ebd", - "text" : "db.movies.aggregate( [\n {\n $match: {\n year: 1999,\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group: {\n _id: 1999,\n topThreeRatings: {\n $maxN: {\n input: \"$imdb.rating\",\n n: 3\n }\n }\n }\n }\n] )" + "sha256" : "a57561e1f1f819768d1d55d91513310a6ebad1365e810717dbc5f992f7790ac0", + "text" : "db.movies.aggregate( [\n {\n $match: {\n year: 1999,\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group: {\n _id: 1999,\n topThreeRatings: {\n $maxN: {\n input: \"$imdb.rating\",\n n: 3\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "5bb9f6b9a2c806386ed5fdcb476f534fe2cab562c9e71b9abd46c61caaf0852b", - "text" : "[ { _id: 1999, topThreeRatings: [ 8.9, 8.7, 8.7 ] } ]" + "sha256" : "ae0a461780597ad77c01a1e245e225e631fa9f39a24eedfd61b71cc4a6d94335", + "text" : "[ { _id: 1999, topThreeRatings: [ 8.9, 8.7, 8.7 ] } ]\n" } ], "detail" : null, "owner" : null, @@ -3742,12 +3148,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "8037a39127542cfffbbba0b8fb7f4cfeb1a4fc31e159d7f655e490b5cdda2b16", - "text" : "db.movies.aggregate( [\n {\n $match: {\n year: { $in: [ 1999, 2000, 2001 ] },\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group: {\n _id: \"$year\",\n topThreeRatings: {\n $maxN: {\n input: \"$imdb.rating\",\n n: 3\n }\n }\n }\n },\n { $sort: { _id: 1 } }\n] )" + "sha256" : "1f6d94fb8873c5e7514b13433d3ddde88981d455dcbcb74ae69e29c4c4e04844", + "text" : "db.movies.aggregate( [\n {\n $match: {\n year: { $in: [ 1999, 2000, 2001 ] },\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group: {\n _id: \"$year\",\n topThreeRatings: {\n $maxN: {\n input: \"$imdb.rating\",\n n: 3\n }\n }\n }\n },\n { $sort: { _id: 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "39b7267ee98b533dda48177fe25a016fb9a19f24a7c3a6ba06374be512a9766d", - "text" : "[\n { _id: 1999, topThreeRatings: [ 8.9, 8.7, 8.7 ] },\n { _id: 2000, topThreeRatings: [ 8.5, 8.5, 8.5 ] },\n { _id: 2001, topThreeRatings: [ 9.6, 9.2, 8.8 ] }\n]" + "sha256" : "290b5465a8f3460943dc7d586de7412ac1d36b788d70ee94b33ebb8b70114949", + "text" : "[\n { _id: 1999, topThreeRatings: [ 8.9, 8.7, 8.7 ] },\n { _id: 2000, topThreeRatings: [ 8.5, 8.5, 8.5 ] },\n { _id: 2001, topThreeRatings: [ 9.6, 9.2, 8.8 ] }\n]\n" } ], "detail" : null, "owner" : null, @@ -3757,12 +3163,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "894b136a6e0230d85d8da3cff93291d24c2537c7348b3c2b3d3304e39a626ada", - "text" : "db.movies.aggregate( [\n {\n $match: {\n year: { $in: [ 1999, 2000, 2001 ] },\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group: {\n _id: { year: \"$year\" },\n topRatedMovies: {\n $maxN: {\n input: \"$imdb.rating\",\n n: { $cond: {\n if: { $eq: [ \"$year\", 2001 ] },\n then: 3,\n else: 1\n } }\n }\n }\n }\n },\n { $sort: { \"_id.year\": 1 } }\n] )" + "sha256" : "1415e232b354964396604b971c3415582432359e72a57c5ec5cbf352d2180139", + "text" : "db.movies.aggregate( [\n {\n $match: {\n year: { $in: [ 1999, 2000, 2001 ] },\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group: {\n _id: { year: \"$year\" },\n topRatedMovies: {\n $maxN: {\n input: \"$imdb.rating\",\n n: { $cond: {\n if: { $eq: [ \"$year\", 2001 ] },\n then: 3,\n else: 1\n } }\n }\n }\n }\n },\n { $sort: { \"_id.year\": 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "211fe3cf81fb541be57456bb2c90e9da7e4cc62ed9b28f7a19f5188f29c2e75c", - "text" : "[\n { _id: { year: 1999 }, topRatedMovies: [ 8.9 ] },\n { _id: { year: 2000 }, topRatedMovies: [ 8.5 ] },\n { _id: { year: 2001 }, topRatedMovies: [ 9.6, 9.2, 8.8 ] }\n]" + "sha256" : "fee1ee7378d3ba844f46dc02c94dd71d397c1f5020a0cca7bfd7597cd8e04292", + "text" : "[\n { _id: { year: 1999 }, topRatedMovies: [ 8.9 ] },\n { _id: { year: 2000 }, topRatedMovies: [ 8.5 ] },\n { _id: { year: 2001 }, topRatedMovies: [ 9.6, 9.2, 8.8 ] }\n]\n" } ], "detail" : null, "owner" : null, @@ -3771,29 +3177,23 @@ "title" : "Set n Based on the Group Key" } ], "includes" : [ { - "blob" : "fba9e311889d4f7ef12a9a04d57039dbc28a653b", - "path" : "content/manual/manual/source/includes/agg-expression-bson-order-return-behavior.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "ca4358a94f8ca122903f755ddd83e0d1c08358ea", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/maxN/compute-n-based-on-group-key-output.sh" }, { - "blob" : "63eb656363efeec93dc1eb9817ab0fffba79d983", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/maxN/find-top-three-1999.js" + "blob" : "cc7760180f7924a31a1b677c18cc92ccd7b7a17f", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/maxN/compute-n-based-on-group-key.js" }, { "blob" : "2ef52023b0aacf501ac41896f3dc642e75f8bb18", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/maxN/find-top-three-1999-output.sh" }, { - "blob" : "d18cc5ce27ca1994dafb4fa001e4d7540f45a63d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/maxN/find-top-three-across-years.js" + "blob" : "63eb656363efeec93dc1eb9817ab0fffba79d983", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/maxN/find-top-three-1999.js" }, { "blob" : "27431ee2456fc5f5b6f36c5d5c946b333f820986", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/maxN/find-top-three-across-years-output.sh" }, { - "blob" : "cc7760180f7924a31a1b677c18cc92ccd7b7a17f", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/maxN/compute-n-based-on-group-key.js" - }, { - "blob" : "ca4358a94f8ca122903f755ddd83e0d1c08358ea", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/maxN/compute-n-based-on-group-key-output.sh" + "blob" : "d18cc5ce27ca1994dafb4fa001e4d7540f45a63d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/maxN/find-top-three-across-years.js" } ], "operator" : "maxN", "pageBlob" : "cf1200c4cd68051729b66c1e31462cd0cf6d1b1a", @@ -3807,12 +3207,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "43f4465048f9e85efd325217402ce4bd451023d3c6b10224558e315a26ae2e16", - "text" : "db.movies.aggregate( [\n {\n $match: {\n title: { $in: [ \"The Godfather\", \"Spirited Away\", \"The Dark Knight\" ] }\n }\n },\n {\n $addFields: {\n topTwoCast: { $maxN: { n: 2, input: \"$cast\" } }\n }\n },\n {\n $project: {\n _id: 0,\n title: 1,\n cast: 1,\n topTwoCast: 1\n }\n },\n {\n $sort: { title: 1 }\n }\n] )" + "sha256" : "8f413a1f4dd1e0b75d78ff4e98a813b8f6b786c38b4993c35a72d5f09d36cffe", + "text" : "db.movies.aggregate( [\n {\n $match: {\n title: { $in: [ \"The Godfather\", \"Spirited Away\", \"The Dark Knight\" ] }\n }\n },\n {\n $addFields: {\n topTwoCast: { $maxN: { n: 2, input: \"$cast\" } }\n }\n },\n {\n $project: {\n _id: 0,\n title: 1,\n cast: 1,\n topTwoCast: 1\n }\n },\n {\n $sort: { title: 1 }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "2bcbfebf81e7629d820f5229a29f8035f2fb78163c1f18163a27c286e5e98cd8", - "text" : "[\n {\n title: 'Spirited Away',\n cast: [ 'Rumi Hiiragi', 'Miyu Irino', 'Mari Natsuki', 'Takashi Naitè' ],\n topTwoCast: [ 'Takashi Naitè', 'Rumi Hiiragi' ]\n },\n {\n title: 'The Dark Knight',\n cast: [ 'Christian Bale', 'Heath Ledger', 'Aaron Eckhart', 'Michael Caine' ],\n topTwoCast: [ 'Michael Caine', 'Heath Ledger' ]\n },\n {\n title: 'The Godfather',\n cast: [ 'Marlon Brando', 'Al Pacino', 'James Caan', 'Richard S. Castellano' ],\n topTwoCast: [ 'Richard S. Castellano', 'Marlon Brando' ]\n }\n]" + "sha256" : "ed3ed9fa7bb320123ed211bb452fa85d7de966c91a01436ec73f264ffb70662e", + "text" : "[\n {\n title: 'Spirited Away',\n cast: [ 'Rumi Hiiragi', 'Miyu Irino', 'Mari Natsuki', 'Takashi Naitè' ],\n topTwoCast: [ 'Takashi Naitè', 'Rumi Hiiragi' ]\n },\n {\n title: 'The Dark Knight',\n cast: [ 'Christian Bale', 'Heath Ledger', 'Aaron Eckhart', 'Michael Caine' ],\n topTwoCast: [ 'Michael Caine', 'Heath Ledger' ]\n },\n {\n title: 'The Godfather',\n cast: [ 'Marlon Brando', 'Al Pacino', 'James Caan', 'Richard S. Castellano' ],\n topTwoCast: [ 'Richard S. Castellano', 'Marlon Brando' ]\n }\n]\n" } ], "detail" : null, "name" : "Find the Top Two Cast Members", @@ -3822,14 +3222,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "df1b7d32b15171b4e6949f9640940589424b3bc4", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/maxN/top-two-cast-members-output.sh" }, { "blob" : "a778bdfc8587a192944c5a7323fd49f2590aa7e2", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/maxN/top-two-cast-members.js" - }, { - "blob" : "df1b7d32b15171b4e6949f9640940589424b3bc4", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/maxN/top-two-cast-members-output.sh" } ], "operator" : "maxN-array-element", "pageBlob" : "4351c1c52f41b27c5d963e1106567f95c3bfd32e", @@ -3843,12 +3240,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "1c5ec50e7061ef69eb7cc7582c7b25b643d55fa416c29202aab8b4a545555737", - "text" : "db.movies.aggregate( [\n {\n $match: {\n genres: \"Action\",\n year: { $gte: 2000, $lte: 2004 },\n \"imdb.rating\": { $gt: 0 }\n }\n },\n {\n $group: {\n _id: \"$year\",\n medianRating: {\n $median: {\n input: \"$imdb.rating\",\n method: \"approximate\"\n }\n }\n }\n },\n { $sort: { _id: 1 } }\n] )" + "sha256" : "188ea803f7e116fa0d014b50c932d5ee561af4fbd905d8af7acab77b7068a2c8", + "text" : "db.movies.aggregate( [\n {\n $match: {\n genres: \"Action\",\n year: { $gte: 2000, $lte: 2004 },\n \"imdb.rating\": { $gt: 0 }\n }\n },\n {\n $group: {\n _id: \"$year\",\n medianRating: {\n $median: {\n input: \"$imdb.rating\",\n method: \"approximate\"\n }\n }\n }\n },\n { $sort: { _id: 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "7d615c68cc77d83af4164bdcd020ae6674aac766df91a511b779665667432a0b", - "text" : "[\n { _id: 2000, medianRating: 6.4 },\n { _id: 2001, medianRating: 6.4 },\n { _id: 2002, medianRating: 6.2 },\n { _id: 2003, medianRating: 6.4 },\n { _id: 2004, medianRating: 6.5 }\n]" + "sha256" : "9f7341eb770cf0820a7d41ae04aa61aa8c5f0c2f3fbdbb193de6ff982fae34a4", + "text" : "[\n { _id: 2000, medianRating: 6.4 },\n { _id: 2001, medianRating: 6.4 },\n { _id: 2002, medianRating: 6.2 },\n { _id: 2003, medianRating: 6.4 },\n { _id: 2004, medianRating: 6.5 }\n]\n" } ], "detail" : null, "name" : "Calculate the Median Rating by Year", @@ -3858,17 +3255,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "462d31b7d4eb2037b375d92074b31336dfc5bd01", - "path" : "content/manual/manual/source/includes/aggregation/fact-return-median-accumulator.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "1055e3b8616cbed7199d8fed3418d695b8a9794f", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/median/median-rating-by-year-output.sh" }, { "blob" : "ad56e94c3f07fc46b9342cf319c92c45129bf6a7", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/median/median-rating-by-year.js" - }, { - "blob" : "1055e3b8616cbed7199d8fed3418d695b8a9794f", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/median/median-rating-by-year-output.sh" } ], "operator" : "median", "pageBlob" : "51fbb9e2791e9a6db7333b2b04e5d777af77d308", @@ -3881,17 +3272,17 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "fc0dd9b6a18d455f53bf804fd1baf4f6932813f3e46264c38867a4680d8a1509", - "text" : "db.movieReviews.aggregate( [\n {\n $group: {\n _id: \"$title\",\n allRatings: { $mergeObjects: \"$data\" }\n }\n },\n { $sort: { _id: 1 } }\n] )" - }, { "role" : "DATA", - "sha256" : "55dfcdfada5cc24e1d0e7959be92ccaa9faaa202e5edd5f8159706b4b7107f15", - "text" : "db.movieReviews.insertMany( [\n {\n title: \"Galactic Odyssey\",\n source: \"filmCritic\",\n data: { rating: 8.1, votes: 1482903 }\n },\n {\n title: \"Galactic Odyssey\",\n source: \"viewerVault\",\n data: { tomatometer: 79, audienceScore: 85 }\n },\n {\n title: \"Neon Horizon\",\n source: \"filmCritic\",\n data: { rating: 7.4, votes: 983201 }\n },\n {\n title: \"Neon Horizon\",\n source: \"viewerVault\",\n data: { tomatometer: 68, audienceScore: 74 }\n },\n {\n title: \"The Last Protocol\",\n source: \"filmCritic\",\n data: { rating: 8.7, votes: 2104567 }\n },\n {\n title: \"The Last Protocol\",\n source: \"viewerVault\",\n data: { tomatometer: 91, audienceScore: 88 }\n }\n] )" + "sha256" : "1c6c2c245a832d1422a70f9e2eea79122834c078cc378f40397e09784cf22a92", + "text" : "db.movieReviews.insertMany( [\n {\n title: \"Galactic Odyssey\",\n source: \"filmCritic\",\n data: { rating: 8.1, votes: 1482903 }\n },\n {\n title: \"Galactic Odyssey\",\n source: \"viewerVault\",\n data: { tomatometer: 79, audienceScore: 85 }\n },\n {\n title: \"Neon Horizon\",\n source: \"filmCritic\",\n data: { rating: 7.4, votes: 983201 }\n },\n {\n title: \"Neon Horizon\",\n source: \"viewerVault\",\n data: { tomatometer: 68, audienceScore: 74 }\n },\n {\n title: \"The Last Protocol\",\n source: \"filmCritic\",\n data: { rating: 8.7, votes: 2104567 }\n },\n {\n title: \"The Last Protocol\",\n source: \"viewerVault\",\n data: { tomatometer: 91, audienceScore: 88 }\n }\n] )\n" + }, { + "role" : "ACTION", + "sha256" : "877dcd95130975d42cd33a17a3903417d91bc5f3d4cc13411330aa26ab47cc4e", + "text" : "db.movieReviews.aggregate( [\n {\n $group: {\n _id: \"$title\",\n allRatings: { $mergeObjects: \"$data\" }\n }\n },\n { $sort: { _id: 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "b3d3fc5f49f87184aa040ca3d12d9c03e2d5f137f6059e6ebba69a0f3393318c", - "text" : "[\n {\n _id: 'Galactic Odyssey',\n allRatings: {\n rating: 8.1,\n votes: 1482903,\n tomatometer: 79,\n audienceScore: 85\n }\n },\n {\n _id: 'Neon Horizon',\n allRatings: {\n rating: 7.4,\n votes: 983201,\n tomatometer: 68,\n audienceScore: 74\n }\n },\n {\n _id: 'The Last Protocol',\n allRatings: {\n rating: 8.7,\n votes: 2104567,\n tomatometer: 91,\n audienceScore: 88\n }\n }\n]" + "sha256" : "cb54ee8c58e74bf05982a9d4214e64d3a773fc11cedb1b18e69454109dfe540c", + "text" : "[\n {\n _id: 'Galactic Odyssey',\n allRatings: {\n rating: 8.1,\n votes: 1482903,\n tomatometer: 79,\n audienceScore: 85\n }\n },\n {\n _id: 'Neon Horizon',\n allRatings: {\n rating: 7.4,\n votes: 983201,\n tomatometer: 68,\n audienceScore: 74\n }\n },\n {\n _id: 'The Last Protocol',\n allRatings: {\n rating: 8.7,\n votes: 2104567,\n tomatometer: 91,\n audienceScore: 88\n }\n }\n]\n" } ], "detail" : null, "name" : "Merge the Ratings of Each Movie", @@ -3901,20 +3292,14 @@ "title" : "main" } ], "includes" : [ { - "blob" : "6ac2914a9d64a33e800c51413ac16406a3ad5e4e", - "path" : "content/manual/manual/source/includes/expressions/mergeObjects/null-handling.rst" - }, { - "blob" : "11e94371d83c7579a499b1db7e39bdd920c00b32", - "path" : "content/manual/manual/source/includes/expressions/mergeObjects/field-overwrite.rst" - }, { "blob" : "af89cd5f27c47ef406050183b7a6125da1b2a3a1", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/mergeObjects/load-data.js" - }, { - "blob" : "82df0d223b84ac44661d6dbf3b32aa57bc7027a7", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/mergeObjects/merge-ratings.js" }, { "blob" : "42b12a81c1861d0264dcd1c46901e582af6337b0", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/mergeObjects/merge-ratings-output.sh" + }, { + "blob" : "82df0d223b84ac44661d6dbf3b32aa57bc7027a7", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/mergeObjects/merge-ratings.js" } ], "operator" : "mergeObjects", "pageBlob" : "ed8ed3a9efc92b5bd03a79a73226f54b75da532c", @@ -3927,13 +3312,17 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "58f7d9ff2811de1222d82760f6bd6b8fb1aec513068fb94e9fdad7755a52df79", - "text" : "db.articles.aggregate(\n [\n { $match: { $text: { $search: \"cake\" } } },\n { $group: { _id: { $meta: \"textScore\" }, count: { $sum: 1 } } }\n ]\n)" - }, { "role" : "DATA", "sha256" : "052e2ebc62dba534ab8846476acd6267567897a38e0e6aca7dedafba6be585ff", "text" : "db.articles.insertMany([\n { \"_id\" : 1, \"title\" : \"cakes and ale\" },\n { \"_id\" : 2, \"title\" : \"more cakes\" },\n { \"_id\" : 3, \"title\" : \"bread\" },\n { \"_id\" : 4, \"title\" : \"some cakes\" },\n { \"_id\" : 5, \"title\" : \"two cakes to go\" },\n { \"_id\" : 6, \"title\" : \"pie\" }\n])" + }, { + "role" : "INDEX", + "sha256" : "13b1bb10d27332582379a522096147a01f19aeb4ad0f3bb0aa106064b161f97f", + "text" : "db.articles.createIndex( { title: \"text\"} )" + }, { + "role" : "ACTION", + "sha256" : "58f7d9ff2811de1222d82760f6bd6b8fb1aec513068fb94e9fdad7755a52df79", + "text" : "db.articles.aggregate(\n [\n { $match: { $text: { $search: \"cake\" } } },\n { $group: { _id: { $meta: \"textScore\" }, count: { $sum: 1 } } }\n ]\n)" }, { "role" : "EXPECTED", "sha256" : "b537c6ec4b18788e7ef3455e1486a9d7c49c625dde9389266a552c5bf3d3221b", @@ -3944,91 +3333,149 @@ "owner" : null, "status" : "UNOWNED", "stem" : "groupByTextScore", - "title" : "main" - } ], - "includes" : [ { - "blob" : "af5d3030566c9ffc0beac2470a82ec9711422841", - "path" : "content/manual/manual/source/includes/fact-meta-syntax.rst" - }, { - "blob" : "a6b6e20a100cc7a045ae2d382c5cbe38f0904500", - "path" : "content/manual/manual/source/includes/text-search-legacy-atlas-section.rst" - }, { - "blob" : "4f64cb03e66bdd5969e83c3ddf2d7fa635107d09", - "path" : "content/manual/manual/source/includes/text-search-legacy-atlas-section-main.rst" - }, { - "blob" : "26fc4c956a450a348072068a9cea4bfcb1c665e5", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/meta/sample-data-movie.rst" + "title" : "$meta: \"textScore\"" }, { - "blob" : "f7c6ec562b7d84d7572cf9bb0653430d55c5fca8", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/convention-pack-note.rst" - } ], - "operator" : "meta", - "pageBlob" : "6bcec1af90dce08be0daf31147ca3e92b4318333", - "source" : { - "commit" : "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", - "path" : "content/manual/manual/source/reference/operator/aggregation/meta.txt", - "relation" : "AT_ORIGIN" - } - }, { - "context" : "aggregation/expressions", - "examples" : [ { - "blocks" : [ ], - "detail" : null, - "owner" : "aggregation/expressions/millisecond/millisecondExpressionOperator", - "status" : "OWNED", - "stem" : null, - "title" : "main" - } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - } ], - "operator" : "millisecond", - "pageBlob" : "3efa787bbce11a0f622b6c57019bc0bbc5ec8c0a", - "source" : { - "commit" : "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", - "path" : "content/manual/manual/source/reference/operator/aggregation/millisecond.txt", - "relation" : "AT_ORIGIN" - } - }, { - "context" : "aggregation/expressions", - "examples" : [ { "blocks" : [ { + "role" : "DATA", + "sha256" : "052e2ebc62dba534ab8846476acd6267567897a38e0e6aca7dedafba6be585ff", + "text" : "db.articles.insertMany([\n { \"_id\" : 1, \"title\" : \"cakes and ale\" },\n { \"_id\" : 2, \"title\" : \"more cakes\" },\n { \"_id\" : 3, \"title\" : \"bread\" },\n { \"_id\" : 4, \"title\" : \"some cakes\" },\n { \"_id\" : 5, \"title\" : \"two cakes to go\" },\n { \"_id\" : 6, \"title\" : \"pie\" }\n])" + }, { + "role" : "INDEX", + "sha256" : "13b1bb10d27332582379a522096147a01f19aeb4ad0f3bb0aa106064b161f97f", + "text" : "db.articles.createIndex( { title: \"text\"} )" + }, { "role" : "ACTION", - "sha256" : "e9a35a7dcc452afa406be0cabdb63ef469fb9f0e91e8694bb2fe98ce0c9ecf56", - "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.rating\": { $type: \"double\" }\n }\n },\n {\n $group: {\n _id: \"$rated\",\n lowestRating: { $min: \"$imdb.rating\" }\n }\n },\n {\n $sort: { _id: 1 }\n }\n] )" + "sha256" : "cdbc3077f04f77ed9b554f6f8d1f7f668358a12b723f4b2b00ecbf673f33826d", + "text" : "db.articles.find(\n { $text: { $search: \"cake\" } },\n { score: { $meta: \"textScore\" } }\n)" }, { "role" : "EXPECTED", - "sha256" : "9ed968c134263409ea4833ec9a3db5ee6a356a1bc3fe9c74c2d18a5d70216312", - "text" : "[\n { _id: 'G', lowestRating: 1.6 },\n { _id: 'PG', lowestRating: 1.6 },\n { _id: 'PG-13', lowestRating: 1.9 },\n { _id: 'R', lowestRating: 2 }\n]" + "sha256" : "a27b64ad64ff399b03d2438a91527abe67b3b39349791f78f45529303a75cdd9", + "text" : "{ \"_id\" : 4, \"title\" : \"some cakes\", \"score\" : 1 }\n{ \"_id\" : 1, \"title\" : \"cakes and ale\", \"score\" : 0.75 }\n{ \"_id\" : 5, \"title\" : \"two cakes to go\", \"score\" : 0.6666666666666666 }\n{ \"_id\" : 2, \"title\" : \"more cakes\", \"score\" : 1 }" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", - "stem" : "useMinInAGroupStage", - "title" : "Use $min in a $group Stage" - } ], - "includes" : [ { - "blob" : "b28477a2cde2be1714dafa0e8f0010d2855ea67c", - "path" : "content/manual/manual/source/includes/expressions/min/result-type.rst" + "stem" : "metaTextScore", + "title" : "$meta: \"textScore\"" }, { - "blob" : "97711bc7b418bb547027b376cad61271651d4425", - "path" : "content/manual/manual/source/includes/aggregate-max-min-equal-values.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blocks" : [ { + "role" : "DATA", + "sha256" : "2361bde2c419c5fbd03c253e6d2dd9ad23e87bec0318afdd8055a30de58b4a7e", + "text" : "db.orders.insertMany([\n { \"item\" : \"abc\", \"price\" : Decimal128(\"12\"), \"quantity\" : 2, \"type\": \"apparel\" },\n { \"item\" : \"jkl\", \"price\" : Decimal128(\"20\"), \"quantity\" : 1, \"type\": \"electronics\" },\n { \"item\" : \"abc\", \"price\" : Decimal128(\"10\"), \"quantity\" : 5, \"type\": \"apparel\" }\n])" + }, { + "role" : "INDEX", + "sha256" : "8000a734fd72d95222c7c13cc743045f94a052e21621990f113a70ffcc040994", + "text" : "db.orders.createIndex( { type: 1, item: 1 } )" + }, { + "role" : "ACTION", + "sha256" : "280fae49c4693652fdc247ce37dcf2b342f7862d15d118dbd03211cf4eadb61c", + "text" : "db.orders.aggregate(\n [\n { $match: { type: \"apparel\" } },\n { $addFields: { idxKey: { $meta: \"indexKey\" } } }\n ]\n)" + } ], + "detail" : null, + "name" : "Return the Index Key of a Matched Type in an Aggregation", + "owner" : null, + "status" : "UNOWNED", + "stem" : "returnTheIndexKeyOfAMatchedTypeInAnAggregation", + "title" : "$meta: \"indexKey\"" }, { - "blob" : "b7c2826277cebd601dabb6d2f87397412c38be8c", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/min/min-group-example.js" + "blocks" : [ { + "role" : "DATA", + "sha256" : "2361bde2c419c5fbd03c253e6d2dd9ad23e87bec0318afdd8055a30de58b4a7e", + "text" : "db.orders.insertMany([\n { \"item\" : \"abc\", \"price\" : Decimal128(\"12\"), \"quantity\" : 2, \"type\": \"apparel\" },\n { \"item\" : \"jkl\", \"price\" : Decimal128(\"20\"), \"quantity\" : 1, \"type\": \"electronics\" },\n { \"item\" : \"abc\", \"price\" : Decimal128(\"10\"), \"quantity\" : 5, \"type\": \"apparel\" }\n])" + }, { + "role" : "INDEX", + "sha256" : "8000a734fd72d95222c7c13cc743045f94a052e21621990f113a70ffcc040994", + "text" : "db.orders.createIndex( { type: 1, item: 1 } )" + }, { + "role" : "ACTION", + "sha256" : "9a03d252106277e10ce8a3ea7f02c5a4a85a3b76b91387124186acc5a1e19738", + "text" : "db.orders.find( { type: \"apparel\" }, { idxKey: { $meta: \"indexKey\" } } )" + }, { + "role" : "EXPECTED", + "sha256" : "9c0db47afe3324ffa9eb30eb05c1bbe7d48ef40fc415103976e092c55c98002d", + "text" : "{\n \"_id\" : ObjectId(\"5e98a33ceaf5e9dcf2b8dcde\"),\n \"item\" : \"abc\",\n \"price\" : Decimal128(\"12\"),\n \"quantity\" : 2,\n \"type\" : \"apparel\",\n \"idxKey\" : { \"type\" : \"apparel\", \"item\" : \"abc\" }\n}\n{\n \"_id\" : ObjectId(\"5e98a33ceaf5e9dcf2b8dce0\"),\n \"item\" : \"abc\",\n \"price\" : Decimal128(\"10\"),\n \"quantity\" : 5,\n \"type\" : \"apparel\",\n \"idxKey\" : { \"type\" : \"apparel\", \"item\" : \"abc\" }\n}" + } ], + "detail" : null, + "name" : "Return the Index Key of a Matched Type in a Find", + "owner" : null, + "status" : "UNOWNED", + "stem" : "returnTheIndexKeyOfAMatchedTypeInAFind", + "title" : "$meta: \"indexKey\"" }, { - "blob" : "578697583b274cbab644b786868e508a492b846a", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/min/min-group-example-output.sh" + "blocks" : [ { + "role" : "DATA", + "sha256" : "2361bde2c419c5fbd03c253e6d2dd9ad23e87bec0318afdd8055a30de58b4a7e", + "text" : "db.orders.insertMany([\n { \"item\" : \"abc\", \"price\" : Decimal128(\"12\"), \"quantity\" : 2, \"type\": \"apparel\" },\n { \"item\" : \"jkl\", \"price\" : Decimal128(\"20\"), \"quantity\" : 1, \"type\": \"electronics\" },\n { \"item\" : \"abc\", \"price\" : Decimal128(\"10\"), \"quantity\" : 5, \"type\": \"apparel\" }\n])" + }, { + "role" : "INDEX", + "sha256" : "8000a734fd72d95222c7c13cc743045f94a052e21621990f113a70ffcc040994", + "text" : "db.orders.createIndex( { type: 1, item: 1 } )" + }, { + "role" : "ACTION", + "sha256" : "9c26bf665b74b46a1b1fe1f9194bbf1f40aeb85f89a26d38dd6f2601ec8b789c", + "text" : "db.orders.aggregate(\n [\n { $match: { price: { $gte: Decimal128(\"10\") } } },\n { $addFields: { idxKey: { $meta: \"indexKey\" } } }\n ]\n)" + } ], + "detail" : null, + "name" : "Return the Index Key of a Price Range in an Aggregation", + "owner" : null, + "status" : "UNOWNED", + "stem" : "returnTheIndexKeyOfAPriceRangeInAnAggregation", + "title" : "$meta: \"indexKey\"" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "2361bde2c419c5fbd03c253e6d2dd9ad23e87bec0318afdd8055a30de58b4a7e", + "text" : "db.orders.insertMany([\n { \"item\" : \"abc\", \"price\" : Decimal128(\"12\"), \"quantity\" : 2, \"type\": \"apparel\" },\n { \"item\" : \"jkl\", \"price\" : Decimal128(\"20\"), \"quantity\" : 1, \"type\": \"electronics\" },\n { \"item\" : \"abc\", \"price\" : Decimal128(\"10\"), \"quantity\" : 5, \"type\": \"apparel\" }\n])" + }, { + "role" : "INDEX", + "sha256" : "8000a734fd72d95222c7c13cc743045f94a052e21621990f113a70ffcc040994", + "text" : "db.orders.createIndex( { type: 1, item: 1 } )" + }, { + "role" : "ACTION", + "sha256" : "ce238b656775a55c3bee23905ff8fbd1656a47c746bd6a1d1706be6cc1168adf", + "text" : "db.orders.find(\n { price: { $gte: Decimal128(\"10\") } },\n { idxKey: { $meta: \"indexKey\" } }\n)" + }, { + "role" : "EXPECTED", + "sha256" : "e683c532369e5f46275e6d7976405ce4b1aaedbc2934773fe4001795756cd9aa", + "text" : "{\n \"_id\" : ObjectId(\"5e98a33ceaf5e9dcf2b8dcde\"),\n \"item\" : \"abc\",\n \"price\" : NumberDecimal(\"12\"),\n \"quantity\" : 2,\n \"type\" : \"apparel\"\n}\n{\n \"_id\" : ObjectId(\"5e98a33ceaf5e9dcf2b8dcdf\"),\n \"item\" : \"jkl\",\n \"price\" : NumberDecimal(\"20\"),\n \"quantity\" : 1,\n \"type\" : \"electronics\"\n}\n{\n \"_id\" : ObjectId(\"5e98a33ceaf5e9dcf2b8dce0\"),\n \"item\" : \"abc\",\n \"price\" : NumberDecimal(\"10\"),\n \"quantity\" : 5,\n \"type\" : \"apparel\"\n}" + } ], + "detail" : null, + "name" : "Return the Index Key of a Price Range in a Find", + "owner" : null, + "status" : "UNOWNED", + "stem" : "returnTheIndexKeyOfAPriceRangeInAFind", + "title" : "$meta: \"indexKey\"" } ], - "operator" : "min", - "pageBlob" : "fe629bf4589d39ffb5d75bf284ae5905b7d7b5cb", + "includes" : [ { + "blob" : "f0e3d7c84a9072848b7f31d9481246befb796e05", + "path" : "content/manual/manual/source/includes/driver-examples/csharp/meta/Movie.cs" + }, { + "blob" : "47d8fb8432e7f97c162be59c1880675a86e23d59", + "path" : "content/manual/manual/source/includes/driver-examples/csharp/meta/MetaExamples.cs" + } ], + "operator" : "meta", + "pageBlob" : "6bcec1af90dce08be0daf31147ca3e92b4318333", "source" : { "commit" : "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", - "path" : "content/manual/manual/source/reference/operator/aggregation/min.txt", + "path" : "content/manual/manual/source/reference/operator/aggregation/meta.txt", + "relation" : "AT_ORIGIN" + } + }, { + "context" : "aggregation/expressions", + "examples" : [ { + "blocks" : [ ], + "detail" : null, + "owner" : "aggregation/expressions/millisecond/millisecondExpressionOperator", + "status" : "OWNED", + "stem" : null, + "title" : "main" + } ], + "includes" : [ ], + "operator" : "millisecond", + "pageBlob" : "3efa787bbce11a0f622b6c57019bc0bbc5ec8c0a", + "source" : { + "commit" : "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path" : "content/manual/manual/source/reference/operator/aggregation/millisecond.txt", "relation" : "AT_ORIGIN" } }, { @@ -4036,24 +3483,36 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "68cadc2ee23a651e9c95b29ee02069dcc6e06179ee07642c59916ac765840f4a", - "text" : "db.example.aggregate([\n {$setWindowFields: {\n sortBy: {a: 1},\n output: {\n scaled: {$minMaxScaler: \"$a\"},\n scaledTo100: {$minMaxScaler: {input: \"$a\", min: 0, max: 100}},\n }\n }}\n])" - }, { - "role" : "DATA", - "sha256" : "09207e7f01cb4629f490aaf0bf70ba3b00d5ba8b8e4944d155292b2ec1b228fd", - "text" : "{ \"_id\": 1, \"a\": 1 } \n{ \"_id\": 2, \"a\": 5 }\n{ \"_id\": 3, \"a\": 13 } \n{ \"_id\": 4, \"a\": 21 } " + "sha256" : "559cbbbb2fc16b74f2812bbd2692e00dd5c715bd4efca445eaf31bead0282ea1", + "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.rating\": { $type: \"double\" }\n }\n },\n {\n $group: {\n _id: \"$rated\",\n lowestRating: { $min: \"$imdb.rating\" }\n }\n },\n {\n $sort: { _id: 1 }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "f89e000e4970665b100b4e05c1fdf28d322b67b1a66f95a49e32cecee1eafff8", - "text" : "{a: 1, scaled: 0, scaledTo100: 0}\n{a: 5, scaled: 0.2, scaledTo100: 20}\n{a: 13, scaled: 0.6, scaledTo100: 60}\n{a: 21, scaled: 1, scaledTo100: 100}" + "sha256" : "915525d5ad246e919eb0d3cebdd4c2535ff85f77e6fe7c0144003909fa8429c7", + "text" : "[\n { _id: 'G', lowestRating: 1.6 },\n { _id: 'PG', lowestRating: 1.6 },\n { _id: 'PG-13', lowestRating: 1.9 },\n { _id: 'R', lowestRating: 2 }\n]\n" } ], "detail" : null, - "name" : "Scale Values to a Range", "owner" : null, "status" : "UNOWNED", - "stem" : "scaleValuesToARange", - "title" : "main" + "stem" : "useMinInAGroupStage", + "title" : "Use $min in a $group Stage" + } ], + "includes" : [ { + "blob" : "578697583b274cbab644b786868e508a492b846a", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/min/min-group-example-output.sh" + }, { + "blob" : "b7c2826277cebd601dabb6d2f87397412c38be8c", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/min/min-group-example.js" } ], + "operator" : "min", + "pageBlob" : "fe629bf4589d39ffb5d75bf284ae5905b7d7b5cb", + "source" : { + "commit" : "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path" : "content/manual/manual/source/reference/operator/aggregation/min.txt", + "relation" : "AT_ORIGIN" + } + }, { + "context" : "aggregation/expressions", + "examples" : [ ], "includes" : [ ], "operator" : "minMaxScaler", "pageBlob" : "b3c30cad4be713deef541856de0fc99c8c50a586", @@ -4067,12 +3526,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "7188253c6033614a6ac1c8e8397daa899d4dce25480d7a99e69ee6942eb73d7a", - "text" : "db.movies.aggregate( [\n {\n $match: { genres: \"Horror\" }\n },\n {\n $group:\n {\n _id: \"Horror\",\n minThreeRatings:\n {\n $minN:\n {\n input: \"$imdb.rating\",\n n: 3\n }\n }\n }\n }\n] )" + "sha256" : "99216e2a410c2571b3e71eb111ffec2a4dd78b3904bc8a274314a77d99997aa5", + "text" : "db.movies.aggregate( [\n {\n $match: { genres: \"Horror\" }\n },\n {\n $group:\n {\n _id: \"Horror\",\n minThreeRatings:\n {\n $minN:\n {\n input: \"$imdb.rating\",\n n: 3\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "0ac00689538a466357ee7ba01ebc94f6b601b216a1d7886acdc4f0a46c0f72df", - "text" : "[ { _id: 'Horror', minThreeRatings: [ 2, 2, 2.2 ] } ]" + "sha256" : "c2dedf7a76b23c62d482be6e0080ac8c4a7176940f9706e794c1ea32b93c4d70", + "text" : "[ { _id: 'Horror', minThreeRatings: [ 2, 2, 2.2 ] } ]\n" } ], "detail" : null, "owner" : null, @@ -4082,12 +3541,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "6c3d370150ed758e0f76b77f74c6d86b66806268e8914d315ebc42d546696db1", - "text" : "db.movies.aggregate( [\n {\n $unwind: \"$genres\"\n },\n {\n $group:\n {\n _id: \"$genres\",\n minThreeRatings:\n {\n $minN:\n {\n input: \"$imdb.rating\",\n n: 3\n }\n }\n }\n },\n { $sort: { _id: 1 } },\n { $limit: 5 }\n] )" + "sha256" : "47469fc68310717e8c83fc43cf4b5ecb0d45510ad24f387f139fdded8838b430", + "text" : "db.movies.aggregate( [\n {\n $unwind: \"$genres\"\n },\n {\n $group:\n {\n _id: \"$genres\",\n minThreeRatings:\n {\n $minN:\n {\n input: \"$imdb.rating\",\n n: 3\n }\n }\n }\n },\n { $sort: { _id: 1 } },\n { $limit: 5 }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "e2c0a556cf0f30cb54eb19bd3722a79e4d31012ce5e00c186a16099b7684207f", - "text" : "[\n { _id: 'Action', minThreeRatings: [ 2, 2, 2.1 ] },\n { _id: 'Adventure', minThreeRatings: [ 2.1, 2.3, 2.4 ] },\n { _id: 'Animation', minThreeRatings: [ 2.7, 4, 4.1 ] },\n { _id: 'Biography', minThreeRatings: [ 2.3, 2.7, 3.5 ] },\n { _id: 'Comedy', minThreeRatings: [ 1.6, 1.9, 1.9 ] }\n]" + "sha256" : "90263ed305766b3d225e62dc9d38f7d0d294b3132d16335c2e6f2ce5d3922320", + "text" : "[\n { _id: 'Action', minThreeRatings: [ 2, 2, 2.1 ] },\n { _id: 'Adventure', minThreeRatings: [ 2.1, 2.3, 2.4 ] },\n { _id: 'Animation', minThreeRatings: [ 2.7, 4, 4.1 ] },\n { _id: 'Biography', minThreeRatings: [ 2.3, 2.7, 3.5 ] },\n { _id: 'Comedy', minThreeRatings: [ 1.6, 1.9, 1.9 ] }\n]\n" } ], "detail" : null, "owner" : null, @@ -4097,12 +3556,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "52fa6cb82ed505160a1c84534583651c311b6a0507caefe40d61c6d3cccb2c43", - "text" : "db.movies.aggregate( [\n { $match: { rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] } } },\n {\n $group:\n {\n _id: { \"rated\": \"$rated\" },\n minMovies:\n {\n $minN:\n {\n input: \"$imdb.rating\",\n n: { $cond: { if: { $eq: [ \"$rated\", \"R\" ] }, then: 3, else: 1 } }\n }\n }\n }\n }\n] )" + "sha256" : "6cd033e56a5ac41bd23d43e28d5b0d9a5ac0d96ba3e556a9d5c63b47f85daebb", + "text" : "db.movies.aggregate( [\n { $match: { rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] } } },\n {\n $group:\n {\n _id: { \"rated\": \"$rated\" },\n minMovies:\n {\n $minN:\n {\n input: \"$imdb.rating\",\n n: { $cond: { if: { $eq: [ \"$rated\", \"R\" ] }, then: 3, else: 1 } }\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "f9302efe7b1d38135968a269a1d328fd4102e0ec554aa24b0771eb06be9ed777", - "text" : "[\n { _id: { rated: 'PG' }, minMovies: [ 1.6 ] },\n { _id: { rated: 'G' }, minMovies: [ 1.6 ] },\n { _id: { rated: 'R' }, minMovies: [ 2, 2.2, 2.2 ] },\n { _id: { rated: 'PG-13' }, minMovies: [ 1.9 ] }\n]" + "sha256" : "5162d786d5a7da1a920bfd0d6cae91265ed8b1de565b901ab4281a507a982277", + "text" : "[\n { _id: { rated: 'PG' }, minMovies: [ 1.6 ] },\n { _id: { rated: 'G' }, minMovies: [ 1.6 ] },\n { _id: { rated: 'R' }, minMovies: [ 2, 2.2, 2.2 ] },\n { _id: { rated: 'PG-13' }, minMovies: [ 1.9 ] }\n]\n" } ], "detail" : null, "owner" : null, @@ -4111,29 +3570,23 @@ "title" : "Set n Dynamically Based on the Group Key" } ], "includes" : [ { - "blob" : "fba9e311889d4f7ef12a9a04d57039dbc28a653b", - "path" : "content/manual/manual/source/includes/agg-expression-bson-order-return-behavior.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "e15e0b3adc8fdb2e1a6c8867e463aa43e194b910", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/minN/compute-n-based-on-group-key-output.sh" }, { - "blob" : "766ab7e4e2b60897d77c6a5826adc0811c07a3a3", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/minN/find-minimum-three-single-genre.js" + "blob" : "1592ab6d67d2878e2579779e089a7a8b5b46f208", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/minN/compute-n-based-on-group-key.js" }, { - "blob" : "1a345254d812c3008f5ff87a65e8206b545babbb", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/minN/find-minimum-three-single-genre-output.sh" + "blob" : "ef0a92d57eac0c8a2a56c90527c30a9d5ca64cee", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/minN/find-minimum-three-across-genres-output.sh" }, { "blob" : "9fd2642fa3a3e3479be81a2208aa8bcdd60dcd20", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/minN/find-minimum-three-across-genres.js" }, { - "blob" : "ef0a92d57eac0c8a2a56c90527c30a9d5ca64cee", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/minN/find-minimum-three-across-genres-output.sh" - }, { - "blob" : "1592ab6d67d2878e2579779e089a7a8b5b46f208", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/minN/compute-n-based-on-group-key.js" + "blob" : "1a345254d812c3008f5ff87a65e8206b545babbb", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/minN/find-minimum-three-single-genre-output.sh" }, { - "blob" : "e15e0b3adc8fdb2e1a6c8867e463aa43e194b910", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/minN/compute-n-based-on-group-key-output.sh" + "blob" : "766ab7e4e2b60897d77c6a5826adc0811c07a3a3", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/minN/find-minimum-three-single-genre.js" } ], "operator" : "minN", "pageBlob" : "8a1f595f514f95f04f57ea98c2fbca7cd639200d", @@ -4152,13 +3605,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - }, { - "blob" : "d1da9ec35d78b79d5c5d5830d191df07fd01729b", - "path" : "content/manual/manual/source/includes/min-month-sample-data.rst" - } ], + "includes" : [ ], "operator" : "minute", "pageBlob" : "742e55daddc605a740b7e903d8a59adb54091535", "source" : { @@ -4169,36 +3616,26 @@ }, { "context" : "aggregation/expressions", "examples" : [ { - "blocks" : [ ], - "detail" : null, - "owner" : "aggregation/expressions/mod/modExpressionOperator", - "status" : "OWNED", - "stem" : null, - "title" : "main" - }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "cf5ea91d06a8fcc8de16ca452a75b171ad234f6f53871b9aec04240c4753bf56", + "text" : "db.conferencePlanning.insertMany( [\n { \"_id\" : 1, \"city\" : \"New York\", \"hours\" : 80, \"tasks\" : 7 },\n { \"_id\" : 2, \"city\" : \"Singapore\", \"hours\" : 40, \"tasks\" : 4 }\n] )" + }, { "role" : "ACTION", "sha256" : "e6871ee2ce3351002366fcd32709840f387c20b0b11928181276205686dcb320", "text" : "db.modExample.aggregate( [\n { $project: { remainder: { $mod: [ \"$dividend\", \"$divisor\" ] } } }\n] )" - }, { - "role" : "DATA", - "sha256" : "23e844956f9add1e293ced4bc196a572ca0fc7c4a8f5e917a7a5468abb9110fc", - "text" : "db.modExample.insertOne( [\n { \"_id\" : 1, \"dividend\": -13, \"divisor\": 9 }\n] )" }, { "role" : "EXPECTED", "sha256" : "9b4e17ce7a23fa46d0d2b347586205e2d49549326efaa03145947a0f3f724657", "text" : "[ { '_id' : 1, 'remainder' : -4 } ]" } ], - "detail" : null, + "detail" : "UNSUPPORTED_SETUP", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "negativeDividend", "title" : "Negative Dividend" } ], - "includes" : [ { - "blob" : "29386fb4543b83467ddb0e4aefe4ff861bb48d07", - "path" : "content/manual/manual/source/includes/negative-dividend.rst" - } ], + "includes" : [ ], "operator" : "mod", "pageBlob" : "b66f2b64382b6dbce1339e5b7b7e05fe9d744918", "source" : { @@ -4216,13 +3653,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - }, { - "blob" : "d1da9ec35d78b79d5c5d5830d191df07fd01729b", - "path" : "content/manual/manual/source/includes/min-month-sample-data.rst" - } ], + "includes" : [ ], "operator" : "month", "pageBlob" : "6143b356792d915d5adc80c0de36688141e002fa", "source" : { @@ -4240,10 +3671,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "f7fd73d828d6f219d9b36508700d241d1eca6b55", - "path" : "content/manual/manual/source/includes/agg-expression-order-of-return-behavior.rst" - } ], + "includes" : [ ], "operator" : "multiply", "pageBlob" : "ed4c61d1d2c0d6a4f5f2080dd3b98dd42b77c113", "source" : { @@ -4261,13 +3689,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "a65b631cdba796d7101918731b989c384d6d0b6d", - "path" : "content/manual/manual/source/includes/extracts-examples-eval.yaml" - }, { - "blob" : "32c1c5529385658b35c67c3674bd23475ac158f7", - "path" : "content/manual/manual/source/includes/extracts-parent-agg-comparison-expressions.yaml" - } ], + "includes" : [ ], "operator" : "ne", "pageBlob" : "bd88629e0fba23b04c503c0d7725a0d0bece12b1", "source" : { @@ -4285,13 +3707,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "25b363e388e33d29d895431698182c839a02ea59", - "path" : "content/manual/manual/source/includes/extracts-fact-agg-boolean.yaml" - }, { - "blob" : "5111e303e5876308b7aa20736d4fd16bff348057", - "path" : "content/manual/manual/source/includes/extracts-parent-fact-agg-boolean.yaml" - } ], + "includes" : [ ], "operator" : "not", "pageBlob" : "9db1636ae7bdf0f3128579c48e5040861051aa7b", "source" : { @@ -4303,30 +3719,27 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/objectToArray/objectToArrayExample", "status" : "OWNED", "stem" : null, - "title" : "``$objectToArray`` Example" + "title" : "$objectToArray Example" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/objectToArray/objectToArrayToSumNestedFields", "status" : "OWNED", "stem" : null, - "title" : "``$objectToArray`` to Sum Nested Fields" + "title" : "$objectToArray to Sum Nested Fields" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/objectToArray/objectToArrayArrayToObjectExample", "status" : "OWNED", "stem" : null, - "title" : "``$objectToArray`` + ``$arrayToObject`` Example" - } ], - "includes" : [ { - "blob" : "b444d27d9a82247bc17d50790add66bacd791f93", - "path" : "content/manual/manual/source/includes/example-objectToArray-arrayToObject.rst" + "title" : "$objectToArray + $arrayToObject Example" } ], + "includes" : [ ], "operator" : "objectToArray", "pageBlob" : "ca0e9a544c581d5b798328378eb96d0ba94b191f", "source" : { @@ -4344,16 +3757,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "25b363e388e33d29d895431698182c839a02ea59", - "path" : "content/manual/manual/source/includes/extracts-fact-agg-boolean.yaml" - }, { - "blob" : "5111e303e5876308b7aa20736d4fd16bff348057", - "path" : "content/manual/manual/source/includes/extracts-parent-fact-agg-boolean.yaml" - }, { - "blob" : "36b8606b42ed0e98425051200767e7f63870dbbf", - "path" : "content/manual/manual/source/includes/and-or-behavior.rst" - } ], + "includes" : [ ], "operator" : "or", "pageBlob" : "b1bbfbc95134a0aea9ffb79c032b0ccea8e1d9f5", "source" : { @@ -4366,12 +3770,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "07a640dfce2a2c72e6007115fedfea26931d9faa826706fc49f009514e4778be", - "text" : "db.movies.aggregate( [\n {\n $unwind: \"$genres\"\n },\n {\n $match: {\n genres: { $in: [ \"Action\", \"Drama\" ] },\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group: {\n _id: \"$genres\",\n ratingPercentiles: {\n $percentile: {\n input: \"$imdb.rating\",\n p: [ 0.5, 0.9 ],\n method: \"approximate\"\n }\n }\n }\n },\n {\n $sort: { _id: 1 }\n }\n] )" + "sha256" : "6a785098b517b957a18fc34be8b80c34bf22433425f45b7f232efe4492dd847f", + "text" : "db.movies.aggregate( [\n {\n $unwind: \"$genres\"\n },\n {\n $match: {\n genres: { $in: [ \"Action\", \"Drama\" ] },\n \"imdb.rating\": { $exists: true }\n }\n },\n {\n $group: {\n _id: \"$genres\",\n ratingPercentiles: {\n $percentile: {\n input: \"$imdb.rating\",\n p: [ 0.5, 0.9 ],\n method: \"approximate\"\n }\n }\n }\n },\n {\n $sort: { _id: 1 }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "16d3b7c9e8eb85eaeffd7f038077b8568118f1bee65656a67292d2be0ff43ca9", - "text" : "[\n { _id: 'Action', ratingPercentiles: [ 6.5, 7.6 ] },\n { _id: 'Drama', ratingPercentiles: [ 6.9, 7.8 ] }\n]" + "sha256" : "f9255860663d7ed2e219cc24e9af87f33802d172549a9808f40f5e579a2f51be", + "text" : "[\n { _id: 'Action', ratingPercentiles: [ 6.5, 7.6 ] },\n { _id: 'Drama', ratingPercentiles: [ 6.9, 7.8 ] }\n]\n" } ], "detail" : null, "owner" : null, @@ -4380,17 +3784,11 @@ "title" : "Calculate Rating Percentiles by Genre" } ], "includes" : [ { - "blob" : "9e2239e2f8e6aa2503273fbad7196784ef4fde89", - "path" : "content/manual/manual/source/includes/aggregation/fact-return-percentile.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "0a160a7969b3750822afee91bbaea9eae705303b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/percentile/rating-percentiles-by-genre-output.sh" }, { "blob" : "55fc3a6e4c428af6fb3bc5fb915bf5b7fb6adeba", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/percentile/rating-percentiles-by-genre.js" - }, { - "blob" : "0a160a7969b3750822afee91bbaea9eae705303b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/percentile/rating-percentiles-by-genre-output.sh" } ], "operator" : "percentile", "pageBlob" : "53342ed574f6447fdef1423cb61ea62f3554d8f3", @@ -4409,16 +3807,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "f7fd73d828d6f219d9b36508700d241d1eca6b55", - "path" : "content/manual/manual/source/includes/agg-expression-order-of-return-behavior.rst" - }, { - "blob" : "bbf5c44a10e62dc8903402b5aaf9baf1323ef458", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null.yaml" - }, { - "blob" : "8623cf2a56423be1b837696232e1d7f56f12569c", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "pow", "pageBlob" : "23bad7776d7daca5c3f916b55dcdecd5ca005df6", "source" : { @@ -4431,12 +3820,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "40df131bf80452fa7ae8ae5bbeec3d865ce04bea7d77f5ca1bbe484d81c26e11", - "text" : "db.movies.aggregate( [\n {\n $match: {\n year: { $gte: 2010, $lte: 2015 },\n genres: { $exists: true, $ne: [] },\n directors: { $exists: true, $ne: [] }\n }\n },\n {\n $unwind: \"$directors\"\n },\n {\n $group: {\n _id: \"$directors\",\n genres: { $push: { $first: \"$genres\" } }\n }\n },\n {\n $sort: { _id: 1 }\n },\n {\n $limit: 5\n }\n] )" + "sha256" : "08d0e38c94df21c3d78edc77666013e7d4e056c46fb3582cd939e798856ad3b2", + "text" : "db.movies.aggregate( [\n {\n $match: {\n year: { $gte: 2010, $lte: 2015 },\n genres: { $exists: true, $ne: [] },\n directors: { $exists: true, $ne: [] }\n }\n },\n {\n $unwind: \"$directors\"\n },\n {\n $group: {\n _id: \"$directors\",\n genres: { $push: { $first: \"$genres\" } }\n }\n },\n {\n $sort: { _id: 1 }\n },\n {\n $limit: 5\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "6f1b4c1bca04e3c984029110946fb67098be509bb6947978fb268008f4fe6ef9", - "text" : "[\n { _id: 'A. Karunakaran', genres: [ 'Romance' ] },\n { _id: 'A.J. Edwards', genres: [ 'Biography' ] },\n { _id: 'A.R. Murugadoss', genres: [ 'Action', 'Action' ] },\n { _id: 'AJ Schnack', genres: [ 'Documentary' ] },\n { _id: 'Aanand Rai', genres: [ 'Comedy' ] }\n]" + "sha256" : "3126319246d0c44d63774dda8eda154892029306252d83bba1d2698629c25a4c", + "text" : "[\n { _id: 'A. Karunakaran', genres: [ 'Romance' ] },\n { _id: 'A.J. Edwards', genres: [ 'Biography' ] },\n { _id: 'A.R. Murugadoss', genres: [ 'Action', 'Action' ] },\n { _id: 'AJ Schnack', genres: [ 'Documentary' ] },\n { _id: 'Aanand Rai', genres: [ 'Comedy' ] }\n]\n" } ], "detail" : null, "name" : "Collect the First Genre of Each Director's Movies", @@ -4446,14 +3835,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "077521734ff5847ba1448d8d69868e3d106994cd", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/push/output.sh" }, { "blob" : "362bd966b984e18c24e6f1a4e5274b222bf76213", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/push/run-pipeline.snippet.push-accumulator-example.js" - }, { - "blob" : "077521734ff5847ba1448d8d69868e3d106994cd", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/push/output.sh" } ], "operator" : "push", "pageBlob" : "250570a12dee3006848d643520a9bafe84fbd8b3", @@ -4489,6 +3875,25 @@ "status" : "OWNED", "stem" : null, "title" : "Generate Random Data Points" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "11756e00d89922d8835ec4516c6bfefd45236a9b2fa520b581f2a204c5f9dcfb", + "text" : "db.donors.insertMany(\n [\n { donorId: 1000, amount: 0, frequency: 1 },\n { donorId: 1001, amount: 0, frequency: 2 },\n { donorId: 1002, amount: 0, frequency: 1 },\n { donorId: 1003, amount: 0, frequency: 2 },\n { donorId: 1004, amount: 0, frequency: 1 }\n ]\n)" + }, { + "role" : "ACTION", + "sha256" : "c8e974466fe99275e01885a46adda38419ad1fd832a773dc501669ce8a8d790f", + "text" : "db.donors.aggregate(\n [\n { $project: {_id: 0, donorId: 1, amount: 1 } }\n ]\n)" + }, { + "role" : "EXPECTED", + "sha256" : "7a76c86afa73d728533ab63caab1cd699c4dca8c6dcf025af2c231597826ed3c", + "text" : "{ \"donorId\" : 1000, \"amount\" : 27 }\n{ \"donorId\" : 1001, \"amount\" : 10 }\n{ \"donorId\" : 1002, \"amount\" : 88 }\n{ \"donorId\" : 1003, \"amount\" : 73 }\n{ \"donorId\" : 1004, \"amount\" : 5 }" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "generateRandomDataPoints", + "title" : "Generate Random Data Points" }, { "blocks" : [ ], "detail" : null, @@ -4548,21 +3953,6 @@ "title" : "Rank Partitions Containing Duplicate Values, Nulls, or Missing Data" } ], "includes" : [ { - "blob" : "fedff0803bf6ef49336cf0a6588ffc5131dc7c91", - "path" : "content/manual/manual/source/includes/rank-and-denseRank-behavior.rst" - }, { - "blob" : "340aee2ee6bcc83023c5de38fc0ce8a034386755", - "path" : "content/manual/manual/source/includes/setWindowFields-example-collection.rst" - }, { - "blob" : "1d8936541da3975a89e1e7e5e7c984ed7d5467f9", - "path" : "content/manual/manual/source/includes/setWindowFields-partition-sort-quantity.rst" - }, { - "blob" : "13694f7d606928cb63fd6b471d29c52c8a6e7f40", - "path" : "content/manual/manual/source/includes/setWindowFields-partition-sort-date.rst" - }, { - "blob" : "177e415a22d946c759fe429251695e8961f515e5", - "path" : "content/manual/manual/source/includes/setWindowFields-duplicates-example-collection.rst" - }, { "blob" : "29a47bc3cb38c8d957f7ef25d9d7a450e3ba2a16", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cake-sales-insert.snippet.cake-sales-insert.js" } ], @@ -4576,12 +3966,43 @@ }, { "context" : "aggregation/expressions", "examples" : [ { - "blocks" : [ ], + "blocks" : [ { + "role" : "DATA", + "sha256" : "0cad12a4f40cbadb9900f35f401833bf969feace379372bfbfe7e016b3138f2e", + "text" : "db.events.insertMany( [\n { _id : 1, type : \"die\", experimentId :\"r5\", description : \"Roll a 5\", eventNum : 1, probability : 0.16666666666667 },\n { _id : 2, type : \"card\", experimentId :\"d3rc\", description : \"Draw 3 red cards\", eventNum : 1, probability : 0.5 },\n { _id : 3, type : \"card\", experimentId :\"d3rc\", description : \"Draw 3 red cards\", eventNum : 2, probability : 0.49019607843137 },\n { _id : 4, type : \"card\", experimentId :\"d3rc\", description : \"Draw 3 red cards\", eventNum : 3, probability : 0.48 },\n { _id : 5, type : \"die\", experimentId :\"r16\", description : \"Roll a 1 then a 6\", eventNum : 1, probability : 0.16666666666667 },\n { _id : 6, type : \"die\", experimentId :\"r16\", description : \"Roll a 1 then a 6\", eventNum : 2, probability : 0.16666666666667 },\n { _id : 7, type : \"card\", experimentId :\"dak\", description : \"Draw an ace, then a king\", eventNum : 1, probability : 0.07692307692308 },\n { _id : 8, type : \"card\", experimentId :\"dak\", description : \"Draw an ace, then a king\", eventNum : 2, probability : 0.07843137254902 }\n] )" + }, { + "role" : "ACTION", + "sha256" : "dd9ae87b2f7bda7a46b61875fa340d9336d1adef74bea0383adc77d8d461fec7", + "text" : "db.probability.aggregate(\n [\n {\n $group: {\n _id: \"$experimentId\",\n probabilityArr: { $push: \"$probability\" }\n }\n },\n {\n $project: {\n description: 1,\n results: {\n $reduce: {\n input: \"$probabilityArr\",\n initialValue: 1,\n in: { $multiply: [ \"$$value\", \"$$this\" ] }\n }\n }\n }\n }\n ]\n)" + }, { + "role" : "EXPECTED", + "sha256" : "230896b67f2493a692f628946849515fe1deaed7b4756ad02e59478f6f09a0e1", + "text" : "{ _id : \"dak\", results : 0.00603318250377101 }\n{ _id : \"r5\", results : 0.16666666666667 }\n{ _id : \"r16\", results : 0.027777777777778886 }\n{ _id : \"d3rc\", results : 0.11764705882352879 }" + } ], "detail" : null, - "owner" : "aggregation/expressions/reduce/multiplication", - "status" : "OWNED", - "stem" : null, - "title" : "Multiplication" + "owner" : null, + "status" : "UNOWNED", + "stem" : "probability", + "title" : "Probability" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "f26f99ec51e6019f15414a7a51186fc0c76a4a7ad8a8e7fd0d249d8629334137", + "text" : "db.clothes.insertMany( [\n { _id : 1, productId : \"ts1\", description : \"T-Shirt\", color : \"black\", size : \"M\", price : 20, discounts : [ 0.5, 0.1 ] },\n { _id : 2, productId : \"j1\", description : \"Jeans\", color : \"blue\", size : \"36\", price : 40, discounts : [ 0.25, 0.15, 0.05 ] },\n { _id : 3, productId : \"s1\", description : \"Shorts\", color : \"beige\", size : \"32\", price : 30, discounts : [ 0.15, 0.05 ] },\n { _id : 4, productId : \"ts2\", description : \"Cool T-Shirt\", color : \"White\", size : \"L\", price : 25, discounts : [ 0.3 ] },\n { _id : 5, productId : \"j2\", description : \"Designer Jeans\", color : \"blue\", size : \"30\", price : 80, discounts : [ 0.1, 0.25 ] }\n] )" + }, { + "role" : "ACTION", + "sha256" : "f6d0cef619e73f342ae7c42a2cd149f44714f242e01b68b10cd6b2b78937f847", + "text" : "db.clothes.aggregate(\n [\n {\n $project: {\n discountedPrice: {\n $reduce: {\n input: \"$discounts\",\n initialValue: \"$price\",\n in: { $multiply: [ \"$$value\", { $subtract: [ 1, \"$$this\" ] } ] }\n }\n }\n }\n }\n ]\n)" + }, { + "role" : "EXPECTED", + "sha256" : "16ff52670af2ba3e1984b959a239573e94cc6eef5687477ad8dcad26833215bc", + "text" : "{ _id : ObjectId(\"57c893067054e6e47674ce01\"), discountedPrice : 9 }\n{ _id : ObjectId(\"57c9932b7054e6e47674ce12\"), discountedPrice : 24.224999999999998 }\n{ _id : ObjectId(\"57c993457054e6e47674ce13\"), discountedPrice : 24.224999999999998 }\n{ _id : ObjectId(\"57c993687054e6e47674ce14\"), discountedPrice : 17.5 }\n{ _id : ObjectId(\"57c993837054e6e47674ce15\"), discountedPrice : 54 }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "discountedMerchandise", + "title" : "Discounted Merchandise" }, { "blocks" : [ ], "detail" : null, @@ -4599,16 +4020,42 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "6a365da58bb3d342c4af4ff82601fc3546f3664792c87872f8feb8e3c00accb8", - "text" : "db.people.aggregate( [\n {\n $project: {\n _id: 0,\n name: 1,\n text: {\n $reduce: {\n input: \"$hobbies\",\n initialValue: \"My hobbies include:\",\n valueAs: \"accumulatedText\",\n as: \"hobby\",\n arrayIndexAs: \"myIndex\",\n in: {\n $concat: [\n \"$$accumulatedText\",\n \" \", \n { $toString: { $add: [ \"$$myIndex\", 1 ] } }, \n \") \", \n \"$$hobby\" \n ]\n }\n }\n }\n }\n }\n] )" + "sha256" : "4ba20a3bfe44b82692b31a8ff23810eac72b08693cc7e8aecf0322f4e8484751", + "text" : "db.arrayconcat.aggregate(\n [\n {\n $project: {\n collapsed: {\n $reduce: {\n input: \"$arr\",\n initialValue: [ ],\n in: { $concatArrays: [ \"$$value\", \"$$this\" ] }\n }\n }\n }\n }\n ]\n)" + }, { + "role" : "EXPECTED", + "sha256" : "f07ada866e8cda04a03ce5121fd8ee69e69d660e4176e8517571d3bb7bca0a4e", + "text" : "{ _id : 1, collapsed : [ 24, 55, 79, 14, 78, 35, 84, 90, 3, 50, 89, 70 ] }\n{ _id : 2, collapsed : [ 39, 32, 43, 7, 62, 17, 80, 64, 17, 88, 11, 73 ] }\n{ _id : 3, collapsed : [ 42, 26, 59, 17, 72, 19, 35 ] }\n{ _id : 4, collapsed : null }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "computingASingleReduction", + "title" : "Computing a Single Reduction" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "a017e046f31fe9b3ea8c8db4c18fbc6bae0f9235db280acae8f0daa9c146d86c", + "text" : "db.arrayconcat.aggregate(\n [\n {\n $project: {\n results: {\n $reduce: {\n input: \"$arr\",\n initialValue: [ ],\n in: {\n collapsed: {\n $concatArrays: [ \"$$value.collapsed\", \"$$this\" ]\n },\n firstValues: {\n $concatArrays: [ \"$$value.firstValues\", { $slice: [ \"$$this\", 1 ] } ]\n }\n }\n }\n }\n }\n }\n ]\n)" }, { + "role" : "EXPECTED", + "sha256" : "f58a2557012682a38d2302657900a86565b90111c70f8fc9540cb59c12b6db5e", + "text" : "{ _id : 1, results : { collapsed : [ 24, 55, 79, 14, 78, 35, 84, 90, 3, 50, 89, 70 ], firstValues : [ 24, 14, 84, 50 ] } }\n{ _id : 2, results : { collapsed : [ 39, 32, 43, 7, 62, 17, 80, 64, 17, 88, 11, 73 ], firstValues : [ 39, 62, 17 ] } }\n{ _id : 3, results : { collapsed : [ 42, 26, 59, 17, 72, 19, 35 ], firstValues : [ 42, 26, 17, 72 ] } }\n{ _id : 4, results : null }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "computingAMultipleReductions", + "title" : "Computing a Multiple Reductions" + }, { + "blocks" : [ { "role" : "DATA", "sha256" : "80e6402e0dac8d11723826a9402d2496b074dbe1ef3141d713a6d0872e9f2208", "text" : "db.people.insertMany( [\n { _id: 1, name: \"Melissa\", hobbies: [ \"softball\", \"drawing\", \"reading\" ] },\n { _id: 2, name: \"Brad\", hobbies: [ \"gaming\", \"skateboarding\" ] },\n { _id: 3, name: \"Scott\", hobbies: [ \"basketball\", \"music\", \"fishing\" ] },\n { _id: 4, name: \"Tracey\", hobbies: [ \"acting\", \"yoga\" ] },\n { _id: 5, name: \"Josh\", hobbies: [ \"programming\" ] },\n { _id: 6, name: \"Claire\" }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "780e7a8b414ff2ac938e4e2ce9aaab38208318b54e220ee2a794db47392ae0c3", - "text" : "[\n { \"name\" : \"Melissa\", \"text\" : \"My hobbies include: 1) softball 2) drawing 3) reading\" }\n { \"name\" : \"Brad\", \"text\" : \"My hobbies include: 1) gaming 2) skateboarding\" }\n { \"name\" : \"Scott\", \"text\" : \"My hobbies include: 1) basketball 2) music 3) fishing\" }\n { \"name\" : \"Tracey\", \"text\" : \"My hobbies include: 1) acting 2) yoga\" }\n { \"name\" : \"Josh\", \"text\" : \"My hobbies include: 1) programming\" }\n { \"name\" : \"Claire\", \"text\" : null }\n]" + "role" : "ACTION", + "sha256" : "209a5d5dd2d7077f9fb914fb48f47eea37473980946ff7ead71673d7a2011b92", + "text" : "db.people.aggregate( [\n {\n $project: {\n _id: 0,\n name: 1,\n text: {\n $reduce: {\n input: \"$hobbies\",\n initialValue: \"My hobbies include:\",\n valueAs: \"accumulatedText\",\n as: \"hobby\",\n arrayIndexAs: \"myIndex\",\n in: {\n $concat: [\n \"$$accumulatedText\",\n \" \",\n { $toString: { $add: [ \"$$myIndex\", 1 ] } },\n \") \",\n \"$$hobby\"\n ]\n }\n }\n }\n }\n }\n] )" } ], "detail" : null, "owner" : null, @@ -4617,36 +4064,21 @@ "title" : "Access the Index of Each Item in an Array" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "867f6fddad397914c1f480e3bfe09274d3074a6d245d0934e14c8808a717f022", - "text" : "db.people.aggregate( [\n {\n $project: {\n _id: 0,\n name: 1,\n text: {\n $reduce: {\n input: \"$hobbies\",\n initialValue: \"My hobbies include:\",\n valueAs: \"accumulatedText\",\n as: \"hobby\",\n in: {\n $concat: [\n \"$$accumulatedText\",\n \" \", \n { $toString: { $add: [ \"$$IDX\", 1 ] } }, \n \") \", \n \"$$hobby\" \n ]\n }\n }\n }\n }\n }\n] )" - }, { "role" : "DATA", - "sha256" : "0cad12a4f40cbadb9900f35f401833bf969feace379372bfbfe7e016b3138f2e", - "text" : "db.events.insertMany( [\n { _id : 1, type : \"die\", experimentId :\"r5\", description : \"Roll a 5\", eventNum : 1, probability : 0.16666666666667 },\n { _id : 2, type : \"card\", experimentId :\"d3rc\", description : \"Draw 3 red cards\", eventNum : 1, probability : 0.5 },\n { _id : 3, type : \"card\", experimentId :\"d3rc\", description : \"Draw 3 red cards\", eventNum : 2, probability : 0.49019607843137 },\n { _id : 4, type : \"card\", experimentId :\"d3rc\", description : \"Draw 3 red cards\", eventNum : 3, probability : 0.48 },\n { _id : 5, type : \"die\", experimentId :\"r16\", description : \"Roll a 1 then a 6\", eventNum : 1, probability : 0.16666666666667 },\n { _id : 6, type : \"die\", experimentId :\"r16\", description : \"Roll a 1 then a 6\", eventNum : 2, probability : 0.16666666666667 },\n { _id : 7, type : \"card\", experimentId :\"dak\", description : \"Draw an ace, then a king\", eventNum : 1, probability : 0.07692307692308 },\n { _id : 8, type : \"card\", experimentId :\"dak\", description : \"Draw an ace, then a king\", eventNum : 2, probability : 0.07843137254902 }\n] )" + "sha256" : "80e6402e0dac8d11723826a9402d2496b074dbe1ef3141d713a6d0872e9f2208", + "text" : "db.people.insertMany( [\n { _id: 1, name: \"Melissa\", hobbies: [ \"softball\", \"drawing\", \"reading\" ] },\n { _id: 2, name: \"Brad\", hobbies: [ \"gaming\", \"skateboarding\" ] },\n { _id: 3, name: \"Scott\", hobbies: [ \"basketball\", \"music\", \"fishing\" ] },\n { _id: 4, name: \"Tracey\", hobbies: [ \"acting\", \"yoga\" ] },\n { _id: 5, name: \"Josh\", hobbies: [ \"programming\" ] },\n { _id: 6, name: \"Claire\" }\n] )" + }, { + "role" : "ACTION", + "sha256" : "a921b8c9ea5c3d78c9f96045af9888ddd9cf4621dfe8d8098c36736347a06332", + "text" : "db.people.aggregate( [\n {\n $project: {\n _id: 0,\n name: 1,\n text: {\n $reduce: {\n input: \"$hobbies\",\n initialValue: \"My hobbies include:\",\n valueAs: \"accumulatedText\",\n as: \"hobby\",\n in: {\n $concat: [\n \"$$accumulatedText\",\n \" \",\n { $toString: { $add: [ \"$$IDX\", 1 ] } },\n \") \",\n \"$$hobby\"\n ]\n }\n }\n }\n }\n }\n] )" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", "stem" : "useIdxToAccessTheIndex", - "title" : "Use ``$$IDX`` to Access the Index" - } ], - "includes" : [ { - "blob" : "5eea7db82afdd4723cac7050891df1f7c7042823", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null.yaml" - }, { - "blob" : "ee40a9d1b0d38be8227b5f23cea8c85c217aeb5a", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null-base.yaml" - }, { - "blob" : "0516c5852f57b4a3519679fb038cb202fa4b00f2", - "path" : "content/manual/manual/source/includes/people-collection.rst" - }, { - "blob" : "fa497252a814cda667fcacafe089f4bb8f116755", - "path" : "content/manual/manual/source/includes/reduce-index-example-output.rst" - }, { - "blob" : "2fdfeda0983550843de7b5305cf2f4a7453e7511", - "path" : "content/manual/manual/source/includes/IDX-use.rst" + "title" : "Use $$IDX to Access the Index" } ], + "includes" : [ ], "operator" : "reduce", "pageBlob" : "01571ab3b83305ca7de00d3ce33edc927ccf4c93", "source" : { @@ -4658,20 +4090,136 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/regexFind/regexFindAndItsOptions", "status" : "OWNED", "stem" : null, - "title" : "``$regexFind`` and Its Options" + "title" : "$regexFind and Its Options" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "a51fe07f87e9134c7fdd641b8b84427518309961a9919c87bc9c3b419416333e", - "text" : "db.feedback.aggregate( [ \n { $addFields: { \n \"email\": { $regexFind: { input: \"$comment\", regex: /[a-z0-9_.+-]+@[a-z0-9_.+-]+\\.[a-z0-9_.+-]+/i } }\n } },\n { $set: { email: \"$email.match\"} }\n] )" - }, { "role" : "DATA", - "sha256" : "24677fce8a66867457e197b2cc628e2b173e2dacfbc4efa5373998a3303854ab", - "text" : "db.feedback.insertMany([\n { \"_id\" : 1, comment: \"Hi, I'm just reading about MongoDB -- aunt.arc.tica@example.com\" },\n { \"_id\" : 2, comment: \"I wanted to concatenate a string\" },\n { \"_id\" : 3, comment: \"How do I convert a date to string? cam@mongodb.com\" },\n { \"_id\" : 4, comment: \"It's just me. I'm testing. fred@MongoDB.com\" }\n])" + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "1f2f7891906c9b6c5c06ccceb58ed22c3bc1eb2ca7e4886c3158a982eec9a4ce", + "text" : "db.products.aggregate([\n { $addFields: { returnObject: { $regexFind: { input: \"$description\", regex: /lin(e|k)/ } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "6c72b683067b81fff90351d775645be2b8aea4e0c83faabff9793e548592a685", + "text" : "{ \"_id\" : 1, \"description\" : \"Single LINE description.\", \"returnObject\" : null }\n{ \"_id\" : 2, \"description\" : \"First lines\\nsecond line\", \"returnObject\" : { \"match\" : \"line\", \"idx\" : 6, \"captures\" : [ \"e\" ] } }\n{ \"_id\" : 3, \"description\" : \"Many spaces before line\", \"returnObject\" : { \"match\" : \"line\", \"idx\" : 23, \"captures\" : [ \"e\" ] } }\n{ \"_id\" : 4, \"description\" : \"Multiple\\nline descriptions\", \"returnObject\" : { \"match\" : \"line\", \"idx\" : 9, \"captures\" : [ \"e\" ] } }\n{ \"_id\" : 5, \"description\" : \"anchors, links and hyperlinks\", \"returnObject\" : { \"match\" : \"link\", \"idx\" : 9, \"captures\" : [ \"k\" ] } }\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"returnObject\" : null }" + } ], + "detail" : null, + "name" : "Find the First Line or Link", + "owner" : null, + "status" : "UNOWNED", + "stem" : "findTheFirstLineOrLink", + "title" : "$regexFind and Its Options" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "24c1c746b2f6fd9901735f7bc30d5746505114fe597c17463b54cb9ded748d06", + "text" : "db.products.aggregate([\n { $addFields: { returnObject: { $regexFind: { input: \"$description\", regex: /tier/ } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "545d206489fbe6f56808e560a4f5f40e5aebb396d4c210bb79da2dd46e92ec7c", + "text" : "{ \"_id\" : 1, \"description\" : \"Single LINE description.\", \"returnObject\" : null }\n{ \"_id\" : 2, \"description\" : \"First lines\\nsecond line\", \"returnObject\" : null }\n{ \"_id\" : 3, \"description\" : \"Many spaces before line\", \"returnObject\" : null }\n{ \"_id\" : 4, \"description\" : \"Multiple\\nline descriptions\", \"returnObject\" : null }\n{ \"_id\" : 5, \"description\" : \"anchors, links and hyperlinks\", \"returnObject\" : null }\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\",\n \"returnObject\" : { \"match\" : \"tier\", \"idx\" : 2, \"captures\" : [ ] } }" + } ], + "detail" : null, + "name" : "Find the First Tier", + "owner" : null, + "status" : "UNOWNED", + "stem" : "findTheFirstTier", + "title" : "$regexFind and Its Options" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "51e6aaecd70d44c3286be427c288aef8ed089026d2a16b79ed4c7f05078411c0", + "text" : "db.products.aggregate([\n { $addFields: { returnObject: { $regexFind: { input: \"$description\", regex: /line/i } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "2f342a8560b57b2a98241718b42670cecfd94e04d53a9ed65587327cb617380c", + "text" : "{ \"_id\" : 1, \"description\" : \"Single LINE description.\", \"returnObject\" : { \"match\" : \"LINE\", \"idx\" : 7, \"captures\" : [ ] } }\n{ \"_id\" : 2, \"description\" : \"First lines\\nsecond line\", \"returnObject\" : { \"match\" : \"line\", \"idx\" : 6, \"captures\" : [ ] } }\n{ \"_id\" : 3, \"description\" : \"Many spaces before line\", \"returnObject\" : { \"match\" : \"line\", \"idx\" : 23, \"captures\" : [ ] } }\n{ \"_id\" : 4, \"description\" : \"Multiple\\nline descriptions\", \"returnObject\" : { \"match\" : \"line\", \"idx\" : 9, \"captures\" : [ ] } }\n{ \"_id\" : 5, \"description\" : \"anchors, links and hyperlinks\", \"returnObject\" : null }\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"returnObject\" : null }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "iOption", + "title" : "i Option" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "bdfc200dd43d13fe68dbcf10988bb999f60bc3474eab30af14038bc30ff33e7c", + "text" : "db.products.aggregate([\n { $addFields: { returnObject: { $regexFind: { input: \"$description\", regex: /^s/im } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "69d3e28d423776ff02ba17c13c08582fe9b724bb234314dcf581872936ef7b31", + "text" : "{ \"_id\" : 1, \"description\" : \"Single LINE description.\", \"returnObject\" : { \"match\" : \"S\", \"idx\" : 0, \"captures\" : [ ] } }\n{ \"_id\" : 2, \"description\" : \"First lines\\nsecond line\", \"returnObject\" : { \"match\" : \"s\", \"idx\" : 12, \"captures\" : [ ] } }\n{ \"_id\" : 3, \"description\" : \"Many spaces before line\", \"returnObject\" : null }\n{ \"_id\" : 4, \"description\" : \"Multiple\\nline descriptions\", \"returnObject\" : null }\n{ \"_id\" : 5, \"description\" : \"anchors, links and hyperlinks\", \"returnObject\" : null }\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"returnObject\" : null }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "mOption", + "title" : "m Option" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "1077e700bafce2fc24445f36d94c89d2e337dd9aa84d6f10cc56127a186bf47b", + "text" : "db.products.aggregate([\n { $addFields: { returnObject: { $regexFind: { input: \"$description\", regex: /lin(e|k) # matches line or link/, options:\"x\" } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "6c72b683067b81fff90351d775645be2b8aea4e0c83faabff9793e548592a685", + "text" : "{ \"_id\" : 1, \"description\" : \"Single LINE description.\", \"returnObject\" : null }\n{ \"_id\" : 2, \"description\" : \"First lines\\nsecond line\", \"returnObject\" : { \"match\" : \"line\", \"idx\" : 6, \"captures\" : [ \"e\" ] } }\n{ \"_id\" : 3, \"description\" : \"Many spaces before line\", \"returnObject\" : { \"match\" : \"line\", \"idx\" : 23, \"captures\" : [ \"e\" ] } }\n{ \"_id\" : 4, \"description\" : \"Multiple\\nline descriptions\", \"returnObject\" : { \"match\" : \"line\", \"idx\" : 9, \"captures\" : [ \"e\" ] } }\n{ \"_id\" : 5, \"description\" : \"anchors, links and hyperlinks\", \"returnObject\" : { \"match\" : \"link\", \"idx\" : 9, \"captures\" : [ \"k\" ] } }\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"returnObject\" : null }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "xOption", + "title" : "x Option" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "ecad784479cac228d3afca68828ebc54b2fc8b8da075d3931c995027e356809e", + "text" : "db.products.aggregate([\n { $addFields: { returnObject: { $regexFind: { input: \"$description\", regex:/m.*line/, options: \"si\" } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "35abf1d716d655e181019d4f2a4aa47230b72936182e3f01aa73e63899cc3023", + "text" : "{ \"_id\" : 1, \"description\" : \"Single LINE description.\", \"returnObject\" : null }\n{ \"_id\" : 2, \"description\" : \"First lines\\nsecond line\", \"returnObject\" : null }\n{ \"_id\" : 3, \"description\" : \"Many spaces before line\", \"returnObject\" : { \"match\" : \"Many spaces before line\", \"idx\" : 0, \"captures\" : [ ] } }\n{ \"_id\" : 4, \"description\" : \"Multiple\\nline descriptions\", \"returnObject\" : { \"match\" : \"Multiple\\nline\", \"idx\" : 0, \"captures\" : [ ] } }\n{ \"_id\" : 5, \"description\" : \"anchors, links and hyperlinks\", \"returnObject\" : null }\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"returnObject\" : null }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "sOption", + "title" : "s Option" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "24677fce8a66867457e197b2cc628e2b173e2dacfbc4efa5373998a3303854ab", + "text" : "db.feedback.insertMany([\n { \"_id\" : 1, comment: \"Hi, I'm just reading about MongoDB -- aunt.arc.tica@example.com\" },\n { \"_id\" : 2, comment: \"I wanted to concatenate a string\" },\n { \"_id\" : 3, comment: \"How do I convert a date to string? cam@mongodb.com\" },\n { \"_id\" : 4, comment: \"It's just me. I'm testing. fred@MongoDB.com\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "4d2ef4c19e8b8a99b87a28a038cd30dad909c64f3745b05c58bbadf07ccc1c64", + "text" : "db.feedback.aggregate( [\n { $addFields: {\n \"email\": { $regexFind: { input: \"$comment\", regex: /[a-z0-9_.+-]+@[a-z0-9_.+-]+\\.[a-z0-9_.+-]+/i } }\n } },\n { $set: { email: \"$email.match\"} }\n] )" }, { "role" : "EXPECTED", "sha256" : "b31a3c019305eec14a58599f0aacb2322f5c64bcdeb0c335bed548590b0af465", @@ -4681,16 +4229,16 @@ "owner" : null, "status" : "UNOWNED", "stem" : "useRegexFindToParseEmailFromString", - "title" : "Use ``$regexFind`` to Parse Email from String" + "title" : "Use $regexFind to Parse Email from String" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "d7fa0c7ea92b94c8f4623d815c5031168149df8d1ac11aae49a024e66d779887", - "text" : "db.contacts.aggregate( [ \n { $unwind: \"$details\" },\n { $addFields: { \n \"regexemail\": { $regexFind: { input: \"$details\", regex: /^[a-z0-9_.+-]+@[a-z0-9_.+-]+\\.[a-z0-9_.+-]+$/, options: \"i\" } }, \n \"regexphone\": { $regexFind: { input: \"$details\", regex: /^[+]{0,1}[0-9]*\\-?[0-9_\\-]+$/ } } \n } },\n { $project: { _id: 1, name: 1, details: { email: \"$regexemail.match\", phone: \"$regexphone.match\" } } },\n { $group: { _id: \"$_id\", name: { $first: \"$name\" }, details: { $mergeObjects: \"$details\"} } },\n { $sort: { _id: 1 } }\n])" - }, { "role" : "DATA", "sha256" : "b8b7b6673e6cb1e75381563bde822f6f3b369a0aea3f3b46b007f7bea24a3cea", "text" : "db.contacts.insertMany([\n { \"_id\" : 1, name: \"Aunt Arc Tikka\", details: [ \"+672-19-9999\", \"aunt.arc.tica@example.com\" ] },\n { \"_id\" : 2, name: \"Belle Gium\", details: [ \"+32-2-111-11-11\", \"belle.gium@example.com\" ] },\n { \"_id\" : 3, name: \"Cam Bo Dia\", details: [ \"+855-012-000-0000\", \"cam.bo.dia@example.com\" ] },\n { \"_id\" : 4, name: \"Fred\", details: [ \"+1-111-222-3333\" ] }\n])" + }, { + "role" : "ACTION", + "sha256" : "20d68802874911b09de304ccda8818373fcd3c646e26ac5c795bfeda18d0f12e", + "text" : "db.contacts.aggregate( [\n { $unwind: \"$details\" },\n { $addFields: {\n \"regexemail\": { $regexFind: { input: \"$details\", regex: /^[a-z0-9_.+-]+@[a-z0-9_.+-]+\\.[a-z0-9_.+-]+$/, options: \"i\" } },\n \"regexphone\": { $regexFind: { input: \"$details\", regex: /^[+]{0,1}[0-9]*\\-?[0-9_\\-]+$/ } }\n } },\n { $project: { _id: 1, name: 1, details: { email: \"$regexemail.match\", phone: \"$regexphone.match\" } } },\n { $group: { _id: \"$_id\", name: { $first: \"$name\" }, details: { $mergeObjects: \"$details\"} } },\n { $sort: { _id: 1 } }\n])" }, { "role" : "EXPECTED", "sha256" : "11689a12a1e50e404b10aecc77ab4fe4624518d20869f65a81cf95c84e6da980", @@ -4700,16 +4248,16 @@ "owner" : null, "status" : "UNOWNED", "stem" : "applyRegexFindToStringElementsOfAnArray", - "title" : "Apply ``$regexFind`` to String Elements of an Array" + "title" : "Apply $regexFind to String Elements of an Array" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "67640c8da5b65ed25ef0a295351c2ce54ba752bcb969996e31bf5aa2c90e4431", - "text" : "db.employees.aggregate( [ \n { $addFields: { \n \"username\": { $regexFind: { input: \"$email\", regex: /^([a-z0-9_.+-]+)@[a-z0-9_.+-]+\\.[a-z0-9_.+-]+$/, options: \"i\" } },\n } },\n { $set: { username: { $arrayElemAt: [ \"$username.captures\", 0 ] } } }\n] )" - }, { "role" : "DATA", "sha256" : "82363cdfa908ed842d405f6ca8afbb97965d6a4559d1783d8cde0f088f85d8e8", "text" : "db.employees.insertMany([\n { \"_id\" : 1, name: \"Aunt Arc Tikka\", \"email\" : \"aunt.tica@example.com\" },\n { \"_id\" : 2, name: \"Belle Gium\", \"email\" : \"belle.gium@example.com\" },\n { \"_id\" : 3, name: \"Cam Bo Dia\", \"email\" : \"cam.dia@example.com\" },\n { \"_id\" : 4, name: \"Fred\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "7a0b4da20f9eaee795ad43eb3342ce95b018077ea5de02483a0e4c553f0fdc72", + "text" : "db.employees.aggregate( [\n { $addFields: {\n \"username\": { $regexFind: { input: \"$email\", regex: /^([a-z0-9_.+-]+)@[a-z0-9_.+-]+\\.[a-z0-9_.+-]+$/, options: \"i\" } },\n } },\n { $set: { username: { $arrayElemAt: [ \"$username.captures\", 0 ] } } }\n] )" }, { "role" : "EXPECTED", "sha256" : "fe3909685b492d3067af6719af2774da6f09d6d8d861953b1f0fdbe6d7f6b137", @@ -4721,19 +4269,7 @@ "stem" : "useCapturedGroupingsToParseUserName", "title" : "Use Captured Groupings to Parse User Name" } ], - "includes" : [ { - "blob" : "0e391e7820b2d3a5ef43f73a3ca2068f66ebb47e", - "path" : "content/manual/manual/source/includes/extracts-agg-regex.yaml" - }, { - "blob" : "1c76d95ca483b2924600db416405d9e9850d96b3", - "path" : "content/manual/manual/source/includes/fact-6.1-pcre2.rst" - }, { - "blob" : "c5cb26283c1d1fe619766db346970ef1cd095a57", - "path" : "content/manual/manual/source/includes/regex-operator-collation.rst" - }, { - "blob" : "9b1ab813b944c95f7ecee915128bfc59388c131b", - "path" : "content/manual/manual/source/includes/regex-collation-example-output.rst" - } ], + "includes" : [ ], "operator" : "regexFind", "pageBlob" : "6eef6372b1690cfaabb5cdf7299fa09d8b021a52", "source" : { @@ -4745,20 +4281,136 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/regexFindAll/regexFindAllAndItsOptions", "status" : "OWNED", "stem" : null, - "title" : "``$regexFindAll`` and Its Options" + "title" : "$regexFindAll and Its Options" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "1f04ac6bf1584e79290aa03c41508ed82d069cd8152115357e399412aaf0caa1", + "text" : "db.products.aggregate([\n { $addFields: { returnObject: { $regexFindAll: { input: \"$description\", regex: /lin(e|k)/ } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "d8cd4d799b3bf2c20102cac69bf87b223d0da761cd987aded592ccccd3e3735e", + "text" : "{\n \"_id\" : 1,\n \"description\" : \"Single LINE description.\",\n \"returnObject\": [ ]\n}\n{\n \"_id\" : 2,\n \"description\" : \"First lines\\nsecond line\",\n \"returnObject\" : [ { \"match\" : \"line\", \"idx\" : 6, \"captures\" : [ \"e\" ] }, { \"match\" : \"line\", \"idx\" : 19, \"captures\" : [ \"e\" ] } ]\n}\n{\n \"_id\" : 3,\n \"description\" : \"Many spaces before line\",\n \"returnObject\" : [ { \"match\" : \"line\", \"idx\" : 23, \"captures\" : [ \"e\" ] } ]\n}\n{\n \"_id\" : 4,\n \"description\" : \"Multiple\\nline descriptions\",\n \"returnObject\" : [ { \"match\" : \"line\", \"idx\" : 9, \"captures\" : [ \"e\" ] } ]\n}\n{\n \"_id\" : 5,\n \"description\" : \"anchors, links and hyperlinks\",\n \"returnObject\" : [ { \"match\" : \"link\", \"idx\" : 9, \"captures\" : [ \"k\" ] }, { \"match\" : \"link\", \"idx\" : 24, \"captures\" : [ \"k\" ] } ]\n}\n{\n \"_id\" : 6,\n \"description\" : \"mĂ©tier work vocation\",\n \"returnObject\" : [ ]\n}" + } ], + "detail" : null, + "name" : "Find Every Line or Link", + "owner" : null, + "status" : "UNOWNED", + "stem" : "findEveryLineOrLink", + "title" : "$regexFindAll and Its Options" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "6ef2436039f65b91884b9e03e3c18fef963f33750c2133b5178cc7903967c7a8", + "text" : "db.products.aggregate([\n { $addFields: { returnObject: { $regexFindAll: { input: \"$description\", regex: /tier/ } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "9e7d981f8436128f9b49a4c9d58d53eb61ab01ce06e3a51ef68cef401209be0c", + "text" : "{ \"_id\" : 1, \"description\" : \"Single LINE description.\", \"returnObject\" : [ ] }\n{ \"_id\" : 2, \"description\" : \"First lines\\nsecond line\", \"returnObject\" : [ ] }\n{ \"_id\" : 3, \"description\" : \"Many spaces before line\", \"returnObject\" : [ ] }\n{ \"_id\" : 4, \"description\" : \"Multiple\\nline descriptions\", \"returnObject\" : [ ] }\n{ \"_id\" : 5, \"description\" : \"anchors, links and hyperlinks\", \"returnObject\" : [ ] }\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\",\n \"returnObject\" : [ { \"match\" : \"tier\", \"idx\" : 2, \"captures\" : [ ] } ] }" + } ], + "detail" : null, + "name" : "Find Every Tier", + "owner" : null, + "status" : "UNOWNED", + "stem" : "findEveryTier", + "title" : "$regexFindAll and Its Options" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "b6606a5a4a40c907874589eaa6ccf9cbc6b3980797ea0627e629a0675d3c3d9c", + "text" : "db.products.aggregate([\n { $addFields: { returnObject: { $regexFindAll: { input: \"$description\", regex: /line/i } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "97cbe034bae296f896ebe10b588151507f50eaa5d525c2d81748b226465b9d8f", + "text" : "{\n \"_id\" : 1,\n \"description\" : \"Single LINE description.\",\n \"returnObject\" : [ { \"match\" : \"LINE\", \"idx\" : 7, \"captures\" : [ ] } ]\n}\n{\n \"_id\" : 2,\n \"description\" : \"First lines\\nsecond line\",\n \"returnObject\" : [ { \"match\" : \"line\", \"idx\" : 6, \"captures\" : [ ] }, { \"match\" : \"line\", \"idx\" : 19, \"captures\" : [ ] } ]\n}\n{\n \"_id\" : 3,\n \"description\" : \"Many spaces before line\",\n \"returnObject\" : [ { \"match\" : \"line\", \"idx\" : 23, \"captures\" : [ ] } ]\n}\n{\n \"_id\" : 4,\n \"description\" : \"Multiple\\nline descriptions\",\n \"returnObject\" : [ { \"match\" : \"line\", \"idx\" : 9, \"captures\" : [ ] } ]\n}\n{\n \"_id\" : 5,\n \"description\" : \"anchors, links and hyperlinks\",\n \"returnObject\" : [ ]\n}\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"returnObject\" : [ ] }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "iOption", + "title" : "i Option" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "8af3f1eaf950e87eacf7702a6db6115b746a79b93b976767592ee03cceceb701", + "text" : "db.products.aggregate([\n { $addFields: { returnObject: { $regexFindAll: { input: \"$description\", regex: /^s/im } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "511db9da357ea5db68dfd7ea984f199fec265e8dec131257a074a0cf5f4f4168", + "text" : "{\n \"_id\" : 1,\n \"description\" : \"Single LINE description.\",\n \"returnObject\" : [ { \"match\" : \"S\", \"idx\" : 0, \"captures\" : [ ] } ]\n}\n{\n \"_id\" : 2,\n \"description\" : \"First lines\\nsecond line\",\n \"returnObject\" : [ { \"match\" : \"s\", \"idx\" : 12, \"captures\" : [ ] } ]\n}\n{\n \"_id\" : 3,\n \"description\" : \"Many spaces before line\",\n \"returnObject\" : [ ]\n}\n{\n \"_id\" : 4,\n \"description\" : \"Multiple\\nline descriptions\",\n \"returnObject\" : [ ]\n}\n{\n \"_id\" : 5,\n \"description\" : \"anchors, links and hyperlinks\",\n \"returnObject\" : [ ]\n}\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"returnObject\" : [ ] }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "mOption", + "title" : "m Option" }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "7d6a3e7fb3f9b51323f3d9de11f7bedb57b5e367d4e2ac55590eec7585b6f4ef", + "text" : "db.products.aggregate([\n { $addFields: { returnObject: { $regexFindAll: { input: \"$description\", regex: /lin(e|k) # matches line or link/, options:\"x\" } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "51d4282aad1949c223214c779c6fabaed692dfcbc311982e18399c8f452dbe47", + "text" : "{\n \"_id\" : 1,\n \"description\" : \"Single LINE description.\",\n \"returnObject\" : [ ]\n}\n{\n \"_id\" : 2,\n \"description\" : \"First lines\\nsecond line\",\n \"returnObject\" : [ { \"match\" : \"line\", \"idx\" : 6, \"captures\" : [ \"e\" ] }, { \"match\" : \"line\", \"idx\" : 19, \"captures\" : [ \"e\" ] } ]\n}\n{\n \"_id\" : 3,\n \"description\" : \"Many spaces before line\",\n \"returnObject\" : [ { \"match\" : \"line\", \"idx\" : 23, \"captures\" : [ \"e\" ] } ]\n}\n{\n \"_id\" : 4,\n \"description\" : \"Multiple\\nline descriptions\",\n \"returnObject\" : [ { \"match\" : \"line\", \"idx\" : 9, \"captures\" : [ \"e\" ] } ]\n}\n{\n \"_id\" : 5,\n \"description\" : \"anchors, links and hyperlinks\",\n \"returnObject\" : [ { \"match\" : \"link\", \"idx\" : 9, \"captures\" : [ \"k\" ] }, { \"match\" : \"link\", \"idx\" : 24, \"captures\" : [ \"k\" ] } ]\n}\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"returnObject\" : [ ] }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "xOption", + "title" : "x Option" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { "role" : "ACTION", - "sha256" : "d395c96c46d433595db67182065ff8f04b2b101592ca290f8265a4ac7aa39b84", - "text" : "db.feedback.aggregate( [ \n { $addFields: { \n \"email\": { $regexFindAll: { input: \"$comment\", regex: /[a-z0-9_.+-]+@[a-z0-9_.+-]+\\.[a-z0-9_.+-]+/i } }\n } },\n { $set: { email: \"$email.match\"} }\n] )" + "sha256" : "0f84a90c9f6fc91af8c2ed74c97a3891f133733c8a50217cf62d860585180125", + "text" : "db.products.aggregate([\n { $addFields: { returnObject: { $regexFindAll: { input: \"$description\", regex:/m.*line/, options: \"si\" } } } }\n])" }, { + "role" : "EXPECTED", + "sha256" : "c7f006bcea69cf74b68fb62b573a859598b2ad158b1ce1489ae4c100e214e6e1", + "text" : "{\n \"_id\" : 1,\n \"description\" : \"Single LINE description.\",\n \"returnObject\" : [ ]\n}\n{\n \"_id\" : 2,\n \"description\" : \"First lines\\nsecond line\",\n \"returnObject\" : [ ]\n}\n{\n \"_id\" : 3,\n \"description\" : \"Many spaces before line\",\n \"returnObject\" : [ { \"match\" : \"Many spaces before line\", \"idx\" : 0, \"captures\" : [ ] } ]\n}\n{\n \"_id\" : 4,\n \"description\" : \"Multiple\\nline descriptions\",\n \"returnObject\" : [ { \"match\" : \"Multiple\\nline\", \"idx\" : 0, \"captures\" : [ ] } ]\n}\n{\n \"_id\" : 5,\n \"description\" : \"anchors, links and hyperlinks\",\n \"returnObject\" : [ ]\n}\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"returnObject\" : [ ] }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "sOption", + "title" : "s Option" + }, { + "blocks" : [ { "role" : "DATA", "sha256" : "116e76798c8460e153a7aac489226517db89d344e7f65751504b0d1b8c278b2c", "text" : "db.feedback.insertMany([\n { \"_id\" : 1, comment: \"Hi, I'm just reading about MongoDB -- aunt.arc.tica@example.com\" },\n { \"_id\" : 2, comment: \"I wanted to concatenate a string\" },\n { \"_id\" : 3, comment: \"How do I convert a date to string? Contact me at either cam@mongodb.com or c.dia@mongodb.com\" },\n { \"_id\" : 4, comment: \"It's just me. I'm testing. fred@MongoDB.com\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "1cdd02e40fba5c961668e45b7f2f96019de278b01c33c73c076854503380e6a6", + "text" : "db.feedback.aggregate( [\n { $addFields: {\n \"email\": { $regexFindAll: { input: \"$comment\", regex: /[a-z0-9_.+-]+@[a-z0-9_.+-]+\\.[a-z0-9_.+-]+/i } }\n } },\n { $set: { email: \"$email.match\"} }\n] )" }, { "role" : "EXPECTED", "sha256" : "f1bd00f049b32189e977a40ab672b6a5c7067ca756c09dc6e9e80fc2b909e7da", @@ -4768,20 +4420,20 @@ "owner" : null, "status" : "UNOWNED", "stem" : "useRegexFindAllToParseEmailFromString", - "title" : "Use ``$regexFindAll`` to Parse Email from String" + "title" : "Use $regexFindAll to Parse Email from String" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "7a8c754e6cf5d4e2eb358f707a2ac8d3735f52f58b31fa51b868f4df552ecde5", - "text" : "db.feedback.aggregate( [ \n { $addFields: { \n \"names\": { $regexFindAll: { input: \"$comment\", regex: /([a-z0-9_.+-]+)@[a-z0-9_.+-]+\\.[a-z0-9_.+-]+/i } },\n } },\n { $set: { names: { $reduce: { input: \"$names.captures\", initialValue: [ ], in: { $concatArrays: [ \"$$value\", \"$$this\" ] } } } } }\n] )" - }, { "role" : "DATA", "sha256" : "116e76798c8460e153a7aac489226517db89d344e7f65751504b0d1b8c278b2c", "text" : "db.feedback.insertMany([\n { \"_id\" : 1, comment: \"Hi, I'm just reading about MongoDB -- aunt.arc.tica@example.com\" },\n { \"_id\" : 2, comment: \"I wanted to concatenate a string\" },\n { \"_id\" : 3, comment: \"How do I convert a date to string? Contact me at either cam@mongodb.com or c.dia@mongodb.com\" },\n { \"_id\" : 4, comment: \"It's just me. I'm testing. fred@MongoDB.com\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "5a1062013f7db3d1decf3b86cb6958b6017ec3d1205095ee3ac3459f573b3b2d", + "text" : "db.feedback.aggregate( [\n { $addFields: {\n \"names\": { $regexFindAll: { input: \"$comment\", regex: /([a-z0-9_.+-]+)@[a-z0-9_.+-]+\\.[a-z0-9_.+-]+/i } },\n } },\n { $set: { names: { $reduce: { input: \"$names.captures\", initialValue: [ ], in: { $concatArrays: [ \"$$value\", \"$$this\" ] } } } } }\n] )" }, { "role" : "EXPECTED", - "sha256" : "36b22df068729e812653db865b2977088a526d4458e4c85953ed63b94c007072", - "text" : "{\n \"_id\" : 1,\n \"comment\" : \"Hi, I'm just reading about MongoDB -- aunt.arc.tica@example.com\",\n \"names\" : [ { \"match\" : \"aunt.arc.tica@example.com\", \"idx\" : 38, \"captures\" : [ \"aunt.arc.tica\" ] } ] \n}\n\n{ \"_id\" : 2, \"comment\" : \"I wanted to concatenate a string\", \"names\" : [ ] }\n{\n \"_id\" : 3,\n \"comment\" : \"How do I convert a date to string? Contact me at either cam@mongodb.com or c.dia@mongodb.com\",\n \"names\" : [ \n { \"match\" : \"cam@mongodb.com\", \"idx\" : 56, \"captures\" : [ \"cam\" ] }, \n { \"match\" : \"c.dia@mongodb.com\", \"idx\" : 75, \"captures\" : [ \"c.dia\" ] }\n ]\n}\n{\n \"_id\" : 4,\n \"comment\" : \"It's just me. I'm testing. fred@MongoDB.com\",\n \"names\" : [ { \"match\" : \"fred@MongoDB.com\", \"idx\" : 28, \"captures\" : [ \"fred\" ] } ]\n}" + "sha256" : "f3ff4e8f17985e734c1a6f851368c02996da0914707c4883ca9df6d8d2d54c38", + "text" : "{\n \"_id\" : 1,\n \"comment\" : \"Hi, I'm just reading about MongoDB -- aunt.arc.tica@example.com\",\n \"names\" : [ { \"match\" : \"aunt.arc.tica@example.com\", \"idx\" : 38, \"captures\" : [ \"aunt.arc.tica\" ] } ]\n}\n\n{ \"_id\" : 2, \"comment\" : \"I wanted to concatenate a string\", \"names\" : [ ] }\n{\n \"_id\" : 3,\n \"comment\" : \"How do I convert a date to string? Contact me at either cam@mongodb.com or c.dia@mongodb.com\",\n \"names\" : [\n { \"match\" : \"cam@mongodb.com\", \"idx\" : 56, \"captures\" : [ \"cam\" ] },\n { \"match\" : \"c.dia@mongodb.com\", \"idx\" : 75, \"captures\" : [ \"c.dia\" ] }\n ]\n}\n{\n \"_id\" : 4,\n \"comment\" : \"It's just me. I'm testing. fred@MongoDB.com\",\n \"names\" : [ { \"match\" : \"fred@MongoDB.com\", \"idx\" : 28, \"captures\" : [ \"fred\" ] } ]\n}" } ], "detail" : null, "owner" : null, @@ -4789,19 +4441,7 @@ "stem" : "useCapturedGroupingsToParseUserName", "title" : "Use Captured Groupings to Parse User Name" } ], - "includes" : [ { - "blob" : "0e391e7820b2d3a5ef43f73a3ca2068f66ebb47e", - "path" : "content/manual/manual/source/includes/extracts-agg-regex.yaml" - }, { - "blob" : "1c76d95ca483b2924600db416405d9e9850d96b3", - "path" : "content/manual/manual/source/includes/fact-6.1-pcre2.rst" - }, { - "blob" : "c5cb26283c1d1fe619766db346970ef1cd095a57", - "path" : "content/manual/manual/source/includes/regex-operator-collation.rst" - }, { - "blob" : "9b1ab813b944c95f7ecee915128bfc59388c131b", - "path" : "content/manual/manual/source/includes/regex-collation-example-output.rst" - } ], + "includes" : [ ], "operator" : "regexFindAll", "pageBlob" : "6c91e501ff100cc7b742b9c129fda36c63e148ab", "source" : { @@ -4813,44 +4453,116 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/regexMatch/regexMatchAndItsOptions", "status" : "OWNED", "stem" : null, - "title" : "``$regexMatch`` and Its Options" + "title" : "$regexMatch and Its Options" }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { "role" : "ACTION", - "sha256" : "d7fae9b368200b5d73f14c977c6705074335459340455bf4bcb60be2496ce13d", - "text" : "db.feedback.aggregate( [ \n { $addFields: { \n \"category\": { $cond: { if: { $regexMatch: { input: \"$comment\", regex: /[a-z0-9_.+-]+@mongodb.com/i } },\n then: \"Employee\",\n else: \"External\" } }\n } }," + "sha256" : "e71976556699627cfcb553fa9797bd3cb851b76d2b6228ca80ed3d85fed44eb6", + "text" : "db.products.aggregate([\n { $addFields: { result: { $regexMatch: { input: \"$description\", regex: /lin(e|k)/ } } } }\n])" }, { + "role" : "EXPECTED", + "sha256" : "c9125a4d1dbe2919d85fa016d66864d5c83a2702e092cc89d281cf7a6cb276b1", + "text" : "{ \"_id\" : 1, \"description\" : \"Single LINE description.\", \"result\" : false }\n{ \"_id\" : 2, \"description\" : \"First lines\\nsecond line\", \"result\" : true }\n{ \"_id\" : 3, \"description\" : \"Many spaces before line\", \"result\" : true }\n{ \"_id\" : 4, \"description\" : \"Multiple\\nline descriptions\", \"result\" : true }\n{ \"_id\" : 5, \"description\" : \"anchors, links and hyperlinks\", \"result\" : true }\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"result\" : false }" + } ], + "detail" : null, + "name" : "Match Line or Link", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchLineOrLink", + "title" : "$regexMatch and Its Options" + }, { + "blocks" : [ { "role" : "DATA", - "sha256" : "116e76798c8460e153a7aac489226517db89d344e7f65751504b0d1b8c278b2c", - "text" : "db.feedback.insertMany([\n { \"_id\" : 1, comment: \"Hi, I'm just reading about MongoDB -- aunt.arc.tica@example.com\" },\n { \"_id\" : 2, comment: \"I wanted to concatenate a string\" },\n { \"_id\" : 3, comment: \"How do I convert a date to string? Contact me at either cam@mongodb.com or c.dia@mongodb.com\" },\n { \"_id\" : 4, comment: \"It's just me. I'm testing. fred@MongoDB.com\" }\n])" + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "684418bcd795d81ae78fc6da572318e51fa58e9bb7cf575400ab9a902f07c7a3", + "text" : "db.products.aggregate([\n { $addFields: { result: { $regexMatch: { input: \"$description\", regex: /line/i } } } }\n])" }, { "role" : "EXPECTED", - "sha256" : "5dba59fe1e5f73cfc6c1c4601c8dd135916022aaeb1c658a949dae59e6992910", - "text" : "{ \"_id\" : 1, \"comment\" : \"Hi, I'm just reading about MongoDB -- aunt.arc.tica@example.com\", \"category\" : \"External\" }\n{ \"_id\" : 2, \"comment\" : \"I wanted to concatenate a string\", \"category\" : \"External\" }\n{ \"_id\" : 3, \"comment\" : \"How do I convert a date to string? Contact me at either cam@mongodb.com or c.dia@mongodb.com\", \"category\" : \"Employee\" }\n{ \"_id\" : 4, \"comment\" : \"It's just me. I'm testing. fred@MongoDB.com\", \"category\" : \"Employee\" }" + "sha256" : "3f4d5b4485981763455d841ca956713b3abbdcbcf7b8b92b997900de66fc7155", + "text" : "{ \"_id\" : 1, \"description\" : \"Single LINE description.\", \"result\" : true }\n{ \"_id\" : 2, \"description\" : \"First lines\\nsecond line\", \"result\" : true }\n{ \"_id\" : 3, \"description\" : \"Many spaces before line\", \"result\" : true }\n{ \"_id\" : 4, \"description\" : \"Multiple\\nline descriptions\", \"result\" : true }\n{ \"_id\" : 5, \"description\" : \"anchors, links and hyperlinks\", \"result\" : false }\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"result\" : false }" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", - "stem" : "useRegexMatchToCheckEmailAddress", - "title" : "Use ``$regexMatch`` to Check Email Address" - } ], - "includes" : [ { - "blob" : "0e391e7820b2d3a5ef43f73a3ca2068f66ebb47e", - "path" : "content/manual/manual/source/includes/extracts-agg-regex.yaml" + "stem" : "iOption", + "title" : "i Option" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "6ed95a3d1f0a76f49f22f1f4f8539ef9c6d942f2c166425057b67d438083831b", + "text" : "db.products.aggregate([\n { $addFields: { result: { $regexMatch: { input: \"$description\", regex: /^s/im } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "747714b3ff84bdcfd45de0e6f98072bfc135e31911978a8777975cccb1dc6995", + "text" : "{ \"_id\" : 1, \"description\" : \"Single LINE description.\", \"result\" : true }\n{ \"_id\" : 2, \"description\" : \"First lines\\nsecond line\", \"result\" : true }\n{ \"_id\" : 3, \"description\" : \"Many spaces before line\", \"result\" : false }\n{ \"_id\" : 4, \"description\" : \"Multiple\\nline descriptions\", \"result\" : false }\n{ \"_id\" : 5, \"description\" : \"anchors, links and hyperlinks\", \"result\" : false }\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"result\" : false }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "mOption", + "title" : "m Option" }, { - "blob" : "1c76d95ca483b2924600db416405d9e9850d96b3", - "path" : "content/manual/manual/source/includes/fact-6.1-pcre2.rst" + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "ed83ed0558239628fef4dddcce9d0271971140125fdc6471c732a7a31f6668dc", + "text" : "db.products.aggregate([\n { $addFields: { returns: { $regexMatch: { input: \"$description\", regex: /lin(e|k) # matches line or link/, options:\"x\" } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "e018ab1a9b819fec2d0d05f4b90d613f02879e31589ee6f0a539e355780dd163", + "text" : "{ \"_id\" : 1, \"description\" : \"Single LINE description.\", \"returns\" : false }\n{ \"_id\" : 2, \"description\" : \"First lines\\nsecond line\", \"returns\" : true }\n{ \"_id\" : 3, \"description\" : \"Many spaces before line\", \"returns\" : true }\n{ \"_id\" : 4, \"description\" : \"Multiple\\nline descriptions\", \"returns\" : true }\n{ \"_id\" : 5, \"description\" : \"anchors, links and hyperlinks\", \"returns\" : true }\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"returns\" : false }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "xOption", + "title" : "x Option" }, { - "blob" : "c5cb26283c1d1fe619766db346970ef1cd095a57", - "path" : "content/manual/manual/source/includes/regex-operator-collation.rst" + "blocks" : [ { + "role" : "DATA", + "sha256" : "81d89e8d0804586b1d7e12d17802108b8e71d0067c745b6e7dd8292e0f566cf8", + "text" : "db.products.insertMany([\n { _id: 1, description: \"Single LINE description.\" },\n { _id: 2, description: \"First lines\\nsecond line\" },\n { _id: 3, description: \"Many spaces before line\" },\n { _id: 4, description: \"Multiple\\nline descriptions\" },\n { _id: 5, description: \"anchors, links and hyperlinks\" },\n { _id: 6, description: \"mĂ©tier work vocation\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "75d82d08d6b8508b34617ad7cd5988dc17afc7d850acd32bccf8f63acc6ca92d", + "text" : "db.products.aggregate([\n { $addFields: { returns: { $regexMatch: { input: \"$description\", regex:/m.*line/, options: \"si\" } } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "27533be55b5f6a857fdddb548c9f8dc77c9d25a7aece20555dbf8962ca1c812c", + "text" : "{ \"_id\" : 1, \"description\" : \"Single LINE description.\", \"returns\" : false }\n{ \"_id\" : 2, \"description\" : \"First lines\\nsecond line\", \"returns\" : false }\n{ \"_id\" : 3, \"description\" : \"Many spaces before line\", \"returns\" : true }\n{ \"_id\" : 4, \"description\" : \"Multiple\\nline descriptions\", \"returns\" : true }\n{ \"_id\" : 5, \"description\" : \"anchors, links and hyperlinks\", \"returns\" : false }\n{ \"_id\" : 6, \"description\" : \"mĂ©tier work vocation\", \"returns\" : false }" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "sOption", + "title" : "s Option" }, { - "blob" : "9b1ab813b944c95f7ecee915128bfc59388c131b", - "path" : "content/manual/manual/source/includes/regex-collation-example-output.rst" + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "useRegexMatchToCheckEmailAddress", + "title" : "Use $regexMatch to Check Email Address" } ], + "includes" : [ ], "operator" : "regexMatch", "pageBlob" : "8a5f35cf036ad4e56d99811d3ab534594e071741", "source" : { @@ -4861,36 +4573,25 @@ }, { "context" : "aggregation/expressions", "examples" : [ { - "blocks" : [ ], - "detail" : "matched by action text", - "owner" : "aggregation/expressions/replaceAll/replaceAllExpressionOperator", - "status" : "OWNED", - "stem" : null, - "title" : "Replace Using a String" - }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "5abdbf5698751f81a37bef395af9f1661079660f9797b78430af298a7c29e91d", - "text" : "db.inventory.aggregate([ \n { \n $project:\n { \n item: { $replaceAll: { input: \"$item\", find: \\\\bblue paint\\\\b, replacement: \"red paint\" } } \n } \n } \n])" - }, { "role" : "DATA", "sha256" : "db82740028d28c60a0955d83844e349b4560c6e74003fe9999e4573281da0d6f", "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"blue paint\" },\n { _id: 2, item: \"blue and green paint\" },\n { _id: 3, item: \"blue paint with blue paintbrush\" },\n { _id: 4, item: \"blue paint with green paintbrush\" },\n] )" - }, { - "role" : "EXPECTED", - "sha256" : "33569b6f99d0510417aeac5cbc7e1136803170d5484b6cea6f9e1794527c45a5", - "text" : "{ _id: 1, item: \"red paint\" }\n{ _id: 2, item: \"blue and green paint\" }\n{ _id: 3, item: \"red paint with blue paintbrush\" }\n{ _id: 4, item: \"red paint with green paintbrush\" }" } ], - "detail" : null, + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "replaceUsingRegex", "title" : "Replace Using Regex" + }, { + "blocks" : [ ], + "detail" : "matched by action text", + "owner" : "aggregation/expressions/replaceAll/replaceAllExpressionOperator", + "status" : "OWNED", + "stem" : null, + "title" : "Replace Using a String" } ], - "includes" : [ { - "blob" : "45d899ad27d1004e3764f25aa45f9101b32d0466", - "path" : "content/manual/manual/source/includes/collation-replace-example.rst" - } ], + "includes" : [ ], "operator" : "replaceAll", "pageBlob" : "9c3d3dced8793b6ba3cdc1eb21073c696c0290d2", "source" : { @@ -4901,36 +4602,25 @@ }, { "context" : "aggregation/expressions", "examples" : [ { - "blocks" : [ ], - "detail" : "matched by action text", - "owner" : "aggregation/expressions/replaceOne/replaceOneExpressionOperator", - "status" : "OWNED", - "stem" : null, - "title" : "Replace Using a String" - }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "702086174e61b5909b5266a24d4924ec791f85252c675c209a75813ca78a39d3", - "text" : "db.inventory.aggregate([\n {\n $project:\n {\n item: { $replaceOne: { input: \"$item\", find: \\\\bblue\\\\b, replacement: \"navy\" } }\n }\n }\n]);" - }, { "role" : "DATA", "sha256" : "db82740028d28c60a0955d83844e349b4560c6e74003fe9999e4573281da0d6f", "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"blue paint\" },\n { _id: 2, item: \"blue and green paint\" },\n { _id: 3, item: \"blue paint with blue paintbrush\" },\n { _id: 4, item: \"blue paint with green paintbrush\" },\n] )" - }, { - "role" : "EXPECTED", - "sha256" : "7422d5f6f66741b9d014937ae2163caef354af0aba383ffde163686a22a218b0", - "text" : "{ _id: 1, item: \"navy paint\" }\n{ _id: 2, item: \"navy and green paint\" }\n{ _id: 3, item: \"navy paint with blue paintbrush\" }\n{ _id: 4, item: \"navy paint with green paintbrush\" }" } ], - "detail" : null, + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "replaceUsingRegex", "title" : "Replace Using Regex" + }, { + "blocks" : [ ], + "detail" : "matched by action text", + "owner" : "aggregation/expressions/replaceOne/replaceOneExpressionOperator", + "status" : "OWNED", + "stem" : null, + "title" : "Replace Using a String" } ], - "includes" : [ { - "blob" : "45d899ad27d1004e3764f25aa45f9101b32d0466", - "path" : "content/manual/manual/source/includes/collation-replace-example.rst" - } ], + "includes" : [ ], "operator" : "replaceOne", "pageBlob" : "d0887bd800535ad2d1e606ee1cab29b9fb0075d3", "source" : { @@ -4948,13 +4638,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "5eea7db82afdd4723cac7050891df1f7c7042823", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null.yaml" - }, { - "blob" : "ee40a9d1b0d38be8227b5f23cea8c85c217aeb5a", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "reverseArray", "pageBlob" : "a5810d508812226c8342fdc58c599a0a2b5eb762", "source" : { @@ -4966,16 +4650,53 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/round/roundExpressionOperator", "status" : "OWNED", "stem" : null, "title" : "main" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "e9c041bd613eb516c4f502de6223820ebad550708364e00c193c946925f861c5", + "text" : "db.samples.insertMany(\n [\n { _id: 1, value: 19.25 },\n { _id: 2, value: 28.73 },\n { _id: 3, value: 34.32 },\n { _id: 4, value: -45.39 }\n ]\n)" + }, { + "role" : "ACTION", + "sha256" : "7a309af5d7e8414c924d39dde4efd2f1eaf4d9dac7f34fe37a251eb516a482d9", + "text" : "db.samples.aggregate([\n { $project: { roundedValue: { $round: [ \"$value\", -1 ] } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "37f48edf85aa15eddf1fcc6dd01594b7f5908244d79ffff30dc2dc4758d56273", + "text" : "{ \"_id\" : 1, \"roundedValue\" : 10 }\n{ \"_id\" : 2, \"roundedValue\" : 20 }\n{ \"_id\" : 3, \"roundedValue\" : 30 }\n{ \"_id\" : 4, \"roundedValue\" : -50 }" + } ], + "detail" : null, + "name" : "Round to the Nearest Ten", + "owner" : null, + "status" : "UNOWNED", + "stem" : "roundToTheNearestTen", + "title" : "main" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "e9c041bd613eb516c4f502de6223820ebad550708364e00c193c946925f861c5", + "text" : "db.samples.insertMany(\n [\n { _id: 1, value: 19.25 },\n { _id: 2, value: 28.73 },\n { _id: 3, value: 34.32 },\n { _id: 4, value: -45.39 }\n ]\n)" + }, { + "role" : "ACTION", + "sha256" : "c99f1f78637050f6d44a1b6e75e1702eff73d5070d5fcfcb84bf60a8a959e5ef", + "text" : "db.samples.aggregate([\n { $project: { roundedValue: { $round: [ \"$value\", 0 ] } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "0273b63b347310bea86c1058147c8c1007ebb4dacdb9616f2e2465e7b38a99e4", + "text" : "{ \"_id\" : 1, \"roundedValue\" : 19 }\n{ \"_id\" : 2, \"roundedValue\" : 29 }\n{ \"_id\" : 3, \"roundedValue\" : 34 }\n{ \"_id\" : 4, \"roundedValue\" : -45 }" + } ], + "detail" : null, + "name" : "Round to a Whole Number", + "owner" : null, + "status" : "UNOWNED", + "stem" : "roundToAWholeNumber", + "title" : "main" } ], - "includes" : [ { - "blob" : "229f397c2a5a12c1f5965f348b058ca320ad0c8c", - "path" : "content/manual/manual/source/includes/precision.rst" - } ], + "includes" : [ ], "operator" : "round", "pageBlob" : "1f84d0bca1375c1160498416c2c18d59f9e607ee", "source" : { @@ -4987,13 +4708,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "1ab8ee6b5ac5c6da2e6f6565971f2ddb539b9a760bbb396ac683a25ec3c54d70", - "text" : "db.inventory.aggregate([\n { $project: { item: 1, description: { $rtrim: { input: \"$description\" } } } }\n])" - }, { "role" : "DATA", "sha256" : "9c662d167ba82f524d3304f02a7492492647c299a465325662a002aad99139c6", "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"ABC1\", quarter: \"13Q1\", description: \" product 1\" },\n { _id: 2, item: \"ABC2\", quarter: \"13Q4\", description: \"product 2 \\n The product is in stock. \\n\\n \" },\n { _id: 3, item: \"XYZ1\", quarter: \"14Q2\", description: null }\n] )" + }, { + "role" : "ACTION", + "sha256" : "1ab8ee6b5ac5c6da2e6f6565971f2ddb539b9a760bbb396ac683a25ec3c54d70", + "text" : "db.inventory.aggregate([\n { $project: { item: 1, description: { $rtrim: { input: \"$description\" } } } }\n])" }, { "role" : "EXPECTED", "sha256" : "8315f9a9ca9ad68ae7586a3f0890153372b50f5067564927308ff8f18efa918f", @@ -5006,13 +4727,7 @@ "stem" : "trimTrailingWhitespace", "title" : "main" } ], - "includes" : [ { - "blob" : "5b6497933c4c19e238a411142ae6e1299c6fc339", - "path" : "content/manual/manual/source/includes/list-table-trim-white-space.rst" - }, { - "blob" : "7f91e8f456a6fcb886f568ea04dd0966fe7f7f5d", - "path" : "content/manual/manual/source/includes/fact-trim-chars-length-limit.rst" - } ], + "includes" : [ ], "operator" : "rtrim", "pageBlob" : "b213a5aa7ec8a9c96cf92bff694e731998f063e9", "source" : { @@ -5027,19 +4742,15 @@ "role" : "ACTION", "sha256" : "9eb16fc0d6e747192d63d389b1034d7b803eb3913a9e84b1b88f6414d764dcab", "text" : "db.collection.aggregate(\n [\n { $match: { $sampleRate: 0.33 } },\n { $count: \"numMatches\" }\n ]\n)" - }, { - "role" : "DATA", - "sha256" : "49e2c2b8a6da0ddd3b66973c14c86ee152e6acbdc5fd6d7682b830cb8c0ae6eb", - "text" : "N = 100\nbulk = db.collection.initializeUnorderedBulkOp()\nfor ( i = 0; i < N; i++) { bulk.insert( {_id: i, r: 0} ) }\nbulk.execute()" }, { "role" : "EXPECTED", "sha256" : "85c1370e91daec71182498fb8b9240c7896fe20b5f824af8abb6467e05a8ab40", "text" : "{ \"numMatches\" : 38 }\n{ \"numMatches\" : 36 }\n{ \"numMatches\" : 29 }\n{ \"numMatches\" : 29 }\n{ \"numMatches\" : 28 }" } ], - "detail" : null, + "detail" : "UNSUPPORTED_SETUP", "name" : "Count a Random Sample", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "countARandomSample", "title" : "main" } ], @@ -5061,10 +4772,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - } ], + "includes" : [ ], "operator" : "second", "pageBlob" : "3fc6300f07a6c63af125654767f547ddb10b372d", "source" : { @@ -5092,8 +4800,8 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "c6da847679d4810f38d4e982eb26cf5a46ac60bac9e4884a5fad82889fef487f", - "text" : "db.movies.aggregate([\n {\n $match: { title: \"Inception\" }\n },\n {\n $project: {\n ejson: { \n $serializeEJSON: { \n input: \"$$ROOT\",\n relaxed: true \n }\n }\n }\n }\n])" + "sha256" : "cb2dbc3238b0443d0a9f14861c02701ee816ce18443f4c930142a3969f8210df", + "text" : "db.movies.aggregate([\n {\n $match: { title: \"Inception\" }\n },\n {\n $project: {\n ejson: {\n $serializeEJSON: {\n input: \"$$ROOT\",\n relaxed: true\n }\n }\n }\n }\n])" }, { "role" : "EXPECTED", "sha256" : "d3a01faa562faa20cb8316c799cb04d6b566f201a77492f880a124828dcd6c5f", @@ -5107,23 +4815,23 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "30be43bdbcdfdce47ffdc86dbb666ede92b92896bac6e13bf1e40a1dd2ea9538", - "text" : "db.movies.aggregate([\n {\n $match: { title: \"The Godfather\" }\n },\n {\n $project: {\n title: 1,\n jsonString: { \n $toString: { \n $serializeEJSON: { input: \"$$ROOT\" } \n }\n }\n }\n }\n])" + "sha256" : "c93b16270d1fad508959f8a7dc3906e3a146cc182fe8749f4c3fbcb1eb63ccae", + "text" : "db.movies.aggregate([\n {\n $match: { title: \"The Godfather\" }\n },\n {\n $project: {\n title: 1,\n jsonString: {\n $toString: {\n $serializeEJSON: { input: \"$$ROOT\" }\n }\n }\n }\n }\n])" }, { "role" : "EXPECTED", "sha256" : "3360356b9cb7dda524a4f64244cb15829872b658e0b871eac628c01abaacf1e1", "text" : "[\n {\n _id: '573a13c5f29313caabd6ee62',\n title: 'The Godfather',\n jsonString: `{\"_id\":\"573a13c5f29313caabd6ee62\",` +\n `\"fullplot\":\"When the aging head of a famous crime family decides to transfer his position to one of his subalterns, a series of unfortunate events start happening to the family, and a war begins between all the well-known families leading to insolence, deportation, murder and revenge, and ends with the favorable successor being finally chosen.\",` +\n `\"imdb\":{\"rating\":9.2,\"votes\":1038358,\"id\":68646},` +\n `\"year\":1972,` +\n `\"plot\":\"The aging patriarch of an organized crime dynasty transfers control of his clandestine empire to his reluctant son.\",` +\n `\"genres\":[\"Crime\",\"Drama\"],` +\n `\"rated\":\"R\",` +\n `\"metacritic\":100,` +\n `\"title\":\"The Godfather\",` +\n `\"lastupdated\":\"2015-09-02 00:08:23.680000000\",` +\n `\"languages\":[\"English\",\"Italian\",\"Latin\"],` +\n `\"writers\":[\"Mario Puzo (screenplay)\",\"Francis Ford Coppola (screenplay)\",\"Mario Puzo (novel)\"],` +\n `\"type\":\"movie\",` +\n `\"tomatoes\":{\"website\":\"http://www.thegodfather.com\",\"viewer\":{\"rating\":4.4,\"numReviews\":725773,\"meter\":98},\"dvd\":{\"$date\":\"2001-10-09T00:00:00.000Z\"},\"critic\":{\"rating\":9.2,\"numReviews\":84,\"meter\":99},\"lastUpdated\":{\"$date\":\"2015-09-12T17:15:13.000Z\"},\"consensus\":\"One of Hollywood's greatest critical and commercial successes, The Godfather gets everything right; not only did the movie transcend expectations, it established new benchmarks for American cinema.\",\"rotten\":1,\"production\":\"Paramount Pictures\",\"fresh\":83},` +\n `\"poster\":\"https://m.media-amazon.com/images/M/MV5BM2MyNjYxNmUtYTAwNi00MTYxLWJmNWYtYzZlODY3ZTk3OTFlXkEyXkFqcGdeQXVyNzkwMjQ5NzM@._V1_SY1000_SX677_AL_.jpg\",` +\n `\"num_mflix_comments\":131,` +\n `\"released\":{\"$date\":\"1972-03-24T00:00:00.000Z\"},` +\n `\"awards\":{\"wins\":33,\"nominations\":19,\"text\":\"Won 3 Oscars. Another 30 wins & 19 nominations.\"},` +\n `\"countries\":[\"USA\"],` +\n `\"cast\":[\"Marlon Brando\",\"Al Pacino\",\"James Caan\",\"Richard S. Castellano\"],` +\n `\"directors\":[\"Francis Ford Coppola\"],` +\n `\"runtime\":175}`\n }\n]" } ], - "detail" : null, + "detail" : "UNSUPPORTED_AST", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "convertToJsonString", "title" : "Convert to JSON String" }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "922cc1e38b26263d1667708aef463a56db4882bf6cda3adada6998a0f1b31256", - "text" : "db.movies.aggregate([\n {\n $match: { year: { $gte: 2010 } }\n },\n {\n $project: {\n title: 1,\n metadataEJSON: { \n $serializeEJSON: { \n input: {\n releaseDate: \"$released\",\n runtime: \"$runtime\",\n imdbRating: \"$imdb.rating\"\n }\n }\n }\n }\n }\n])" + "sha256" : "29ce6fddf6440a2d1ae717721a208aeb5b183cc50c34035d0a59b06d190ca83f", + "text" : "db.movies.aggregate([\n {\n $match: { year: { $gte: 2010 } }\n },\n {\n $project: {\n title: 1,\n metadataEJSON: {\n $serializeEJSON: {\n input: {\n releaseDate: \"$released\",\n runtime: \"$runtime\",\n imdbRating: \"$imdb.rating\"\n }\n }\n }\n }\n }\n])" }, { "role" : "EXPECTED", "sha256" : "d72c3e104fb564ef1b12301f65b5dcff57a38a8ba859ff387076b401cce17dca", @@ -5137,8 +4845,8 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "416706bcf508569a7ba94871c60249a020bf6ed2b3056fbd50bcd369f5bf13d5", - "text" : "db.movies.aggregate([\n {\n $project: {\n title: 1,\n ejson: { \n $serializeEJSON: { \n input: \"$customField\",\n onError: { error: \"Serialization failed\" }\n }\n }\n }\n }\n])" + "sha256" : "4d31ad149ea4d63647371e0dd462ab76849133d05e0e3aea468a41549465abb5", + "text" : "db.movies.aggregate([\n {\n $project: {\n title: 1,\n ejson: {\n $serializeEJSON: {\n input: \"$customField\",\n onError: { error: \"Serialization failed\" }\n }\n }\n }\n }\n])" } ], "detail" : null, "owner" : null, @@ -5146,10 +4854,7 @@ "stem" : "useOnErrorForErrorHandling", "title" : "Use onError for Error Handling" } ], - "includes" : [ { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - } ], + "includes" : [ ], "operator" : "serializeEJSON", "pageBlob" : "ee40af96a05b38c3b3102d51e89b13c8cb195a5e", "source" : { @@ -5167,16 +4872,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "a69d35c19d1fec61c9928dc721f571ed9cf17cc9", - "path" : "content/manual/manual/source/includes/important-set-operator-semantics.rst" - }, { - "blob" : "3ae8bf736443eaa8cf84e56de8d30b33dd6449bc", - "path" : "content/manual/manual/source/includes/extracts-fact-agg-top-level-expressions.yaml" - }, { - "blob" : "5366b8d724f1705e143d55a10e620d6fe50b37de", - "path" : "content/manual/manual/source/includes/extracts-parent-fact-agg-top-level-expressions.yaml" - } ], + "includes" : [ ], "operator" : "setDifference", "pageBlob" : "3fcdcd524db16de6cc07065c29fde2ae95b526f3", "source" : { @@ -5194,13 +4890,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3ae8bf736443eaa8cf84e56de8d30b33dd6449bc", - "path" : "content/manual/manual/source/includes/extracts-fact-agg-top-level-expressions.yaml" - }, { - "blob" : "5366b8d724f1705e143d55a10e620d6fe50b37de", - "path" : "content/manual/manual/source/includes/extracts-parent-fact-agg-top-level-expressions.yaml" - } ], + "includes" : [ ], "operator" : "setEquals", "pageBlob" : "0cdf0dd8f3654bf76ebf9f2fa54b461e993e6973", "source" : { @@ -5212,58 +4902,91 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/setField/addFieldsThatContainPeriods", "status" : "OWNED", "stem" : null, - "title" : "Add Fields that Contain Periods (``.``)" + "title" : "Add Fields that Contain Periods (.)" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/setField/addFieldsThatStartWithADollarSign", "status" : "OWNED", "stem" : null, - "title" : "Add Fields that Start with a Dollar Sign (``$``)" + "title" : "Add Fields that Start with a Dollar Sign ($)" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/setField/updateFieldsThatContainPeriods", "status" : "OWNED", "stem" : null, - "title" : "Update Fields that Contain Periods (``.``)" + "title" : "Update Fields that Contain Periods (.)" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/setField/updateFieldsThatStartWithADollarSign", "status" : "OWNED", "stem" : null, - "title" : "Update Fields that Start with a Dollar Sign (``$``)" + "title" : "Update Fields that Start with a Dollar Sign ($)" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/setField/removeFieldsThatContainPeriods", "status" : "OWNED", "stem" : null, - "title" : "Remove Fields that Contain Periods (``.``)" + "title" : "Remove Fields that Contain Periods (.)" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "7466d92d10987b6ee4af8a51b17eed19f30fc627376ce4cdcc4d7708ca48bb99", - "text" : "db.inventory.aggregate( [\n { $replaceWith: {\n $setField: { \n field: { $literal: \"$price\" },\n input: \"$$ROOT\", \n value: \"$$REMOVE\" \n } } }\n] )" + "role" : "DATA", + "sha256" : "bb38e7cbb797b0b702dde90efaed62ada734c9a07e5050520fa0d4e6582f0560", + "text" : "db.inventory.insertMany([\n { _id: 1, item: 'sweatshirt', qty: 300, 'price.usd': 45.99 },\n { _id: 2, item: 'winter coat', qty: 200, 'price.usd': 499.99 },\n { _id: 3, item: 'sun dress', qty: 250, 'price.usd': 199.99 },\n { _id: 4, item: 'leather boots', qty: 300, 'price.usd': 249.99 },\n { _id: 5, item: 'bow tie', qty: 180, 'price.usd': 9.99 }\n] )" }, { + "role" : "ACTION", + "sha256" : "65b4bbe2c01fb04c1d545d70153703e261dc6bf4113e027abd56e51e10f113bc", + "text" : "db.inventory.aggregate( [\n { $replaceWith: {\n $unsetField: {\n field: \"price.usd\",\n input: \"$$ROOT\"\n } } }\n] )" + } ], + "detail" : null, + "name" : "Remove a Field with a Period Using $unsetField", + "owner" : null, + "status" : "UNOWNED", + "stem" : "removeAFieldWithAPeriodUsingUnsetField", + "title" : "Remove Fields that Contain Periods (.)" + }, { + "blocks" : [ { "role" : "DATA", - "sha256" : "6855aa48cef2aaad3a81c98f1fcfa1cece5cb0cea7aeaa02be3ab3a4f8b832fa", - "text" : "db.inventory.insertMany( [ \n { _id: 1, item: 'sweatshirt', qty: 300, '$price': 45.99 },\n { _id: 2, item: 'winter coat', qty: 200, '$price': 499.99 },\n { _id: 3, item: 'sun dress', qty: 250, '$price': 199.99 },\n { _id: 4, item: 'leather boots', qty: 300, '$price': 249.99 },\n { _id: 5, item: 'bow tie', qty: 180, '$price': 9.99 }\n] )" + "sha256" : "b2fbf0536c847f42ecec9ea707c0351509f29ca3d59fbcb811d4410fe77374f7", + "text" : "db.inventory.insertMany( [\n { _id: 1, item: 'sweatshirt', qty: 300, '$price': 45.99 },\n { _id: 2, item: 'winter coat', qty: 200, '$price': 499.99 },\n { _id: 3, item: 'sun dress', qty: 250, '$price': 199.99 },\n { _id: 4, item: 'leather boots', qty: 300, '$price': 249.99 },\n { _id: 5, item: 'bow tie', qty: 180, '$price': 9.99 }\n] )" + }, { + "role" : "ACTION", + "sha256" : "f2e9f9c7161b780ad19d31d3e0fde654012a50bb4b7e177de5a7c1ae44ccfec6", + "text" : "db.inventory.aggregate( [\n { $replaceWith: {\n $setField: {\n field: { $literal: \"$price\" },\n input: \"$$ROOT\",\n value: \"$$REMOVE\"\n } } }\n] )" }, { "role" : "EXPECTED", "sha256" : "3e0481d0d89836495e20a3124db82698aa7330b0f88dfa65973350525e7d4ae4", "text" : "[\n { _id: 1, item: 'sweatshirt', qty: 300 },\n { _id: 2, item: 'winter coat', qty: 200 },\n { _id: 3, item: 'sun dress', qty: 250 },\n { _id: 4, item: 'leather boots', qty: 300 },\n { _id: 5, item: 'bow tie', qty: 180 }\n]" } ], "detail" : null, + "name" : "Remove a Dollar-Prefixed Field with $setField", + "owner" : null, + "status" : "UNOWNED", + "stem" : "removeADollarPrefixedFieldWithSetField", + "title" : "Remove Fields that Start with a Dollar Sign ($)" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "b2fbf0536c847f42ecec9ea707c0351509f29ca3d59fbcb811d4410fe77374f7", + "text" : "db.inventory.insertMany( [\n { _id: 1, item: 'sweatshirt', qty: 300, '$price': 45.99 },\n { _id: 2, item: 'winter coat', qty: 200, '$price': 499.99 },\n { _id: 3, item: 'sun dress', qty: 250, '$price': 199.99 },\n { _id: 4, item: 'leather boots', qty: 300, '$price': 249.99 },\n { _id: 5, item: 'bow tie', qty: 180, '$price': 9.99 }\n] )" + }, { + "role" : "ACTION", + "sha256" : "e9d87a42974717b0aaf85b7560e1dea855a5f9f67e2de26a48ec8ef8f06c886a", + "text" : "db.inventory.aggregate( [\n { $replaceWith: {\n $unsetField: {\n field: { $literal: \"$price\" },\n input: \"$$ROOT\"\n } } }\n] )" + } ], + "detail" : null, + "name" : "Remove a Dollar-Prefixed Field with $unsetField", "owner" : null, "status" : "UNOWNED", - "stem" : "removeFieldsThatStartWithADollarSign", - "title" : "Remove Fields that Start with a Dollar Sign (``$``)" + "stem" : "removeADollarPrefixedFieldWithUnsetField", + "title" : "Remove Fields that Start with a Dollar Sign ($)" } ], "includes" : [ ], "operator" : "setField", @@ -5282,72 +5005,72 @@ "status" : "OWNED", "stem" : null, "title" : "Elements Array Example" + }, { + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "createTheRoles", + "title" : "Create the roles" + }, { + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "createTheUsers", + "title" : "Create the users" + }, { + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "createTheCollection", + "title" : "Create the collection" + }, { + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "logInAsJohn", + "title" : "Log in as John" }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "8d862ebdcc83392de942d811f32d92917cde22942770908b65eb09efcc4e89c9", + "text" : "db.budget.insertMany( [\n {\n _id: 0,\n allowedRoles: [ \"Marketing\" ],\n comment: \"For marketing team\",\n yearlyBudget: 15000\n },\n {\n _id: 1,\n allowedRoles: [ \"Sales\" ],\n comment: \"For sales team\",\n yearlyBudget: 17000,\n salesEventsBudget: 1000\n },\n {\n _id: 2,\n allowedRoles: [ \"Operations\" ],\n comment: \"For operations team\",\n yearlyBudget: 19000,\n cloudBudget: 12000\n },\n {\n _id: 3,\n allowedRoles: [ \"Development\" ],\n comment: \"For development team\",\n yearlyBudget: 27000\n }\n] )" + }, { "role" : "ACTION", "sha256" : "c3f4ea9cf6d737567ff928eb1155f8ac9e5bfa9ded7de12669ef3a504414aa66", "text" : "db.budget.aggregate( [ {\n $match: {\n $expr: {\n $not: {\n $eq: [ { $setIntersection: [ \"$allowedRoles\", \"$$USER_ROLES.role\" ] }, [] ]\n }\n }\n }\n} ] )" - }, { - "role" : "DATA", - "sha256" : "765bc6a16a96c101c87e9faf8f67383a026e4651c18ba0a60f484d4a44cb65bc", - "text" : "db.createRole( { role: \"Marketing\", roles: [], privileges: [] } )\ndb.createRole( { role: \"Sales\", roles: [], privileges: [] } )\ndb.createRole( { role: \"Development\", roles: [], privileges: [] } )\ndb.createRole( { role: \"Operations\", roles: [], privileges: [] } )" - }, { - "role" : "DATA", - "sha256" : "40fcfd0daf08b77643f3f1c0c0d35967134b1a72851009173aabea089f2ce8bf", - "text" : "db.createUser( {\n user: \"John\",\n pwd: \"jn008\",\n roles: [\n { role: \"Marketing\", db: \"test\" },\n { role: \"Development\", db: \"test\" },\n { role: \"Operations\", db: \"test\" },\n { role: \"read\", db: \"test\" }\n ]\n} )\n\ndb.createUser( {\n user: \"Jane\",\n pwd: \"je009\",\n roles: [\n { role: \"Sales\", db: \"test\" },\n { role: \"Operations\", db: \"test\" },\n { role: \"read\", db: \"test\" }\n ]\n} )" - }, { - "role" : "DATA", - "sha256" : "c7229cf121358b9175b4f8fb42b9b2af8883608453d73abf53a3cd51456b630f", - "text" : "db.budget.insertMany( [\n {\n _id: 0,\n allowedRoles: [ \"Marketing\" ],\n comment: \"For marketing team\",\n yearlyBudget: 15000\n }, \n {\n _id: 1,\n allowedRoles: [ \"Sales\" ],\n comment: \"For sales team\",\n yearlyBudget: 17000,\n salesEventsBudget: 1000\n },\n {\n _id: 2,\n allowedRoles: [ \"Operations\" ],\n comment: \"For operations team\",\n yearlyBudget: 19000,\n cloudBudget: 12000\n },\n {\n _id: 3,\n allowedRoles: [ \"Development\" ],\n comment: \"For development team\",\n yearlyBudget: 27000\n }\n] )" - }, { - "role" : "DATA", - "sha256" : "355761f37275bfc129d77f621cb462bb1200f39ec328b6fa23f5aea185bb83c5", - "text" : "db.auth( \"John\", \"jn008\" )" - }, { - "role" : "EXPECTED", - "sha256" : "3973c8cdf8661dcdc1d3adca34e6bd709fc3be81a2bd503a208910cb90b4471e", - "text" : "[\n {\n _id: 0,\n allowedRoles: [ 'Marketing' ],\n comment: 'For marketing team',\n yearlyBudget: 15000\n },\n {\n _id: 2,\n allowedRoles: [ 'Operations' ],\n comment: 'For operations team',\n yearlyBudget: 19000,\n cloudBudget: 12000\n },\n {\n _id: 3,\n allowedRoles: [ 'Development' ],\n comment: 'For development team',\n yearlyBudget: 27000\n }\n]" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", - "stem" : "retrieveDocumentsForRolesGrantedToTheCurrentUser", - "title" : "Retrieve Documents for Roles Granted to the Current User" - } ], - "includes" : [ { - "blob" : "a69d35c19d1fec61c9928dc721f571ed9cf17cc9", - "path" : "content/manual/manual/source/includes/important-set-operator-semantics.rst" - }, { - "blob" : "3ae8bf736443eaa8cf84e56de8d30b33dd6449bc", - "path" : "content/manual/manual/source/includes/extracts-fact-agg-top-level-expressions.yaml" - }, { - "blob" : "5366b8d724f1705e143d55a10e620d6fe50b37de", - "path" : "content/manual/manual/source/includes/extracts-parent-fact-agg-top-level-expressions.yaml" - }, { - "blob" : "e0f16a62a1f9b02fe18eae33efac9897909f0a2a", - "path" : "content/manual/manual/source/includes/user-roles-system-variable-introduction.rst" + "stem" : "retrieveTheDocuments", + "title" : "Retrieve the documents" }, { - "blob" : "711d4a43692d7d0ef7f60601b1c5d5ddbeb2a078", - "path" : "content/manual/manual/source/includes/user-roles-system-variable-example-login-john.rst" - }, { - "blob" : "73501f46b26282c4875fcff23f891435bc843f53", - "path" : "content/manual/manual/source/includes/user-roles-system-variable-example-description-start.rst" - }, { - "blob" : "d32e451912bb4540707d5b135cbde8ac2845e567", - "path" : "content/manual/manual/source/includes/user-roles-system-variable-example-pipeline.rst" - }, { - "blob" : "b073a76eddf629d930a40a016ff6aea5f740dd8b", - "path" : "content/manual/manual/source/includes/user-roles-system-variable-example-description.rst" - }, { - "blob" : "fac6ff81e05ea4ac635055b12503378699188835", - "path" : "content/manual/manual/source/includes/user-roles-system-variable-example-output-john.rst" + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "examineTheDocuments", + "title" : "Examine the documents" }, { - "blob" : "affd0ae6225b4f04a2e2c18637eb6d641f5d3768", - "path" : "content/manual/manual/source/includes/user-roles-system-variable-example-login-jane.rst" + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "logInAsJane", + "title" : "Log in as Jane" }, { - "blob" : "cf47e33cdcee2e76826eb6e1204cb0d298627439", - "path" : "content/manual/manual/source/includes/user-roles-system-variable-example-output-jane.rst" + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "examineTheDocuments", + "title" : "Examine the documents" } ], + "includes" : [ ], "operator" : "setIntersection", "pageBlob" : "6ed7f7255c3c7ee01eb499acd179d574236766f9", "source" : { @@ -5365,13 +5088,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3ae8bf736443eaa8cf84e56de8d30b33dd6449bc", - "path" : "content/manual/manual/source/includes/extracts-fact-agg-top-level-expressions.yaml" - }, { - "blob" : "5366b8d724f1705e143d55a10e620d6fe50b37de", - "path" : "content/manual/manual/source/includes/extracts-parent-fact-agg-top-level-expressions.yaml" - } ], + "includes" : [ ], "operator" : "setIsSubset", "pageBlob" : "cd75e12d512bc71dfcb4e93683f761211eb9ca4e", "source" : { @@ -5390,23 +5107,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "a69d35c19d1fec61c9928dc721f571ed9cf17cc9", - "path" : "content/manual/manual/source/includes/important-set-operator-semantics.rst" - }, { - "blob" : "5c0cb4337b10b4668791a8b6420046534665975f", - "path" : "content/manual/manual/source/includes/fact-setUnion-non-recursive.rst" - }, { - "blob" : "c9b8e90aa4d07b9d9d2ec713e882eb5187ca30bf", - "path" : "content/manual/manual/source/includes/fact-agg-accumulator-null-missing-behavior.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "4535f4069c730ce338b5fb9143c0db34d290a37b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/setUnion/setUnion-group-example-output.sh" }, { "blob" : "c4fbbc4d9e9a19706be66c91cbf1c8131ad525ca", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/setUnion/setUnion-group-example.snippet.group-example.js" - }, { - "blob" : "4535f4069c730ce338b5fb9143c0db34d290a37b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/setUnion/setUnion-group-example-output.sh" } ], "operator" : "setUnion", "pageBlob" : "1eb5ed0f0bdc2397d9a6f2462a594cbcdc98f474", @@ -5433,12 +5138,6 @@ "title" : "Shift Using a Negative Integer" } ], "includes" : [ { - "blob" : "340aee2ee6bcc83023c5de38fc0ce8a034386755", - "path" : "content/manual/manual/source/includes/setWindowFields-example-collection.rst" - }, { - "blob" : "1d8936541da3975a89e1e7e5e7c984ed7d5467f9", - "path" : "content/manual/manual/source/includes/setWindowFields-partition-sort-quantity.rst" - }, { "blob" : "29a47bc3cb38c8d957f7ef25d9d7a450e3ba2a16", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cake-sales-insert.snippet.cake-sales-insert.js" } ], @@ -5453,13 +5152,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "fc237c4d2252310228970e1c493c3dd128a2730f29c7b8901d1534ec0b538f20", - "text" : "db.myScores.aggregate( [\n { $set: {\n scaled: { $sigmoid: \"$score\" }\n } }\n] )" - }, { "role" : "DATA", "sha256" : "20f14f6d95fce8f111f2f06b2ef945a6bf45e0162aa97ca1e346ea3fdc40a743", "text" : "db.myScores.insertMany( [\n { score: 1 },\n { score: 5 },\n {},\n { score: 13 },\n { score: null },\n { score: 21 },\n] )" + }, { + "role" : "ACTION", + "sha256" : "fc237c4d2252310228970e1c493c3dd128a2730f29c7b8901d1534ec0b538f20", + "text" : "db.myScores.aggregate( [\n { $set: {\n scaled: { $sigmoid: \"$score\" }\n } }\n] )" }, { "role" : "EXPECTED", "sha256" : "2bfb81d13a219376801a67440936897e63acb1c25fbd8e7cd594d1c5d5a21562", @@ -5472,7 +5171,10 @@ "stem" : "scaleScoresWithASigmoid", "title" : "main" } ], - "includes" : [ ], + "includes" : [ { + "blob" : "0e91a4c94ca33fa2864bf6151758c0fad08d37a9", + "path" : "content/manual/manual/source/images/sigmoid.png" + } ], "operator" : "sigmoid", "pageBlob" : "87fa7ba000b3acc534b2d135fe96ae8a121da819", "source" : { @@ -5484,13 +5186,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "761c882c498b557b206107249e2fbcfe23ff60f1f26e646e4210f79134cbd98a", - "text" : "db.vectors.aggregate( [\n {\n $project: {\n raw: { $similarityCosine: [ \"$a\", \"$b\" ] },\n normalized: {\n $similarityCosine: {\n vectors: [ \"$a\", \"$b\" ],\n score: true\n }\n }\n }\n }\n] )" - }, { "role" : "DATA", "sha256" : "4e66eece63c4841881ec427d88cf087441045f62a30fcae95d8a48c502248572", "text" : "db.vectors.insertMany( [\n { _id: 1, a: [1, 2, 3], b: [1, 2, 3] },\n { _id: 2, a: [1, 2, 3], b: [3, 2, 1] },\n { _id: 3, a: [1, 2, 3], b: [4, 5, 6] }\n] )" + }, { + "role" : "ACTION", + "sha256" : "761c882c498b557b206107249e2fbcfe23ff60f1f26e646e4210f79134cbd98a", + "text" : "db.vectors.aggregate( [\n {\n $project: {\n raw: { $similarityCosine: [ \"$a\", \"$b\" ] },\n normalized: {\n $similarityCosine: {\n vectors: [ \"$a\", \"$b\" ],\n score: true\n }\n }\n }\n }\n] )" }, { "role" : "EXPECTED", "sha256" : "a6fa68c9f58c227d7f0303d685a4d8c074106648671ffe5008a19f2b63ad2575", @@ -5515,13 +5217,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "7d7f0bf63a3871a56df88c55d6d5e81c4404a7447cebae6a713f498db15e635e", - "text" : "db.vectors.aggregate( [\n {\n $project: {\n raw: { $similarityDotProduct: [ \"$a\", \"$b\" ] },\n normalized: {\n $similarityDotProduct: {\n vectors: [ \"$a\", \"$b\" ],\n score: true\n }\n }\n }\n }\n] )" - }, { "role" : "DATA", "sha256" : "4e66eece63c4841881ec427d88cf087441045f62a30fcae95d8a48c502248572", "text" : "db.vectors.insertMany( [\n { _id: 1, a: [1, 2, 3], b: [1, 2, 3] },\n { _id: 2, a: [1, 2, 3], b: [3, 2, 1] },\n { _id: 3, a: [1, 2, 3], b: [4, 5, 6] }\n] )" + }, { + "role" : "ACTION", + "sha256" : "7d7f0bf63a3871a56df88c55d6d5e81c4404a7447cebae6a713f498db15e635e", + "text" : "db.vectors.aggregate( [\n {\n $project: {\n raw: { $similarityDotProduct: [ \"$a\", \"$b\" ] },\n normalized: {\n $similarityDotProduct: {\n vectors: [ \"$a\", \"$b\" ],\n score: true\n }\n }\n }\n }\n] )" }, { "role" : "EXPECTED", "sha256" : "ef946dd2910528a6f2abe665eeb791046b6b398e19f9971a553d2e465a5a79e8", @@ -5546,13 +5248,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "039cd71bf2c4e59b2a61141123e73452d0c6796e82e828d280be950e501f9384", - "text" : "db.vectors.aggregate( [\n {\n $project: {\n raw: { $similarityEuclidean: [ \"$a\", \"$b\" ] },\n normalized: {\n $similarityEuclidean: {\n vectors: [ \"$a\", \"$b\" ],\n score: true\n }\n }\n }\n }\n] )" - }, { "role" : "DATA", "sha256" : "4e66eece63c4841881ec427d88cf087441045f62a30fcae95d8a48c502248572", "text" : "db.vectors.insertMany( [\n { _id: 1, a: [1, 2, 3], b: [1, 2, 3] },\n { _id: 2, a: [1, 2, 3], b: [3, 2, 1] },\n { _id: 3, a: [1, 2, 3], b: [4, 5, 6] }\n] )" + }, { + "role" : "ACTION", + "sha256" : "039cd71bf2c4e59b2a61141123e73452d0c6796e82e828d280be950e501f9384", + "text" : "db.vectors.aggregate( [\n {\n $project: {\n raw: { $similarityEuclidean: [ \"$a\", \"$b\" ] },\n normalized: {\n $similarityEuclidean: {\n vectors: [ \"$a\", \"$b\" ],\n score: true\n }\n }\n }\n }\n] )" }, { "role" : "EXPECTED", "sha256" : "7f0e52017d8ade1ee78e95f7c585a5d65d08cad73d33a7ffd6f2eee2e363aede", @@ -5633,19 +5335,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - } ], + "includes" : [ ], "operator" : "size", "pageBlob" : "5ac237aa3456d96fc8c8b98298e632786b552639", "source" : { @@ -5675,13 +5365,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "c984924dc88b1cfc567cdd8a64bc8f1fbe0bee7d35ec9c68ea765056b5d9a08b", - "text" : "db.engineers.aggregate( [\n { $project: \n {\n _id: 0,\n result:\n {\n $sortArray: { input: \"$team\", sortBy: { name: 1 } }\n }\n }\n }\n] )" - }, { "role" : "DATA", "sha256" : "5eacd27ff9fc1d102d42fb3cf4e1d264cd4be81c2926aa892790194cb9e34958", "text" : "db.engineers.insertOne(\n {\n team:\n [\n {\n name: \"pat\",\n age: 30,\n address: { street: \"12 Baker St\", city: \"London\" }\n },\n {\n name: \"dallas\",\n age: 36,\n address: { street: \"12 Cowper St\", city: \"Palo Alto\" }\n },\n {\n name: \"charlie\",\n age: 42,\n address: { street: \"12 French St\", city: \"New Brunswick\" }\n }\n ]\n }\n)" + }, { + "role" : "ACTION", + "sha256" : "1ad7a15c1ff07ceebd9fa6368b30fd20898165d9fb612361a1a9292cfc01ef7e", + "text" : "db.engineers.aggregate( [\n { $project:\n {\n _id: 0,\n result:\n {\n $sortArray: { input: \"$team\", sortBy: { name: 1 } }\n }\n }\n }\n] )" }, { "role" : "EXPECTED", "sha256" : "01128ce93780ade0279aab9e506de2b2415df77022ba7424762aa68524e18d47", @@ -5691,7 +5381,7 @@ "owner" : null, "status" : "UNOWNED", "stem" : "sortOnAField", - "title" : "Sort on a Field " + "title" : "Sort on a Field" }, { "blocks" : [ ], "detail" : null, @@ -5701,13 +5391,13 @@ "title" : "Sort on a Subfield" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "7766b12c42a406cf8f28dbf138019e9d55ffba3b69104e2ad5868122cc79a5be", - "text" : "db.engineers.aggregate( [\n {\n $project:\n {\n _id: 0,\n result:\n {\n $sortArray:\n {\n input: \"$team\",\n sortBy: { age: -1, name: 1 }\n }\n }\n }\n }\n ] )" - }, { "role" : "DATA", "sha256" : "5eacd27ff9fc1d102d42fb3cf4e1d264cd4be81c2926aa892790194cb9e34958", "text" : "db.engineers.insertOne(\n {\n team:\n [\n {\n name: \"pat\",\n age: 30,\n address: { street: \"12 Baker St\", city: \"London\" }\n },\n {\n name: \"dallas\",\n age: 36,\n address: { street: \"12 Cowper St\", city: \"Palo Alto\" }\n },\n {\n name: \"charlie\",\n age: 42,\n address: { street: \"12 French St\", city: \"New Brunswick\" }\n }\n ]\n }\n)" + }, { + "role" : "ACTION", + "sha256" : "7766b12c42a406cf8f28dbf138019e9d55ffba3b69104e2ad5868122cc79a5be", + "text" : "db.engineers.aggregate( [\n {\n $project:\n {\n _id: 0,\n result:\n {\n $sortArray:\n {\n input: \"$team\",\n sortBy: { age: -1, name: 1 }\n }\n }\n }\n }\n ] )" }, { "role" : "EXPECTED", "sha256" : "d3a13591e60c378604742cf6fb5ce3b14caaf40ff3825916889adf38ecdbb627", @@ -5727,17 +5417,17 @@ "title" : "Sort an Array of Integers" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "d2a98f9e17dc646530ce4446d8b981cbb71d379b95ff5a6ae5408806af44c6b2", - "text" : "db.engineers.aggregate( [\n { \n $project: \n {\n _id: 0,\n result: \n { \n $sortArray: \n {\n input: [ 20, 4, { a: \"Free\" }, 6, 21, 5, \"Gratis\", \n { a: null }, { a: { sale: true, price: 19 } },\n Decimal128( \"10.23\" ), { a: \"On sale\" } ],\n sortBy: 1 \n }\n }\n }\n }\n] )" - }, { "role" : "DATA", "sha256" : "5eacd27ff9fc1d102d42fb3cf4e1d264cd4be81c2926aa892790194cb9e34958", "text" : "db.engineers.insertOne(\n {\n team:\n [\n {\n name: \"pat\",\n age: 30,\n address: { street: \"12 Baker St\", city: \"London\" }\n },\n {\n name: \"dallas\",\n age: 36,\n address: { street: \"12 Cowper St\", city: \"Palo Alto\" }\n },\n {\n name: \"charlie\",\n age: 42,\n address: { street: \"12 French St\", city: \"New Brunswick\" }\n }\n ]\n }\n)" + }, { + "role" : "ACTION", + "sha256" : "32dd4281cdafceef7966f547adb21c4aa51a00505050d843c170d5beb522f5ff", + "text" : "db.engineers.aggregate( [\n {\n $project:\n {\n _id: 0,\n result:\n {\n $sortArray:\n {\n input: [ 20, 4, { a: \"Free\" }, 6, 21, 5, \"Gratis\",\n { a: null }, { a: { sale: true, price: 19 } },\n Decimal128( \"10.23\" ), { a: \"On sale\" } ],\n sortBy: 1\n }\n }\n }\n }\n] )" }, { "role" : "EXPECTED", - "sha256" : "1c0c27def3927d62f38c4b86d3181a92a16d379bd39e84177c7c4419eed9016f", - "text" : "{ result: \n [\n 4,\n 5,\n 6,\n Decimal128(\"10.23\"),\n 20,\n 21,\n 'Gratis',\n { a: null },\n { a: 'Free' },\n { a: 'On sale' },\n { a: { sale: true, price: 19 } }\n ] \n}" + "sha256" : "8ae2b7f3e8b878b40b64f6a6a12f1a564c1cbbd5e3b63cbd817089723a5fcd42", + "text" : "{ result:\n [\n 4,\n 5,\n 6,\n Decimal128(\"10.23\"),\n 20,\n 21,\n 'Gratis',\n { a: null },\n { a: 'Free' },\n { a: 'On sale' },\n { a: { sale: true, price: 19 } }\n ]\n}" } ], "detail" : null, "owner" : null, @@ -5781,16 +5471,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "8ba36fce905ce2036b2aa0ddd85bccf5d2b3b780", - "path" : "content/manual/manual/source/includes/agg-expression-double-unless-decimal-behavior.rst" - }, { - "blob" : "bbf5c44a10e62dc8903402b5aaf9baf1323ef458", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null.yaml" - }, { - "blob" : "8623cf2a56423be1b837696232e1d7f56f12569c", - "path" : "content/manual/manual/source/includes/extracts-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "sqrt", "pageBlob" : "22c59aa67a57ca5608f732279efd866dbdbea831", "source" : { @@ -5803,12 +5484,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "afdb393803aae8254cfbcf2ab0a54f7e819668ef5fefe646095b360ba9262b1e", - "text" : "db.movies.aggregate( [\n {\n $match: {\n directors: { $exists: true },\n \"imdb.rating\": { $type: \"double\" }\n }\n },\n {\n $unwind: \"$directors\"\n },\n {\n $group: {\n _id: \"$directors\",\n movieCount: { $sum: 1 },\n stdDevRating: { $stdDevPop: \"$imdb.rating\" }\n }\n },\n {\n $match: { movieCount: { $gte: 10 } }\n },\n {\n $sort: { stdDevRating: -1 }\n },\n {\n $limit: 5\n }\n] )" + "sha256" : "97b389aad0872aa5aba9904db093b1b5836d7e7e0439dd05c537d67e3f431a07", + "text" : "db.movies.aggregate( [\n {\n $match: {\n directors: { $exists: true },\n \"imdb.rating\": { $type: \"double\" }\n }\n },\n {\n $unwind: \"$directors\"\n },\n {\n $group: {\n _id: \"$directors\",\n movieCount: { $sum: 1 },\n stdDevRating: { $stdDevPop: \"$imdb.rating\" }\n }\n },\n {\n $match: { movieCount: { $gte: 10 } }\n },\n {\n $sort: { stdDevRating: -1 }\n },\n {\n $limit: 5\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "5734a9b9cd62c944a7e2e6e0f769d449ea1cd0413710bab6ec26745d3e3c9cec", - "text" : "[\n { _id: 'Bob Clark', movieCount: 12, stdDevRating: 1.6436747447918845 },\n { _id: 'John McTiernan', movieCount: 10, stdDevRating: 1.439305388025766 },\n { _id: 'James Cameron', movieCount: 10, stdDevRating: 1.3683566786477859 },\n { _id: 'Sean McNamara', movieCount: 13, stdDevRating: 1.3499945211372495 },\n {\n _id: 'Robert Rodriguez',\n movieCount: 20,\n stdDevRating: 1.2701476292148088\n }\n]" + "sha256" : "2061d6af709b41764f800ab740fe53360b6060b60758aed845820106aa6ce992", + "text" : "[\n { _id: 'Bob Clark', movieCount: 12, stdDevRating: 1.6436747447918845 },\n { _id: 'John McTiernan', movieCount: 10, stdDevRating: 1.439305388025766 },\n { _id: 'James Cameron', movieCount: 10, stdDevRating: 1.3683566786477859 },\n { _id: 'Sean McNamara', movieCount: 13, stdDevRating: 1.3499945211372495 },\n {\n _id: 'Robert Rodriguez',\n movieCount: 20,\n stdDevRating: 1.2701476292148088\n }\n]\n" } ], "detail" : null, "name" : "Find the Directors with the Most Varied Ratings", @@ -5818,20 +5499,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "36d8ead2877fd4cfbde22a333a3532d27722aebe", - "path" : "content/manual/manual/source/includes/expressions/stdDevPop/result-type.rst" - }, { - "blob" : "0001e545757c77c84ef2c201a8bfe2e990af6112", - "path" : "content/manual/manual/source/includes/expressions/stdDevPop/non-numeric-values.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "3f3bbf27f96acec002d9b3fb7f6bea8730f0866c", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/stdDevPop/stdDevPop-group-example-output.sh" }, { "blob" : "d452ed362ced77a7891ac3a148a640c95a4e336b", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/stdDevPop/stdDevPop-group-example.js" - }, { - "blob" : "3f3bbf27f96acec002d9b3fb7f6bea8730f0866c", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/stdDevPop/stdDevPop-group-example-output.sh" } ], "operator" : "stdDevPop", "pageBlob" : "57fd655e13fc629f3ce594c9168df1958eda6933", @@ -5845,12 +5517,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "da5aa827655931d1df76e3118176e51f7d4da003dc04a20eb1d6311fabb3afa0", - "text" : "db.movies.aggregate( [\n {\n $match: {\n directors: { $exists: true },\n \"imdb.rating\": { $type: \"double\" }\n }\n },\n {\n $unwind: \"$directors\"\n },\n {\n $group: {\n _id: \"$directors\",\n movieCount: { $sum: 1 },\n stdDevSampRating: { $stdDevSamp: \"$imdb.rating\" }\n }\n },\n {\n $match: { movieCount: { $gte: 10 } }\n },\n {\n $sort: { stdDevSampRating: -1 }\n },\n {\n $limit: 5\n }\n] )" + "sha256" : "4b5801d1d06f8a15b1728cc4d91f204188c911ae13fb157f6119e05f2f2e2b1e", + "text" : "db.movies.aggregate( [\n {\n $match: {\n directors: { $exists: true },\n \"imdb.rating\": { $type: \"double\" }\n }\n },\n {\n $unwind: \"$directors\"\n },\n {\n $group: {\n _id: \"$directors\",\n movieCount: { $sum: 1 },\n stdDevSampRating: { $stdDevSamp: \"$imdb.rating\" }\n }\n },\n {\n $match: { movieCount: { $gte: 10 } }\n },\n {\n $sort: { stdDevSampRating: -1 }\n },\n {\n $limit: 5\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "d4c95b1f93e5c606dabaa1707ea12dc6b80818a732d1af9e4aeaffc4dab4b163", - "text" : "[\n {\n _id: 'Bob Clark',\n movieCount: 12,\n stdDevSampRating: 1.7167622803617066\n },\n {\n _id: 'John McTiernan',\n movieCount: 10,\n stdDevSampRating: 1.517161091571287\n },\n {\n _id: 'James Cameron',\n movieCount: 10,\n stdDevSampRating: 1.4423745853433652\n },\n {\n _id: 'Sean McNamara',\n movieCount: 13,\n stdDevSampRating: 1.4051188470584879\n },\n {\n _id: 'Robert Rodriguez',\n movieCount: 20,\n stdDevSampRating: 1.303143971526675\n }\n]" + "sha256" : "2fb85cfe46bcf55281be9450076255979fcbc686f16aa2dfd4f6f585c871b037", + "text" : "[\n {\n _id: 'Bob Clark',\n movieCount: 12,\n stdDevSampRating: 1.7167622803617066\n },\n {\n _id: 'John McTiernan',\n movieCount: 10,\n stdDevSampRating: 1.517161091571287\n },\n {\n _id: 'James Cameron',\n movieCount: 10,\n stdDevSampRating: 1.4423745853433652\n },\n {\n _id: 'Sean McNamara',\n movieCount: 13,\n stdDevSampRating: 1.4051188470584879\n },\n {\n _id: 'Robert Rodriguez',\n movieCount: 20,\n stdDevSampRating: 1.303143971526675\n }\n]\n" } ], "detail" : null, "name" : "Find the Directors with the Most Varied Sampled Ratings", @@ -5860,20 +5532,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "07a0d2bc185b0ee825d16e4b33a8370a4d52dd61", - "path" : "content/manual/manual/source/includes/expressions/stdDevSamp/result-type.rst" - }, { - "blob" : "7617d6e12243d598effebc9036e0fec0dbaa97a3", - "path" : "content/manual/manual/source/includes/expressions/stdDevSamp/non-numeric-values.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "654f0a4849671c4c876ba8cc1aa55006f4e34cfa", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/stdDevSamp/stdDevSamp-group-example-output.sh" }, { "blob" : "d03d1fda42ddeaef7e254352dd254a17d9fd734b", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/stdDevSamp/stdDevSamp-group-example.js" - }, { - "blob" : "654f0a4849671c4c876ba8cc1aa55006f4e34cfa", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/stdDevSamp/stdDevSamp-group-example-output.sh" } ], "operator" : "stdDevSamp", "pageBlob" : "e516d1967a5de129fe9139ef7edd687ea7bc5a22", @@ -5892,16 +5555,7 @@ "stem" : null, "title" : "Single-Byte and Multibyte Character Set" } ], - "includes" : [ { - "blob" : "5eea7db82afdd4723cac7050891df1f7c7042823", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null.yaml" - }, { - "blob" : "ee40a9d1b0d38be8227b5f23cea8c85c217aeb5a", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null-base.yaml" - }, { - "blob" : "7eee3e4fc94d66ea02bce51327c26b5b566409d0", - "path" : "content/manual/manual/source/includes/fact-utf8-char-byte-sizes.rst" - } ], + "includes" : [ ], "operator" : "strLenBytes", "pageBlob" : "a06495a1fe0c05bcb9e565a44e367c44a1dd4a95", "source" : { @@ -5919,13 +5573,7 @@ "stem" : null, "title" : "Single-Byte and Multibyte Character Set" } ], - "includes" : [ { - "blob" : "5eea7db82afdd4723cac7050891df1f7c7042823", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null.yaml" - }, { - "blob" : "ee40a9d1b0d38be8227b5f23cea8c85c217aeb5a", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "strLenCP", "pageBlob" : "c665afe57d9316f1e265bc922d3c6f13aba6a56e", "source" : { @@ -5943,10 +5591,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "bac328588bd04092aed48c81b639ae76006c6dcd", - "path" : "content/manual/manual/source/includes/intro-aggregation-string.rst" - } ], + "includes" : [ ], "operator" : "strcasecmp", "pageBlob" : "201c31bd557bbc38845c90d22f93ee15847e650a", "source" : { @@ -5959,12 +5604,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "2b76bac3b7a35957d453ce8f7ec257a9fecb726124b44b6226e312981cdf3aaa", - "text" : "db.movies.aggregate( [\n { $match: { runtime: { $gt: 1000 } } },\n {\n $project:\n {\n _id: 0,\n title: 1,\n titleStart: { $substr: [ \"$title\", 0, 3 ] },\n titleRest: { $substr: [ \"$title\", 3, -1 ] }\n }\n }\n] )" + "sha256" : "ccf8881fbc74bf2bcb5aa4933e1b43ccbf2990fe6e9bddb16a9593e1fff9532c", + "text" : "db.movies.aggregate( [\n { $match: { runtime: { $gt: 1000 } } },\n {\n $project:\n {\n _id: 0,\n title: 1,\n titleStart: { $substr: [ \"$title\", 0, 3 ] },\n titleRest: { $substr: [ \"$title\", 3, -1 ] }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "636b077332755da09044bc7f69eb11f2ea37d4934117b90ce982408e225d339d", - "text" : "[\n {\n title: 'Centennial',\n titleStart: 'Cen',\n titleRest: 'tennial'\n },\n {\n title: 'Baseball',\n titleStart: 'Bas',\n titleRest: 'eball'\n }\n]" + "sha256" : "f142c71d5765b6fce325dfcc89d961a84c3bae77b6c16c4b707544adabb0b7a5", + "text" : "[\n {\n title: 'Centennial',\n titleStart: 'Cen',\n titleRest: 'tennial'\n },\n {\n title: 'Baseball',\n titleStart: 'Bas',\n titleRest: 'eball'\n }\n]\n" } ], "detail" : null, "name" : "Split Titles into Two Parts", @@ -5974,17 +5619,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "bac328588bd04092aed48c81b639ae76006c6dcd", - "path" : "content/manual/manual/source/includes/intro-aggregation-string.rst" - }, { - "blob" : "229b18c565a0524bcb3687d5661fa8650a3c93a5", - "path" : "content/manual/manual/source/includes/sample-data-usage-singular.rst" + "blob" : "5776ee89d86b69c8b6067820d14d3b1e189e454e", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/substr/substr-title-output.sh" }, { "blob" : "c27020007563386e7e715ac106ebbdebfb90c39f", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/substr/substr-title.snippet.substr-title.js" - }, { - "blob" : "5776ee89d86b69c8b6067820d14d3b1e189e454e", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/substr/substr-title-output.sh" } ], "operator" : "substr", "pageBlob" : "50f0632e1786705720336b269338291716348268", @@ -6010,16 +5649,7 @@ "stem" : null, "title" : "Single-Byte and Multibyte Character Set" } ], - "includes" : [ { - "blob" : "5eea7db82afdd4723cac7050891df1f7c7042823", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null.yaml" - }, { - "blob" : "ee40a9d1b0d38be8227b5f23cea8c85c217aeb5a", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null-base.yaml" - }, { - "blob" : "7eee3e4fc94d66ea02bce51327c26b5b566409d0", - "path" : "content/manual/manual/source/includes/fact-utf8-char-byte-sizes.rst" - } ], + "includes" : [ ], "operator" : "substrBytes", "pageBlob" : "3c4f8f7f1a504f4a8f41a9def415fabf3709a793", "source" : { @@ -6044,13 +5674,7 @@ "stem" : null, "title" : "Single-Byte and Multibyte Character Set" } ], - "includes" : [ { - "blob" : "5eea7db82afdd4723cac7050891df1f7c7042823", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null.yaml" - }, { - "blob" : "ee40a9d1b0d38be8227b5f23cea8c85c217aeb5a", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "substrCP", "pageBlob" : "984f01ba760fe25f064e51f78a91b0f7fa694290", "source" : { @@ -6061,6 +5685,17 @@ }, { "context" : "aggregation/expressions", "examples" : [ { + "blocks" : [ { + "role" : "DATA", + "sha256" : "bdd40f1297235c72695508739046ec3739dae8b96083a8aaa8722015ef18248b", + "text" : "db.sales.insertMany([\n { \"_id\" : 1, \"item\" : \"abc\", \"price\" : 10, \"fee\" : 2, \"discount\" : 5, \"date\" : ISODate(\"2014-03-01T08:00:00Z\") },\n { \"_id\" : 2, \"item\" : \"jkl\", \"price\" : 20, \"fee\" : 1, \"discount\" : 2, \"date\" : ISODate(\"2014-03-01T09:00:00Z\") }\n])" + } ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "subtractMillisecondsFromADate", + "title" : "Subtract Milliseconds from a Date" + }, { "blocks" : [ ], "detail" : null, "owner" : "aggregation/expressions/subtract/subtractNumbers", @@ -6074,33 +5709,8 @@ "status" : "OWNED", "stem" : null, "title" : "Subtract Two Dates" - }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "5b578e526cf4f43e6f695c5ee65c13fe9bdb6f4a8a21ce2038669064a506c636", - "text" : "db.sales.aggregate( [ { $project: { item: 1, dateDifference: { $subtract: [ \"$date\", 5 * 60 * 1000 ] } } } ] )" - }, { - "role" : "DATA", - "sha256" : "bdd40f1297235c72695508739046ec3739dae8b96083a8aaa8722015ef18248b", - "text" : "db.sales.insertMany([\n { \"_id\" : 1, \"item\" : \"abc\", \"price\" : 10, \"fee\" : 2, \"discount\" : 5, \"date\" : ISODate(\"2014-03-01T08:00:00Z\") },\n { \"_id\" : 2, \"item\" : \"jkl\", \"price\" : 20, \"fee\" : 1, \"discount\" : 2, \"date\" : ISODate(\"2014-03-01T09:00:00Z\") }\n])" - }, { - "role" : "EXPECTED", - "sha256" : "204f21ba2056ad87736f31d15bfe32b6d7d127b63c38c4f177d6b904ace1a361", - "text" : "{ \"_id\" : 1, \"item\" : \"abc\", \"dateDifference\" : ISODate(\"2014-03-01T07:55:00Z\") }\n{ \"_id\" : 2, \"item\" : \"jkl\", \"dateDifference\" : ISODate(\"2014-03-01T08:55:00Z\") }" - } ], - "detail" : null, - "owner" : null, - "status" : "UNOWNED", - "stem" : "subtractMillisecondsFromADate", - "title" : "Subtract Milliseconds from a Date" - } ], - "includes" : [ { - "blob" : "f7fd73d828d6f219d9b36508700d241d1eca6b55", - "path" : "content/manual/manual/source/includes/agg-expression-order-of-return-behavior.rst" - }, { - "blob" : "c3b315c23a61268d34fa153458d50f118d49b696", - "path" : "content/manual/manual/source/includes/agg-expression-mixed-input-types-with-date.rst" } ], + "includes" : [ ], "operator" : "subtract", "pageBlob" : "c93a9b4e8320e7315287f5809ce1ab5153e4576d", "source" : { @@ -6110,7 +5720,14 @@ } }, { "context" : "aggregation/expressions", - "examples" : [ ], + "examples" : [ { + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : null, + "title" : "main" + } ], "includes" : [ ], "operator" : "subtype", "pageBlob" : "bd6734174eca70532ed9ad821b033cdc6c8e2dea", @@ -6124,12 +5741,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "71390247d6d31ae4b9cbf51c29648ee2bb46e43474602550df84e0c08b5225ff", - "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.votes\": { $type: \"int\" }\n }\n },\n {\n $group: {\n _id: \"$rated\",\n totalVotes: { $sum: \"$imdb.votes\" }\n }\n },\n {\n $sort: { _id: 1 }\n }\n] )" + "sha256" : "8ab0a79d619ee161ed1fc77568652b6cc43b36183c23e55e80efafb2e4ebb0f8", + "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.votes\": { $type: \"int\" }\n }\n },\n {\n $group: {\n _id: \"$rated\",\n totalVotes: { $sum: \"$imdb.votes\" }\n }\n },\n {\n $sort: { _id: 1 }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "0ed0046e5edc63dddccd63483b5f81106c692aa719f37ccf9088112a8ab0bf4b", - "text" : "[\n { _id: 'G', totalVotes: 12773015 },\n { _id: 'PG', totalVotes: 57205811 },\n { _id: 'PG-13', totalVotes: 152323029 },\n { _id: 'R', totalVotes: 209762435 }\n]" + "sha256" : "6d745ee02ac28feb10ce7457011fcb288689f3110fb1ea0149398073ab50073c", + "text" : "[\n { _id: 'G', totalVotes: 12773015 },\n { _id: 'PG', totalVotes: 57205811 },\n { _id: 'PG-13', totalVotes: 152323029 },\n { _id: 'R', totalVotes: 209762435 }\n]\n" } ], "detail" : null, "name" : "Total the Votes by Rating", @@ -6139,17 +5756,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "85de00388e00b33caf038afdb291761bf55a809f", - "path" : "content/manual/manual/source/includes/expressions/sum/result-type.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "367efe7cbb0183374d084f2137df1872a3ecdfa1", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/sum/sum-group-example-output.sh" }, { "blob" : "85855b45f8d66eec99c44200925f26ef8fc59148", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/sum/sum-group-example.js" - }, { - "blob" : "367efe7cbb0183374d084f2137df1872a3ecdfa1", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/sum/sum-group-example-output.sh" } ], "operator" : "sum", "pageBlob" : "b783cbdf62cf197d0fd21edcc07af1be77d57108", @@ -6169,14 +5780,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "229b18c565a0524bcb3687d5661fa8650a3c93a5", - "path" : "content/manual/manual/source/includes/sample-data-usage-singular.rst" + "blob" : "cc71bc517e0756f430e58797c43647acf53326aa", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/switch/switch-summary-output.sh" }, { "blob" : "eac03d6c5fb32e61ce2aadec644f943cf5d01528", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/switch/switch-summary.snippet.switch-summary.js" - }, { - "blob" : "cc71bc517e0756f430e58797c43647acf53326aa", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/switch/switch-summary-output.sh" } ], "operator" : "switch", "pageBlob" : "8a02297aeac1e4a12290825a1bb8a4e6f27889de", @@ -6189,17 +5797,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "8558e3370b32fd2ab1ea0841ce77d00d497a46818190ae4141bb24fa68623e2c", - "text" : "db.trigonometry.aggregate([\n {\n $addFields : {\n \"side_b\" : {\n $multiply : [\n { $tan : {$degreesToRadians : \"$angle_a\"} },\n \"$side_a\"\n ]\n }\n }\n }\n])" - }, { "role" : "DATA", "sha256" : "c7876967dca332f47758a97170704b86de9a5a799bb7759033f9b9a7364b84b7", "text" : "{\n \"_id\" : ObjectId(\"5c50782193f833234ba90d85\"),\n \"angle_a\" : Decimal128(\"53.13010235415597870314438744090659\"),\n \"side_a\" : Decimal128(\"3\")\n}" }, { - "role" : "EXPECTED", - "sha256" : "e637c87dc992490740c4eb517e6d01c759d630cc369413886382d2dc5382fa3d", - "text" : "{\n \"_id\" : ObjectId(\"5c50782193f833234ba90d85\"),\n \"angle_a\" : Decimal128(\"53.13010235415597870314438744090659\"),\n \"side_a\" : Decimal128(\"3\")\n \"side_b\" : Decimal128(\"4.000000000000000000000000000000000\")\n}" + "role" : "ACTION", + "sha256" : "8558e3370b32fd2ab1ea0841ce77d00d497a46818190ae4141bb24fa68623e2c", + "text" : "db.trigonometry.aggregate([\n {\n $addFields : {\n \"side_b\" : {\n $multiply : [\n { $tan : {$degreesToRadians : \"$angle_a\"} },\n \"$side_a\"\n ]\n }\n }\n }\n])" } ], "detail" : null, "owner" : null, @@ -6208,17 +5812,13 @@ "title" : "main :: Tangent of Value in Degrees" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "77142b787e783ee8c05ae6136926b5f5739eb5b9c584cd0977285b1e6333d795", - "text" : "db.trigonometry.aggregate([\n {\n $addFields : {\n \"side_b\" : {\n $multiply : [\n { $tan : \"$angle_a\" },\n \"$side_a\"\n ]\n }\n }\n }\n])" - }, { "role" : "DATA", "sha256" : "32aea62bc2358b846c116d8494678e6c3c179959a768c6fd85113aaf6ea52b83", "text" : "{\n \"_id\" : ObjectId(\"5c50782193f833234ba90d85\"),\n \"angle_a\" : Decimal128(\"0.9272952180016122324285124629224288\"),\n \"side_a\" : Decimal128(\"3\")\n}" }, { - "role" : "EXPECTED", - "sha256" : "b1cec4c24b23c8ddfd3de82a2ddabd511a8959d8e49c491793911b6597c5e78b", - "text" : "{\n \"_id\" : ObjectId(\"5c50782193f833234ba90d85\"),\n \"angle_a\" : Decimal128(\"0.9272952180016122324285124629224288\"),\n \"side_a\" : Decimal128(\"3\")\n \"side_b\" : Decimal128(\"3.999999999999999999999999999999999\")\n}" + "role" : "ACTION", + "sha256" : "77142b787e783ee8c05ae6136926b5f5739eb5b9c584cd0977285b1e6333d795", + "text" : "db.trigonometry.aggregate([\n {\n $addFields : {\n \"side_b\" : {\n $multiply : [\n { $tan : \"$angle_a\" },\n \"$side_a\"\n ]\n }\n }\n }\n])" } ], "detail" : null, "owner" : null, @@ -6263,13 +5863,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "c3b2ddfe0ba3d2631f069fbf7d1bb2e3a61bb7bcaf431dc569b31c3094e66e37", - "text" : "db.jsonStrings.aggregate([\n {\n $project: {\n _id: 0,\n numbers: { $toArray: \"[1, 2, 3]\" },\n documents: { $toArray: '[{\"a\": 1}, {\"b\": 2}]' }\n }\n }\n])" - }, { "role" : "DATA", "sha256" : "f74826ca1171db382ee501aae3fb9c20a724b117e5f738d06bc091453c9464e6", "text" : "db.jsonStrings.insertOne({_id: 1})" + }, { + "role" : "ACTION", + "sha256" : "c3b2ddfe0ba3d2631f069fbf7d1bb2e3a61bb7bcaf431dc569b31c3094e66e37", + "text" : "db.jsonStrings.aggregate([\n {\n $project: {\n _id: 0,\n numbers: { $toArray: \"[1, 2, 3]\" },\n documents: { $toArray: '[{\"a\": 1}, {\"b\": 2}]' }\n }\n }\n])" }, { "role" : "EXPECTED", "sha256" : "80d31d38e1d34bb49920a523e4f08e8d2e644c30a32982d3a83ac2fe1561735e", @@ -6282,17 +5882,13 @@ "title" : "Convert String to Array" }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "12042ad668a8e1c896d6771a47344bcf7e8a5587e9456e90644be3c52bd3e944", + "text" : "db.t.insertMany([\n // Empty PACKED_BIT vector converts to empty array\n { v: BinData(9, \"EAA=\") },\n\n // PACKED_BIT vector converts to bool array\n { v: BinData(9, \"EAB/Bw==\") },\n\n // INT8 vector converts to int array\n { v: BinData(9, \"AwAAAQ==\") },\n\n // FLOAT32 vector converts to double array\n { v: BinData(9, \"JwCamZk+\") },\n\n // FLOAT32 vector with special values converts to [-Infinity, 0, Infinity]\n { v: BinData(9, \"JwAAAID/AAAAAAAAgH8=\") }\n])\n" + }, { "role" : "ACTION", "sha256" : "5bbcced32b493b27957c74df5d6c6a5b533fb443888039ea010d7ecd35289deb", "text" : "db.t.aggregate([\n {\n $project: {\n _id: 0,\n original: \"$v\",\n asArray: { $toArray: \"$v\" }\n }\n }\n])" - }, { - "role" : "DATA", - "sha256" : "b5b3e129091383fd67bbf3ba6c26f2f9b9475bf656a3ad5a366082e7d802f0c3", - "text" : "db.t.insertMany([\n // Empty PACKED_BIT vector converts to empty array\n { v: BinData(9, \"EAA=\") },\n\n // PACKED_BIT vector converts to bool array\n { v: BinData(9, \"EAB/Bw==\") },\n\n // INT8 vector converts to int array\n { v: BinData(9, \"AwAAAQ==\") },\n\n // FLOAT32 vector converts to double array\n { v: BinData(9, \"JwCamZk+\") },\n\n // FLOAT32 vector with special values converts to [-Infinity, 0, Infinity]\n { v: BinData(9, \"JwAAAID/AAAAAAAAgH8=\") }\n])" - }, { - "role" : "EXPECTED", - "sha256" : "8bb7c5335395732d2f3bdb9e5f834f134743f683ac375b674f8f4eeed59ba149", - "text" : "[\n { original: Binary.fromPackedBits(new Uint8Array([])), asArray: [] },\n {\n original: Binary.fromPackedBits(new Uint8Array([ 127, 7 ])),\n asArray: [\n false, true, true, true,\n true, true, true, true,\n false, false, false, false,\n false, true, true, true\n ]\n },\n {\n original: Binary.fromInt8Array(new Int8Array([ 0, 1 ])),\n asArray: [ 0, 1 ]\n },\n {\n original: Binary.fromFloat32Array(new Float32Array([ 0.30000001192092896 ])),\n asArray: [ 0.30000001192092896 ]\n },\n {\n original: Binary.fromFloat32Array(new Float32Array([ -Infinity, 0, Infinity ])),\n asArray: [ -Infinity, 0, Infinity ]\n }\n]" } ], "detail" : null, "owner" : null, @@ -6301,15 +5897,6 @@ "title" : "Convert binData to Array" } ], "includes" : [ { - "blob" : "46e56a01b3255844a09dfee92bc584b5f4b0cc70", - "path" : "content/manual/manual/source/includes/table-toArray-input-types.rst" - }, { - "blob" : "c8f297c0fb410f5ce25e6cace3fee022bc3b7f69", - "path" : "content/manual/manual/source/includes/fact-string-conversion-numeric-type-mapping.rst" - }, { - "blob" : "b76d01a4d7404e67a2429dec4d8d218b817022cb", - "path" : "content/manual/manual/source/includes/note-conversion-error-use-convert.rst" - }, { "blob" : "72736095896477fa9181955843fa6efd9df6d70c", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/convert/bindata-to-array/variants/load-data.snippet.insert-bindata-variants.js" }, { @@ -6333,13 +5920,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "f8ab05af1fbde0294b3e67f09dd98e0c6a52b27b", - "path" : "content/manual/manual/source/includes/aggregation/convert-to-bool-table.rst" - }, { - "blob" : "b76d01a4d7404e67a2429dec4d8d218b817022cb", - "path" : "content/manual/manual/source/includes/note-conversion-error-use-convert.rst" - } ], + "includes" : [ ], "operator" : "toBool", "pageBlob" : "945ca7f77b306dc81e39db62dbbfaf93cafc4e66", "source" : { @@ -6357,10 +5938,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "b76d01a4d7404e67a2429dec4d8d218b817022cb", - "path" : "content/manual/manual/source/includes/note-conversion-error-use-convert.rst" - } ], + "includes" : [ ], "operator" : "toDate", "pageBlob" : "8159f02b6463caa505da9a0aa9e0c2091747d360", "source" : { @@ -6378,13 +5956,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "ef26cd3139db43d301ca6309232174ef8a6b6a50", - "path" : "content/manual/manual/source/includes/strings-to-non-decimal.rst" - }, { - "blob" : "b76d01a4d7404e67a2429dec4d8d218b817022cb", - "path" : "content/manual/manual/source/includes/note-conversion-error-use-convert.rst" - } ], + "includes" : [ ], "operator" : "toDecimal", "pageBlob" : "5b8280f52da49a473f2a4d3f4d89f491dac0de3e", "source" : { @@ -6402,16 +5974,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "ef26cd3139db43d301ca6309232174ef8a6b6a50", - "path" : "content/manual/manual/source/includes/strings-to-non-decimal.rst" - }, { - "blob" : "934d83fed7a52db903577e36417cbfb92269024e", - "path" : "content/manual/manual/source/includes/fact-float-parse-behavior-8.3.rst" - }, { - "blob" : "b76d01a4d7404e67a2429dec4d8d218b817022cb", - "path" : "content/manual/manual/source/includes/note-conversion-error-use-convert.rst" - } ], + "includes" : [ ], "operator" : "toDouble", "pageBlob" : "e73c8e1f2d8702f5cde46d2a00272fcc8e448cdf", "source" : { @@ -6422,20 +5985,11 @@ }, { "context" : "aggregation/expressions", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "799d9684b84aac32629867f268a98d012b4426c697157b36769341364b88e174", - "text" : "db.aggregate(\n [ \n { $documents: [ { val: \"string to hash\" } ] },\n { $addFields: { hashedVal: { $toHashedIndexKey: \"$val\" } } }\n ]\n )" - }, { - "role" : "EXPECTED", - "sha256" : "6b54fc3800486eaa98108027ce1c14ab2470c6fb1ae257ce21174cdeee28cea4", - "text" : "[ { val: 'string to hash', hashedVal: Long(\"763543691661428748\") } ]" - } ], - "detail" : null, - "name" : "Hash a String Value", + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", - "stem" : "hashAStringValue", + "status" : "UNSUPPORTED", + "stem" : null, "title" : "main" } ], "includes" : [ ], @@ -6456,13 +6010,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "ef26cd3139db43d301ca6309232174ef8a6b6a50", - "path" : "content/manual/manual/source/includes/strings-to-non-decimal.rst" - }, { - "blob" : "b76d01a4d7404e67a2429dec4d8d218b817022cb", - "path" : "content/manual/manual/source/includes/note-conversion-error-use-convert.rst" - } ], + "includes" : [ ], "operator" : "toInt", "pageBlob" : "fe668b18591dcfc213514f78c5f6aaaf659fd05a", "source" : { @@ -6480,13 +6028,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "ef26cd3139db43d301ca6309232174ef8a6b6a50", - "path" : "content/manual/manual/source/includes/strings-to-non-decimal.rst" - }, { - "blob" : "b76d01a4d7404e67a2429dec4d8d218b817022cb", - "path" : "content/manual/manual/source/includes/note-conversion-error-use-convert.rst" - } ], + "includes" : [ ], "operator" : "toLong", "pageBlob" : "575c29a6e50ece90c346822c1413c11957e20a52", "source" : { @@ -6504,13 +6046,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "bac328588bd04092aed48c81b639ae76006c6dcd", - "path" : "content/manual/manual/source/includes/intro-aggregation-string.rst" - }, { - "blob" : "e18f42f9ba222c7ce6ca479912bb77e02a8cacc3", - "path" : "content/manual/manual/source/includes/toLower-toUpper-sample-data.rst" - } ], + "includes" : [ ], "operator" : "toLower", "pageBlob" : "e7940de4a77fc035016a72f78a3cf6607aa17980", "source" : { @@ -6522,13 +6058,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "7577f55096f3673130618651036c87f0139bba4c1aec26f2295f656d92ffe6c3", - "text" : "db.jsonStrings.aggregate([\n {\n $project: {\n _id: 0,\n parsedConfig: { $toObject: \"$config\" }\n }\n }\n])" - }, { "role" : "DATA", "sha256" : "66346427411b36d6cf83b0990aa3e15966a9c8729d4017feaea92de974a9e8e6", "text" : "db.jsonStrings.insertOne({\n _id: 1,\n config: '{\"feature\": true, \"threshold\": 10}'\n})" + }, { + "role" : "ACTION", + "sha256" : "7577f55096f3673130618651036c87f0139bba4c1aec26f2295f656d92ffe6c3", + "text" : "db.jsonStrings.aggregate([\n {\n $project: {\n _id: 0,\n parsedConfig: { $toObject: \"$config\" }\n }\n }\n])" }, { "role" : "EXPECTED", "sha256" : "044575137b3c5972df383e52194cc4e8c16fcbc72367d195fd9887975a7f8a24", @@ -6540,16 +6076,7 @@ "stem" : "convertStringToObject", "title" : "Convert String to Object" } ], - "includes" : [ { - "blob" : "b633737537009b8fe1d953c489ac32a9e03f1515", - "path" : "content/manual/manual/source/includes/table-toObject-input-types.rst" - }, { - "blob" : "c8f297c0fb410f5ce25e6cace3fee022bc3b7f69", - "path" : "content/manual/manual/source/includes/fact-string-conversion-numeric-type-mapping.rst" - }, { - "blob" : "b76d01a4d7404e67a2429dec4d8d218b817022cb", - "path" : "content/manual/manual/source/includes/note-conversion-error-use-convert.rst" - } ], + "includes" : [ ], "operator" : "toObject", "pageBlob" : "cf5f94d1062adfe1341336f9834e173ac0b3dfed", "source" : { @@ -6567,10 +6094,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "b76d01a4d7404e67a2429dec4d8d218b817022cb", - "path" : "content/manual/manual/source/includes/note-conversion-error-use-convert.rst" - } ], + "includes" : [ ], "operator" : "toObjectId", "pageBlob" : "e1d44aa53dfbcb71326486eba70b495b1876c924", "source" : { @@ -6588,16 +6112,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "8d9ac8e294a8050c751e0c54841a1286d10e037f", - "path" : "content/manual/manual/source/includes/convert-string-types.rst" - }, { - "blob" : "ef26cd3139db43d301ca6309232174ef8a6b6a50", - "path" : "content/manual/manual/source/includes/strings-to-non-decimal.rst" - }, { - "blob" : "b76d01a4d7404e67a2429dec4d8d218b817022cb", - "path" : "content/manual/manual/source/includes/note-conversion-error-use-convert.rst" - } ], + "includes" : [ ], "operator" : "toString", "pageBlob" : "8f7c11b742922a12cfc58a1f0fef0127d6266c4c", "source" : { @@ -6633,13 +6148,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "bac328588bd04092aed48c81b639ae76006c6dcd", - "path" : "content/manual/manual/source/includes/intro-aggregation-string.rst" - }, { - "blob" : "e18f42f9ba222c7ce6ca479912bb77e02a8cacc3", - "path" : "content/manual/manual/source/includes/toLower-toUpper-sample-data.rst" - } ], + "includes" : [ ], "operator" : "toUpper", "pageBlob" : "e4166a0b0bb18c9246f6d21f25f4f7372e4f4ab0", "source" : { @@ -6652,12 +6161,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "3c90d1177232bf8675ea4f5ad8e31e47ce28c5b97bd5ca0c119dbc947e0fb3dd", - "text" : "db.movies.aggregate( [\n {\n $match: {\n genres: \"Comedy\",\n \"imdb.rating\": { $gt: 0 }\n }\n },\n {\n $group:\n {\n _id: \"Comedy\",\n highestRatedMovie:\n {\n $top:\n {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1 }\n }\n }\n }\n }\n] )" + "sha256" : "41a7d62cd77b87bbe7970fec814b60184190b7f1bf84e26b2a4abd12e4471d3a", + "text" : "db.movies.aggregate( [\n {\n $match: {\n genres: \"Comedy\",\n \"imdb.rating\": { $gt: 0 }\n }\n },\n {\n $group:\n {\n _id: \"Comedy\",\n highestRatedMovie:\n {\n $top:\n {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1 }\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "e3ae3d66d724f36b080cb7ceb626babaf355df39c1e9bfb87439264a8e6a9687", - "text" : "[\n { _id: 'Comedy', highestRatedMovie: [ 'Over the Garden Wall', 9.2 ] }\n]" + "sha256" : "7bc249a284553c7bb8422709804e281da5905721bef53cc670c4caed68882347", + "text" : "[\n { _id: 'Comedy', highestRatedMovie: [ 'Over the Garden Wall', 9.2 ] }\n]\n" } ], "detail" : null, "owner" : null, @@ -6667,12 +6176,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "04624cb32d484138917f1ee5fb253b7ade09499e9cf36cc7ffb6651ccf438e20", - "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.rating\": { $gt: 0 }\n }\n },\n {\n $group:\n {\n _id: \"$rated\",\n highestRatedMovie:\n {\n $top:\n {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1 }\n }\n }\n }\n },\n {\n $sort: { _id: 1 }\n }\n] )" + "sha256" : "9333923207ccb8e6ee9375998c06d21174eaeaf73d02da843d4743b6b44a2dbc", + "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.rating\": { $gt: 0 }\n }\n },\n {\n $group:\n {\n _id: \"$rated\",\n highestRatedMovie:\n {\n $top:\n {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1 }\n }\n }\n }\n },\n {\n $sort: { _id: 1 }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "363ee7b81c4daf251bc53e65a45a2418a1276e3e05793eeb35e3923a4954a02c", - "text" : "[\n { _id: 'G', highestRatedMovie: [ 'Modern Times', 8.6 ] },\n { _id: 'PG', highestRatedMovie: [ 'Life', 9.2 ] },\n {\n _id: 'PG-13',\n highestRatedMovie: [ 'A Brave Heart: The Lizzie Velasquez Story', 9.4 ]\n },\n { _id: 'R', highestRatedMovie: [ 'The Shawshank Redemption', 9.3 ] }\n]" + "sha256" : "afc2d9d340fc2e2e5f97ae1845117de38e765f9b3e995bc39795990584f050eb", + "text" : "[\n { _id: 'G', highestRatedMovie: [ 'Modern Times', 8.6 ] },\n { _id: 'PG', highestRatedMovie: [ 'Life', 9.2 ] },\n {\n _id: 'PG-13',\n highestRatedMovie: [ 'A Brave Heart: The Lizzie Velasquez Story', 9.4 ]\n },\n { _id: 'R', highestRatedMovie: [ 'The Shawshank Redemption', 9.3 ] }\n]\n" } ], "detail" : null, "owner" : null, @@ -6681,32 +6190,29 @@ "title" : "Find the Top Rating Across Multiple Ratings" } ], "includes" : [ { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "96fa0c85e3cd5212816b049a015d98a39355f8ae", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/null-missing-values.snippet.null-missing-values.js" - }, { - "blob" : "bad20b62a6d7440faacff9101e08805a011cee6c", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/null-missing-values-output.sh" + "blob" : "b21fe2f60687a01b20aa3e7eb4ba9de111a1226c", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/bson-sort-ordering-output.sh" }, { "blob" : "455a89756448d3f6c0d454265c3569b8f2fd4e68", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/bson-sort-ordering.snippet.bson-sort-ordering.js" }, { - "blob" : "b21fe2f60687a01b20aa3e7eb4ba9de111a1226c", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/bson-sort-ordering-output.sh" + "blob" : "b208fee121914642ff493ee2a53036bf68cf92bd", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/find-top-rating-genre-output.sh" }, { "blob" : "51e240cd70f87d5a4bc6142ef240d518955d9921", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/find-top-rating-genre.snippet.find-top-rating-genre.js" }, { - "blob" : "b208fee121914642ff493ee2a53036bf68cf92bd", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/find-top-rating-genre-output.sh" + "blob" : "9b56acfc10da4208be5b908dcc4cdc53f829ac75", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/find-top-rating-rated-output.sh" }, { "blob" : "700a0ac25d63cd4824593507f77fc291c573982d", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/find-top-rating-rated.snippet.find-top-rating-rated.js" }, { - "blob" : "9b56acfc10da4208be5b908dcc4cdc53f829ac75", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/find-top-rating-rated-output.sh" + "blob" : "bad20b62a6d7440faacff9101e08805a011cee6c", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/null-missing-values-output.sh" + }, { + "blob" : "96fa0c85e3cd5212816b049a015d98a39355f8ae", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/top/null-missing-values.snippet.null-missing-values.js" } ], "operator" : "top", "pageBlob" : "a44a9ba7c0218bd34c9b72de45d12a4a9a7d800e", @@ -6720,12 +6226,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "e325e8744ad18dd5e20b21e842c005b9216de9471ea305485a3cc0fab4936452", - "text" : "db.movies.aggregate( [\n {\n $match: {\n genres: \"Short\",\n \"imdb.rating\": { $gt: 0 }\n }\n },\n {\n $group: {\n _id: \"Short\",\n topRatedMovies: {\n $topN: {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1, title: 1 },\n n: 3\n }\n }\n }\n }\n] )" + "sha256" : "ecac93511bbfc6349b9175cc961adc456bc46bd9279d982c2619c41afbe4cc07", + "text" : "db.movies.aggregate( [\n {\n $match: {\n genres: \"Short\",\n \"imdb.rating\": { $gt: 0 }\n }\n },\n {\n $group: {\n _id: \"Short\",\n topRatedMovies: {\n $topN: {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1, title: 1 },\n n: 3\n }\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "46d63d677f3059da504c7088511d23d1847efd889b9a59556feab7b243c35b49", - "text" : "[\n {\n _id: 'Short',\n topRatedMovies: [\n [ 'Rabbit and Deer', 8.7 ],\n [ 'Assume the Position with Mr. Wuhl', 8.6 ],\n [ 'Hole', 8.6 ]\n ]\n }\n]" + "sha256" : "7c60b4386dc7055267e4bd5335744bd0ed4edcf631509b8a40571ae931b97e23", + "text" : "[\n {\n _id: 'Short',\n topRatedMovies: [\n [ 'Rabbit and Deer', 8.7 ],\n [ 'Assume the Position with Mr. Wuhl', 8.6 ],\n [ 'Hole', 8.6 ]\n ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -6735,12 +6241,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "7c0d95158219b01fae1513921baede4846a95f4884f1ea0f220dd1a2c5401b92", - "text" : "db.movies.aggregate( [\n {\n $unwind: \"$genres\"\n },\n {\n $match: {\n \"imdb.rating\": { $gt: 0 }\n }\n },\n {\n $group: {\n _id: \"$genres\",\n topRatedMovies: {\n $topN: {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1, title: 1 },\n n: 3\n }\n }\n }\n },\n {\n $sort: { _id: 1 }\n },\n {\n $limit: 5\n }\n] )" + "sha256" : "e717373ca9b43c9f31ea89f5264150e078d312f1e98c2aa6e83e17ae6b7fbdc4", + "text" : "db.movies.aggregate( [\n {\n $unwind: \"$genres\"\n },\n {\n $match: {\n \"imdb.rating\": { $gt: 0 }\n }\n },\n {\n $group: {\n _id: \"$genres\",\n topRatedMovies: {\n $topN: {\n output: [ \"$title\", \"$imdb.rating\" ],\n sortBy: { \"imdb.rating\": -1, title: 1 },\n n: 3\n }\n }\n }\n },\n {\n $sort: { _id: 1 }\n },\n {\n $limit: 5\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "56a56994f6ad41eecbd8ed8cc103ccf9747479bbc5b684ec0dddff8864a245b6", - "text" : "[\n {\n _id: 'Action',\n topRatedMovies: [\n [ 'Band of Brothers', 9.6 ],\n [ 'The Real Miyagi', 9.3 ],\n [ 'The Dark Knight', 9 ]\n ]\n },\n {\n _id: 'Adventure',\n topRatedMovies: [\n [ 'Over the Garden Wall', 9.2 ],\n [ 'Love is God', 8.9 ],\n [ 'The Lord of the Rings: The Return of the King', 8.9 ]\n ]\n },\n {\n _id: 'Animation',\n topRatedMovies: [\n [ 'Over the Garden Wall', 9.2 ],\n [ 'Death Note', 9 ],\n [ 'Rabbit and Deer', 8.7 ]\n ]\n },\n {\n _id: 'Biography',\n topRatedMovies: [\n [ 'A Brave Heart: The Lizzie Velasquez Story', 9.4 ],\n [ \"Schindler's List\", 8.9 ],\n [ 'Shining Night: A Portrait of Composer Morten Lauridsen', 8.8 ]\n ]\n },\n {\n _id: 'Comedy',\n topRatedMovies: [\n [ 'Over the Garden Wall', 9.2 ],\n [ 'Heart of a Dog', 9 ],\n [ 'The Chaos Class Failed the Class', 9 ]\n ]\n }\n]" + "sha256" : "f538fa0a26b5a8f1ec279d44336ab40ba8938917415b1966c1460bd2643c1412", + "text" : "[\n {\n _id: 'Action',\n topRatedMovies: [\n [ 'Band of Brothers', 9.6 ],\n [ 'The Real Miyagi', 9.3 ],\n [ 'The Dark Knight', 9 ]\n ]\n },\n {\n _id: 'Adventure',\n topRatedMovies: [\n [ 'Over the Garden Wall', 9.2 ],\n [ 'Love is God', 8.9 ],\n [ 'The Lord of the Rings: The Return of the King', 8.9 ]\n ]\n },\n {\n _id: 'Animation',\n topRatedMovies: [\n [ 'Over the Garden Wall', 9.2 ],\n [ 'Death Note', 9 ],\n [ 'Rabbit and Deer', 8.7 ]\n ]\n },\n {\n _id: 'Biography',\n topRatedMovies: [\n [ 'A Brave Heart: The Lizzie Velasquez Story', 9.4 ],\n [ \"Schindler's List\", 8.9 ],\n [ 'Shining Night: A Portrait of Composer Morten Lauridsen', 8.8 ]\n ]\n },\n {\n _id: 'Comedy',\n topRatedMovies: [\n [ 'Over the Garden Wall', 9.2 ],\n [ 'Heart of a Dog', 9 ],\n [ 'The Chaos Class Failed the Class', 9 ]\n ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -6750,12 +6256,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "eaf7490aa691dab9f8c819c36a4881da087ebfd5dbd01d5d43049d2d9ef69fe2", - "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.rating\": { $gt: 0 }\n }\n },\n {\n $group: {\n _id: { rated: \"$rated\" },\n movies: {\n $topN: {\n output: { title: \"$title\", rating: \"$imdb.rating\" },\n n: {\n $cond: {\n if: { $eq: [ \"$rated\", \"PG\" ] },\n then: 3,\n else: 1\n }\n },\n sortBy: { \"imdb.rating\": -1 }\n }\n }\n }\n },\n {\n $sort: { \"_id.rated\": 1 }\n }\n] )" + "sha256" : "5bd612c539a99edf5bbc553da72fcc66393a0fc94b1de916ebea70dad53a9271", + "text" : "db.movies.aggregate( [\n {\n $match: {\n rated: { $in: [ \"G\", \"PG\", \"PG-13\", \"R\" ] },\n \"imdb.rating\": { $gt: 0 }\n }\n },\n {\n $group: {\n _id: { rated: \"$rated\" },\n movies: {\n $topN: {\n output: { title: \"$title\", rating: \"$imdb.rating\" },\n n: {\n $cond: {\n if: { $eq: [ \"$rated\", \"PG\" ] },\n then: 3,\n else: 1\n }\n },\n sortBy: { \"imdb.rating\": -1 }\n }\n }\n }\n },\n {\n $sort: { \"_id.rated\": 1 }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "cc114ff23929c34b518847ca7c254610fe1995a91651b50a628c505b16906b93", - "text" : "[\n {\n _id: { rated: 'G' },\n movies: [ { title: 'Modern Times', rating: 8.6 } ]\n },\n {\n _id: { rated: 'PG' },\n movies: [\n { title: 'Life', rating: 9.2 },\n {\n title: 'Star Wars: Episode V - The Empire Strikes Back',\n rating: 8.8\n },\n { title: 'Andaz Apna Apna', rating: 8.8 }\n ]\n },\n {\n _id: { rated: 'PG-13' },\n movies: [\n {\n title: 'A Brave Heart: The Lizzie Velasquez Story',\n rating: 9.4\n }\n ]\n },\n {\n _id: { rated: 'R' },\n movies: [ { title: 'The Shawshank Redemption', rating: 9.3 } ]\n }\n]" + "sha256" : "b0b88713986f53b4eadd18111eefa815004f2d4361618737557f7b782d02e12a", + "text" : "[\n {\n _id: { rated: 'G' },\n movies: [ { title: 'Modern Times', rating: 8.6 } ]\n },\n {\n _id: { rated: 'PG' },\n movies: [\n { title: 'Life', rating: 9.2 },\n {\n title: 'Star Wars: Episode V - The Empire Strikes Back',\n rating: 8.8\n },\n { title: 'Andaz Apna Apna', rating: 8.8 }\n ]\n },\n {\n _id: { rated: 'PG-13' },\n movies: [\n {\n title: 'A Brave Heart: The Lizzie Velasquez Story',\n rating: 9.4\n }\n ]\n },\n {\n _id: { rated: 'R' },\n movies: [ { title: 'The Shawshank Redemption', rating: 9.3 } ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -6764,26 +6270,23 @@ "title" : "Set n Dynamically Based on the Group Key" } ], "includes" : [ { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "a4e04d34e03f9544aa65bf2ae9a8aba1c4b0a22a", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/topN/compute-n-based-on-group-key-output.sh" }, { - "blob" : "fd95c29fe253af449d7290211f4125034bb27d3d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/topN/find-top-three-shorts.js" + "blob" : "5c34f907453dad25d7bbfa94cc2b28901d29ea38", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/topN/compute-n-based-on-group-key.js" }, { - "blob" : "2e42aa42ebfa9d8faf30a8cef24e2d1bed03d45e", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/topN/find-top-three-shorts-output.sh" + "blob" : "77272067467390b0c5b4807e7a1690aa390cb817", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/topN/find-top-per-genre-output.sh" }, { "blob" : "abeafab3568f1e15c7c81d73416a4a4f64e7e422", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/topN/find-top-per-genre.js" }, { - "blob" : "77272067467390b0c5b4807e7a1690aa390cb817", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/topN/find-top-per-genre-output.sh" - }, { - "blob" : "5c34f907453dad25d7bbfa94cc2b28901d29ea38", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/topN/compute-n-based-on-group-key.js" + "blob" : "2e42aa42ebfa9d8faf30a8cef24e2d1bed03d45e", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/topN/find-top-three-shorts-output.sh" }, { - "blob" : "a4e04d34e03f9544aa65bf2ae9a8aba1c4b0a22a", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/topN/compute-n-based-on-group-key-output.sh" + "blob" : "fd95c29fe253af449d7290211f4125034bb27d3d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/accumulators/topN/find-top-three-shorts.js" } ], "operator" : "topN", "pageBlob" : "68fd3a1a63bbfa2718f454f01671d272aa12d972", @@ -6796,13 +6299,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "2b53649596e636143a08204e97a41eedbd7d57f08b860f013318d74e2ac4b0c7", - "text" : "db.inventory.aggregate([\n { $project: { item: 1, description: { $trim: { input: \"$description\" } } } }\n])" - }, { "role" : "DATA", "sha256" : "9c662d167ba82f524d3304f02a7492492647c299a465325662a002aad99139c6", "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"ABC1\", quarter: \"13Q1\", description: \" product 1\" },\n { _id: 2, item: \"ABC2\", quarter: \"13Q4\", description: \"product 2 \\n The product is in stock. \\n\\n \" },\n { _id: 3, item: \"XYZ1\", quarter: \"14Q2\", description: null }\n] )" + }, { + "role" : "ACTION", + "sha256" : "2b53649596e636143a08204e97a41eedbd7d57f08b860f013318d74e2ac4b0c7", + "text" : "db.inventory.aggregate([\n { $project: { item: 1, description: { $trim: { input: \"$description\" } } } }\n])" }, { "role" : "EXPECTED", "sha256" : "ec36cdec8f06f794c6579a6af9fecd1e72bd106ccd9fbbdc4f2898a3c688620f", @@ -6815,13 +6318,7 @@ "stem" : "trimSurroundingWhitespace", "title" : "main" } ], - "includes" : [ { - "blob" : "5b6497933c4c19e238a411142ae6e1299c6fc339", - "path" : "content/manual/manual/source/includes/list-table-trim-white-space.rst" - }, { - "blob" : "7f91e8f456a6fcb886f568ea04dd0966fe7f7f5d", - "path" : "content/manual/manual/source/includes/fact-trim-chars-length-limit.rst" - } ], + "includes" : [ ], "operator" : "trim", "pageBlob" : "a3fd2aac7b3ffb8cf9cd8cff113c7842549c7c06", "source" : { @@ -6833,16 +6330,53 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/trunc/truncExpressionOperator", "status" : "OWNED", "stem" : null, "title" : "main" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "1525aa8e53f49221925c9ebadf216c1cb9e9613dd46af32cc6a4ad4bbe329280", + "text" : "db.samples.insertMany(\n [\n { _id: 1, value: 19.25 },\n { _id: 2, value: 28.73 },\n { _id: 3, value: 34.32 },\n { _id: 4, value: -45.34 }\n ]\n)" + }, { + "role" : "ACTION", + "sha256" : "79f7d9c090a22304aa9eab96018c85298ab2939d45d9119f82675fafed32ab80", + "text" : "db.samples.aggregate([\n { $project: { truncatedValue: { $trunc: [ \"$value\", -1 ] } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "8a7399665441f42ab465c7194ae6672facb6682a4d764336761978976ff3745d", + "text" : "{ \"_id\" : 1, \"truncatedValue\" : 10 }\n{ \"_id\" : 2, \"truncatedValue\" : 20 }\n{ \"_id\" : 3, \"truncatedValue\" : 30 }\n{ \"_id\" : 4, \"truncatedValue\" : -40 }" + } ], + "detail" : null, + "name" : "Truncate to Tens", + "owner" : null, + "status" : "UNOWNED", + "stem" : "truncateToTens", + "title" : "main" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "1525aa8e53f49221925c9ebadf216c1cb9e9613dd46af32cc6a4ad4bbe329280", + "text" : "db.samples.insertMany(\n [\n { _id: 1, value: 19.25 },\n { _id: 2, value: 28.73 },\n { _id: 3, value: 34.32 },\n { _id: 4, value: -45.34 }\n ]\n)" + }, { + "role" : "ACTION", + "sha256" : "dd795ae32c1afe8dfa1213eb899da281c63541ef88308249a20aabfce8931fa1", + "text" : "db.samples.aggregate([\n { $project: { truncatedValue: { $trunc: [ \"$value\", 0 ] } } }\n])" + }, { + "role" : "EXPECTED", + "sha256" : "6647de6e367af125bbc377203087a25158fbf3a3eae3a5e00708cbd2ef411e14", + "text" : "{ \"_id\" : 1, \"truncatedValue\" : 19 }\n{ \"_id\" : 2, \"truncatedValue\" : 28 }\n{ \"_id\" : 3, \"truncatedValue\" : 34 }\n{ \"_id\" : 4, \"truncatedValue\" : -45 }" + } ], + "detail" : null, + "name" : "Truncate to a Whole Number", + "owner" : null, + "status" : "UNOWNED", + "stem" : "truncateToAWholeNumber", + "title" : "main" } ], - "includes" : [ { - "blob" : "229f397c2a5a12c1f5965f348b058ca320ad0c8c", - "path" : "content/manual/manual/source/includes/precision.rst" - } ], + "includes" : [ ], "operator" : "trunc", "pageBlob" : "cc1d9b8f1c7193a3cd36f4e6a726657c446cfccc", "source" : { @@ -6854,13 +6388,13 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "318e2e5ead2c505d0b107e03638d1554b70e74e62ac1cdd3c965f2bf9ec5c4e3", - "text" : "db.stockSales.aggregate( [\n {\n $project:\n {\n _id: 0, saleTimestamp: 1, saleIncrement: { $tsIncrement: \"$saleTimestamp\" }\n }\n }\n] )" - }, { "role" : "DATA", "sha256" : "af3c25db5ca69a7c8dcae6e424a4982ff8506cdf4dd598d2626c8d7ab411f4f6", "text" : "db.stockSales.insertMany( [\n { _id: 0, symbol: \"MDB\", saleTimestamp: Timestamp(1622731060, 1) },\n { _id: 1, symbol: \"MDB\", saleTimestamp: Timestamp(1622731060, 2) },\n { _id: 2, symbol: \"MSFT\", saleTimestamp: Timestamp(1714124193, 1) },\n { _id: 3, symbol: \"MSFT\", saleTimestamp: Timestamp(1714124193, 2) },\n { _id: 4, symbol: \"MSFT\", saleTimestamp: Timestamp(1714124193, 3) }\n] )" + }, { + "role" : "ACTION", + "sha256" : "318e2e5ead2c505d0b107e03638d1554b70e74e62ac1cdd3c965f2bf9ec5c4e3", + "text" : "db.stockSales.aggregate( [\n {\n $project:\n {\n _id: 0, saleTimestamp: 1, saleIncrement: { $tsIncrement: \"$saleTimestamp\" }\n }\n }\n] )" }, { "role" : "EXPECTED", "sha256" : "0bf8dac118fea3c02c6dbf3e0fd275d45fe40c7c1b2625019d9b3bb0783ba0bb", @@ -6871,20 +6405,15 @@ "status" : "UNOWNED", "stem" : "obtainTheIncrementingOrdinalFromATimestampField", "title" : "Obtain the Incrementing Ordinal from a Timestamp Field" - } ], - "includes" : [ { - "blob" : "72074037fefae990774d72bf7673b636fab2eccb", - "path" : "content/manual/manual/source/includes/tsIncrement-introduction.rst" }, { - "blob" : "a70d0f7025666a855267cba1031cf183714121b2", - "path" : "content/manual/manual/source/includes/stockSales-example-collection.rst" - }, { - "blob" : "8dc9f2955e7b78f2820cee46bf97db2b15517199", - "path" : "content/manual/manual/source/includes/stockSales-example-collection-create.rst" - }, { - "blob" : "f56012674985fd6d9fe5f558a661d55d6a717156", - "path" : "content/manual/manual/source/includes/cakeSales-example-collection.rst" + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "useTsIncrementInAChangeStreamCursorToMonitorCollectionChanges", + "title" : "Use $tsIncrement in a Change Stream Cursor to Monitor Collection Changes" } ], + "includes" : [ ], "operator" : "tsIncrement", "pageBlob" : "ba7d86a85c20c04a96d967bb32ab09fb466ded9f", "source" : { @@ -6901,20 +6430,15 @@ "status" : "OWNED", "stem" : null, "title" : "Obtain the Number of Seconds from a Timestamp Field" - } ], - "includes" : [ { - "blob" : "cae80161291eadfe7c4c76d37dcb6b5ee9e40de6", - "path" : "content/manual/manual/source/includes/tsSecond-introduction.rst" - }, { - "blob" : "a70d0f7025666a855267cba1031cf183714121b2", - "path" : "content/manual/manual/source/includes/stockSales-example-collection.rst" }, { - "blob" : "8dc9f2955e7b78f2820cee46bf97db2b15517199", - "path" : "content/manual/manual/source/includes/stockSales-example-collection-create.rst" - }, { - "blob" : "f56012674985fd6d9fe5f558a661d55d6a717156", - "path" : "content/manual/manual/source/includes/cakeSales-example-collection.rst" + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "useTsSecondInAChangeStreamCursorToMonitorCollectionChanges", + "title" : "Use $tsSecond in a Change Stream Cursor to Monitor Collection Changes" } ], + "includes" : [ ], "operator" : "tsSecond", "pageBlob" : "dbb6838892ec89984bc8e0626e4a5e7032a350e0", "source" : { @@ -6933,13 +6457,13 @@ "title" : "main" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "71a912ab47952214b53a206fa71706ee44bce22f9d7cd27e6b582f16701085a5", - "text" : "db.coll.aggregate([ \n { \n $addFields: { \n a: { \n $cond: { \n if: { $eq: [{ $type: \"$a\" }, \"missing\"] },\n then: [], \n else: \"$a\"\n } \n } \n } \n } \n])" - }, { "role" : "DATA", "sha256" : "470ccb216fe3509514249254c428c0cbd7205edff1a089e43fde5a895818432d", "text" : "db.coll.insertMany( [\n { _id: 0, a : 8 },\n { _id: 1, a : [ 41.63, 88.19 ] },\n { _id: 2, a : { a : \"apple\", b : \"banana\", c: \"carrot\" } },\n { _id: 3, a : \"caribou\" },\n { _id: 4, a : Long(71) },\n { _id: 5, a : null },\n { _id: 6 }\n] )" + }, { + "role" : "ACTION", + "sha256" : "303b661ec7331e6c6d47ed29dff93c813e7a446e5674431afc44ae7a4b2277b9", + "text" : "db.coll.aggregate([ \n { \n $addFields: { \n a: { \n $cond: { \n if: { $eq: [{ $type: \"$a\" }, \"missing\"] },\n then: [], \n else: \"$a\"\n } \n } \n } \n } \n]) \n" }, { "role" : "EXPECTED", "sha256" : "5573f47819b56380262791135191aee8c0b2cfbf89b2192bd48e836714603886", @@ -6949,26 +6473,23 @@ "owner" : null, "status" : "UNOWNED", "stem" : "existenceCheck", - "title" : "Existence Check " + "title" : "Existence Check" } ], "includes" : [ { - "blob" : "68e6ad99d0175b55f816233404bec7d1f29f012f", - "path" : "content/manual/manual/source/includes/fact-bson-types.rst" - }, { "blob" : "239be43e8db6d306b23044bf6770cf5f079eb39e", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/type/load-data.js" - }, { - "blob" : "f2afa09d1d0fdc591f3ea9961794672b1255417d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/type/projection.js" - }, { - "blob" : "b7ce13102f551a2709a4fa5f9360a115510bd471", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/type/projection-output.sh" }, { "blob" : "95eba3d8152b955a825060c3956b3342b57d5e26", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/type/missing-field.js" }, { "blob" : "c6208f03093322771ddc4231027b4eb70cf869f3", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/type/missing-output.sh" + }, { + "blob" : "b7ce13102f551a2709a4fa5f9360a115510bd471", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/type/projection-output.sh" + }, { + "blob" : "f2afa09d1d0fdc591f3ea9961794672b1255417d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/type/projection.js" } ], "operator" : "type", "pageBlob" : "dc307336f962beda493a4c18a0c7a9334da48789", @@ -6981,18 +6502,18 @@ "context" : "aggregation/expressions", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/unsetField/removeFieldsThatContainPeriods", "status" : "OWNED", "stem" : null, - "title" : "Remove Fields that Contain Periods (``.``)" + "title" : "Remove Fields that Contain Periods (.)" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/expressions/unsetField/removeFieldsThatStartWithADollarSign", "status" : "OWNED", "stem" : null, - "title" : "Remove Fields that Start with a Dollar Sign (``$``)" + "title" : "Remove Fields that Start with a Dollar Sign ($)" }, { "blocks" : [ ], "detail" : null, @@ -7009,17 +6530,6 @@ "path" : "content/manual/manual/source/reference/operator/aggregation/unsetField.txt", "relation" : "AT_ORIGIN" } - }, { - "context" : "aggregation/expressions", - "examples" : [ ], - "includes" : [ ], - "operator" : "vectorSearch", - "pageBlob" : "cff81b333f48d7d4d1259b3a7d7c3544894a41a2", - "source" : { - "commit" : "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", - "path" : "content/manual/manual/source/reference/operator/aggregation/vectorSearch.txt", - "relation" : "AT_ORIGIN" - } }, { "context" : "aggregation/expressions", "examples" : [ { @@ -7030,10 +6540,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - } ], + "includes" : [ ], "operator" : "week", "pageBlob" : "9defe2dd33bd18cf0e40313ba290710dd37242f4", "source" : { @@ -7051,10 +6558,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "3a74fe28048991c6f514db876929e8939534d8ee", - "path" : "content/manual/manual/source/includes/fact-iso-date-objects.rst" - } ], + "includes" : [ ], "operator" : "year", "pageBlob" : "fdb705c93c5fe9b8e2da9f6c2abb3bf8d2392639", "source" : { @@ -7073,13 +6577,13 @@ "title" : "Matrix Transposition" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "fa9d146463dcf062851ee395749dfe5f1efd10b6dc1250d34242f097b3ce7b67", - "text" : "db.pages.aggregate([{\n $project: {\n _id: false,\n pages: {\n $filter: {\n input: {\n $zip: {\n inputs: [ \"$pages\", { $range: [0, { $size: \"$pages\" }] } ]\n }\n },\n as: \"pageWithIndex\",\n cond: {\n $let: {\n vars: {\n page: { $arrayElemAt: [ \"$$pageWithIndex\", 0 ] }\n },\n in: { $gte: [ \"$$page.reviews\", 1 ] }\n }\n }\n }\n }\n }\n}])" - }, { "role" : "DATA", "sha256" : "f8ef0586776b54709eb4a4f8cc59fd4d2284c667411b134596ba7a123517c727", "text" : "db.pages.insertOne( {\n \"category\": \"unix\",\n \"pages\": [\n { \"title\": \"awk for beginners\", reviews: 5 },\n { \"title\": \"sed for newbies\", reviews: 0 },\n { \"title\": \"grep made simple\", reviews: 2 },\n] } )" + }, { + "role" : "ACTION", + "sha256" : "fa9d146463dcf062851ee395749dfe5f1efd10b6dc1250d34242f097b3ce7b67", + "text" : "db.pages.aggregate([{\n $project: {\n _id: false,\n pages: {\n $filter: {\n input: {\n $zip: {\n inputs: [ \"$pages\", { $range: [0, { $size: \"$pages\" }] } ]\n }\n },\n as: \"pageWithIndex\",\n cond: {\n $let: {\n vars: {\n page: { $arrayElemAt: [ \"$$pageWithIndex\", 0 ] }\n },\n in: { $gte: [ \"$$page.reviews\", 1 ] }\n }\n }\n }\n }\n }\n}])" }, { "role" : "EXPECTED", "sha256" : "89ade7ea5649ec74fd7e717044fef32ae19a6c837b60a63531e6fcab858a6a74", @@ -7091,13 +6595,7 @@ "stem" : "filteringAndPreservingIndexes", "title" : "Filtering and Preserving Indexes" } ], - "includes" : [ { - "blob" : "5eea7db82afdd4723cac7050891df1f7c7042823", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null.yaml" - }, { - "blob" : "ee40a9d1b0d38be8227b5f23cea8c85c217aeb5a", - "path" : "content/manual/manual/source/includes/extracts-3.4-agg-expression-null-base.yaml" - } ], + "includes" : [ ], "operator" : "zip", "pageBlob" : "c5747f08bee83735943e7e50ad96d64bd36ffce6", "source" : { @@ -7110,18 +6608,18 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "c94a5f87bb3b1dc0e264e31cc697ca2a6e6bf0c07cad3fbd3d96d20b5cede7eb", - "text" : "db.movies.aggregate( [\n { $match: { runtime: { $gt: 1000 } } },\n {\n $addFields: {\n runtimeHours: {\n $floor: { $divide: [ \"$runtime\", 60 ] }\n },\n ratingOutOf100: { $multiply: [ \"$imdb.rating\", 10 ] }\n }\n },\n {\n $addFields: {\n licenseFeeUSD: {\n $multiply: [ \"$runtimeHours\", 0.50 ]\n }\n }\n }\n] )" + "sha256" : "c0f18d13dab4d995060dd04179f0e3d047e28f537b6e94fa723ad498dfb3ef2d", + "text" : "db.movies.aggregate( [\n { $match: { runtime: { $gt: 1000 } } },\n {\n $addFields: {\n runtimeHours: {\n $floor: { $divide: [ \"$runtime\", 60 ] }\n },\n ratingOutOf100: { $multiply: [ \"$imdb.rating\", 10 ] }\n }\n },\n {\n $addFields: {\n licenseFeeUSD: {\n $multiply: [ \"$runtimeHours\", 0.50 ]\n }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "17617c78d64a2ff20a8392b1500649f117b75a1e7504de55f8572ea0a3c05e62", - "text" : "[\n { _id: ..., title: 'Baseball', runtime: 1140, runtimeHours: 19, licenseFeeUSD: 9.5 },\n { _id: ..., title: 'Centennial', runtime: 1256, runtimeHours: 20, licenseFeeUSD: 10 }\n]\n..." + "sha256" : "b2cc56e234b178d79a50e54997659485b6ae37c56666494c5a1e52ee6401dd57", + "text" : "[\n { _id: ..., title: 'Baseball', runtime: 1140, runtimeHours: 19, licenseFeeUSD: 9.5 },\n { _id: ..., title: 'Centennial', runtime: 1256, runtimeHours: 20, licenseFeeUSD: 10 }\n]\n...\n" } ], - "detail" : null, + "detail" : "DOCUMENT_STREAM_SYNTAX", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "usingTwoAddFieldsStages", - "title" : "Using Two ``$addFields`` Stages" + "title" : "Using Two $addFields Stages" }, { "blocks" : [ ], "detail" : null, @@ -7130,11 +6628,36 @@ "stem" : null, "title" : "Adding Fields to an Embedded Document" }, { - "blocks" : [ ], - "detail" : "matched by name", - "owner" : "aggregation/stages/addFields/overwritingAnExistingField", - "status" : "OWNED", - "stem" : null, + "blocks" : [ { + "role" : "ACTION", + "sha256" : "89993056e3ee816d2a66650430801b9323e422be1ac9ed843c585c4af5b46d5d", + "text" : "db.movies.aggregate( [\n { $match: { runtime: { $gt: 1000 } } },\n {\n $addFields: { runtime: { $add: [ \"$runtime\", 15 ] } }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "f57cb7a24ede55a0289e887d25ef376acbb4ed709da32b53a7881bb320aa2e86", + "text" : "[\n { _id: ..., title: 'Baseball', runtime: 1155 },\n { _id: ..., title: 'Centennial', runtime: 1271 }\n]\n...\n" + } ], + "detail" : "DOCUMENT_STREAM_SYNTAX", + "name" : "Add Fifteen Minutes to the Runtime", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "addFifteenMinutesToTheRuntime", + "title" : "Overwriting an Existing Field" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "ce9390daa8cef8eeb28c3f171f03c8bc90b900b64edd09203230f9f85f216479", + "text" : "db.movies.aggregate( [\n { $match: { runtime: { $gt: 1000 } } },\n {\n $addFields: {\n _id: \"$title\",\n title: { $arrayElemAt: [ \"$genres\", 0 ] }\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "1db4ffcbfbadcf4f5e2a4be16df182c5c3266239bfe14bcc4e97a507f6dfddfa", + "text" : "[\n { _id: 'Baseball', title: 'Documentary' },\n { _id: 'Centennial', title: 'Action' }\n]\n...\n" + } ], + "detail" : "DOCUMENT_STREAM_SYNTAX", + "name" : "Replace the Id and Title", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "replaceTheIdAndTitle", "title" : "Overwriting an Existing Field" }, { "blocks" : [ ], @@ -7144,79 +6667,83 @@ "stem" : null, "title" : "Add Element to an Array" }, { - "blocks" : [ ], - "detail" : null, - "owner" : "aggregation/stages/addFields/removeFields", - "status" : "OWNED", - "stem" : null, + "blocks" : [ { + "role" : "ACTION", + "sha256" : "88447f5cea6ecee25abd4c19418487c1421cc00485371800894545a10ebcb51f", + "text" : "db.movies.aggregate( [\n { $match: { runtime: { $gt: 1000 } } },\n {\n $addFields: { plot: \"$$REMOVE\" }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "69f314ad9e45ee44a911baae1ca075cce96f6e246bf137723b9f9cb16cbf831d", + "text" : "[\n { _id: ..., title: 'Baseball', runtime: 1140 },\n { _id: ..., title: 'Centennial', runtime: 1256 }\n]\n...\n" + } ], + "detail" : "DOCUMENT_STREAM_SYNTAX", + "name" : "Remove the Plot", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "removeThePlot", + "title" : "Remove Fields" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "9eecd139e361e16def8d11fd536b36868ed36842300bae2a3b56259d16d79b8f", + "text" : "db.movies.aggregate( [\n { $match: { runtime: { $gt: 1000 } } },\n {\n $addFields:\n {\n rated: {\n $ifNull: [ \"$rated\", \"$$REMOVE\" ]\n }\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "18fd1216a28c0cb2d179a813540f8ee40c12afae432a11103a980a2fe98c6e2e", + "text" : "[\n { _id: ..., title: 'Baseball', rated: 'TV-PG' },\n { _id: ..., title: 'Centennial' }\n]\n...\n" + } ], + "detail" : "DOCUMENT_STREAM_SYNTAX", + "name" : "Remove a Missing Rating", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "removeAMissingRating", "title" : "Remove Fields" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" - }, { - "blob" : "679847ce034910ed9e898f4806cc83a7e1f6da59", - "path" : "content/manual/manual/source/includes/aggregation/agg-project-remove-fields-compare.rst" + "blob" : "34ca56a8b6f0fe45b9bcab3419f99cb730cacc8d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/add-to-array-output.sh" }, { - "blob" : "47aa98567419fe00895dfe9813eef3eb5fd1c81b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/two-stages.snippet.add-fields-two-stages.js" + "blob" : "142962a56530fe9ce80a78349a69e8bdb62ef73d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/add-to-array.snippet.add-fields-add-to-array.js" }, { - "blob" : "e9832ef85d7a8af06bbf4824e15b028063a14c79", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/two-stages-output.sh" + "blob" : "052ed18c2f43fff649a542abcf1d60cdcb213eae", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/embedded-doc-output.sh" }, { "blob" : "8a53e0d727d31b6d71569d685b4df00d6b9b2bf9", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/embedded-doc.snippet.add-fields-embedded-doc.js" }, { - "blob" : "052ed18c2f43fff649a542abcf1d60cdcb213eae", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/embedded-doc-output.sh" + "blob" : "9850fd30ef80bece3180fb59e1f65e803e6a2bce", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/field-substitution-output.sh" }, { - "blob" : "bd107b76e4a542ed316f52e8bd0e80663b4ea0bf", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/overwrite-field.snippet.add-fields-overwrite.js" + "blob" : "13a07a35c35dc7ac779b9d720f425f139fe7fcd6", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/field-substitution.snippet.add-fields-field-substitution.js" }, { "blob" : "24746eb9544b54ee71e23d8c8c4f590e0b060ecc", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/overwrite-field-output.sh" }, { - "blob" : "13a07a35c35dc7ac779b9d720f425f139fe7fcd6", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/field-substitution.snippet.add-fields-field-substitution.js" + "blob" : "bd107b76e4a542ed316f52e8bd0e80663b4ea0bf", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/overwrite-field.snippet.add-fields-overwrite.js" }, { - "blob" : "9850fd30ef80bece3180fb59e1f65e803e6a2bce", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/field-substitution-output.sh" + "blob" : "944f28966b5e68a556291bff0e49b89e451a054c", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/remove-field-conditional-output.sh" }, { - "blob" : "142962a56530fe9ce80a78349a69e8bdb62ef73d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/add-to-array.snippet.add-fields-add-to-array.js" + "blob" : "aa9f978a494cd185c00418bb0cc37d14efef1547", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/remove-field-conditional.snippet.add-fields-remove-field-conditional.js" }, { - "blob" : "34ca56a8b6f0fe45b9bcab3419f99cb730cacc8d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/add-to-array-output.sh" + "blob" : "786405b3b67a9aaa6b2ecf2f43bf4d7c62dd0a2a", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/remove-field-output.sh" }, { "blob" : "bc0c122b5861aa69840ae40a931316f67e607c0e", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/remove-field.snippet.add-fields-remove-field.js" }, { - "blob" : "786405b3b67a9aaa6b2ecf2f43bf4d7c62dd0a2a", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/remove-field-output.sh" + "blob" : "e9832ef85d7a8af06bbf4824e15b028063a14c79", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/two-stages-output.sh" }, { - "blob" : "aa9f978a494cd185c00418bb0cc37d14efef1547", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/remove-field-conditional.snippet.add-fields-remove-field-conditional.js" + "blob" : "47aa98567419fe00895dfe9813eef3eb5fd1c81b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/two-stages.snippet.add-fields-two-stages.js" }, { - "blob" : "944f28966b5e68a556291bff0e49b89e451a054c", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/add-fields/remove-field-conditional-output.sh" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "addFields", "pageBlob" : "27ab069e832fca10d6751d38379479b33816a3f9", @@ -7229,13 +6756,13 @@ "context" : "aggregation/stages", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "610b34a27da3932b6f64c3f8ba2c276726455828a56fb268a3a9eaa1b5b78077", - "text" : " db.artists.aggregate( [\n // First Stage\n {\n $bucket: {\n groupBy: \"$year_born\", // Field to group by\n boundaries: [ 1840, 1850, 1860, 1870, 1880 ], // Boundaries for the buckets\n default: \"Other\", // Bucket ID for documents which do not fall into a bucket\n output: { // Output for each bucket\n \"count\": { $sum: 1 },\n \"artists\" :\n {\n $push: {\n \"name\": { $concat: [ \"$first_name\", \" \", \"$last_name\"] },\n \"year_born\": \"$year_born\"\n }\n }\n }\n }\n },\n // Second Stage\n {\n $match: { count: {$gt: 3} }\n }\n] )" - }, { "role" : "DATA", "sha256" : "8f790c5f28a611c558c7a7ed573dcdb07a57727a772efc0fd3eb648dc47bc6bd", "text" : "db.artists.insertMany([\n { \"_id\" : 1, \"last_name\" : \"Bernard\", \"first_name\" : \"Emil\", \"year_born\" : 1868, \"year_died\" : 1941, \"nationality\" : \"France\" },\n { \"_id\" : 2, \"last_name\" : \"Rippl-Ronai\", \"first_name\" : \"Joszef\", \"year_born\" : 1861, \"year_died\" : 1927, \"nationality\" : \"Hungary\" },\n { \"_id\" : 3, \"last_name\" : \"Ostroumova\", \"first_name\" : \"Anna\", \"year_born\" : 1871, \"year_died\" : 1955, \"nationality\" : \"Russia\" },\n { \"_id\" : 4, \"last_name\" : \"Van Gogh\", \"first_name\" : \"Vincent\", \"year_born\" : 1853, \"year_died\" : 1890, \"nationality\" : \"Holland\" },\n { \"_id\" : 5, \"last_name\" : \"Maurer\", \"first_name\" : \"Alfred\", \"year_born\" : 1868, \"year_died\" : 1932, \"nationality\" : \"USA\" },\n { \"_id\" : 6, \"last_name\" : \"Munch\", \"first_name\" : \"Edvard\", \"year_born\" : 1863, \"year_died\" : 1944, \"nationality\" : \"Norway\" },\n { \"_id\" : 7, \"last_name\" : \"Redon\", \"first_name\" : \"Odilon\", \"year_born\" : 1840, \"year_died\" : 1916, \"nationality\" : \"France\" },\n { \"_id\" : 8, \"last_name\" : \"Diriks\", \"first_name\" : \"Edvard\", \"year_born\" : 1855, \"year_died\" : 1930, \"nationality\" : \"Norway\" }\n])" + }, { + "role" : "ACTION", + "sha256" : "610b34a27da3932b6f64c3f8ba2c276726455828a56fb268a3a9eaa1b5b78077", + "text" : " db.artists.aggregate( [\n // First Stage\n {\n $bucket: {\n groupBy: \"$year_born\", // Field to group by\n boundaries: [ 1840, 1850, 1860, 1870, 1880 ], // Boundaries for the buckets\n default: \"Other\", // Bucket ID for documents which do not fall into a bucket\n output: { // Output for each bucket\n \"count\": { $sum: 1 },\n \"artists\" :\n {\n $push: {\n \"name\": { $concat: [ \"$first_name\", \" \", \"$last_name\"] },\n \"year_born\": \"$year_born\"\n }\n }\n }\n }\n },\n // Second Stage\n {\n $match: { count: {$gt: 3} }\n }\n] )" }, { "role" : "EXPECTED", "sha256" : "6aae509728906237b34dda431fd0b4796ed19e1eb6bf5408c2078f39cce79a5a", @@ -7255,20 +6782,14 @@ "title" : "Use $bucket with $facet to Bucket by Multiple Fields" } ], "includes" : [ { - "blob" : "97bd14c5e162b994ded2808d0570b178588b5731", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/sample-data-movie.rst" + "blob" : "9e6c8a3a732eecb8a8d14075cb745f28bdb478dc", + "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/Movie.cs" }, { - "blob" : "f7c6ec562b7d84d7572cf9bb0653430d55c5fca8", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/convention-pack-note.rst" + "blob" : "129e06800d3e819b8d58d9e4264d09382ea7c1b0", + "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/BuildersExamples.cs" }, { - "blob" : "ee647c08862815d574922531a022424144e6fdd4", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/method-intro.rst" - }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "bucket", "pageBlob" : "d51b4b3bdf75adad21fc761cbe601da623d8d122", @@ -7280,6 +6801,13 @@ }, { "context" : "aggregation/stages", "examples" : [ { + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : null, + "title" : "main" + }, { "blocks" : [ ], "detail" : null, "owner" : "aggregation/stages/bucketAuto/singleFacetAggregation", @@ -7295,20 +6823,14 @@ "title" : "Multi-Faceted Aggregation" } ], "includes" : [ { - "blob" : "97bd14c5e162b994ded2808d0570b178588b5731", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/sample-data-movie.rst" - }, { - "blob" : "f7c6ec562b7d84d7572cf9bb0653430d55c5fca8", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/convention-pack-note.rst" + "blob" : "9e6c8a3a732eecb8a8d14075cb745f28bdb478dc", + "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/Movie.cs" }, { - "blob" : "ee647c08862815d574922531a022424144e6fdd4", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/method-intro.rst" + "blob" : "129e06800d3e819b8d58d9e4264d09382ea7c1b0", + "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/BuildersExamples.cs" }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "bucketAuto", "pageBlob" : "aae8f10bf73ffa5b9ae22e5f5ec81d8bef493956", @@ -7320,25 +6842,22 @@ }, { "context" : "aggregation/stages", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "c7b41eadb79149ce317163d6e02efa3551551fd91e9c2e61d40544733f4bfee4", - "text" : "var cur = db.names.aggregate( [\n { $changeStream: {} }\n] )" - }, { - "role" : "EXPECTED", - "sha256" : "5ea747115d72208c8ee9c70a804a5b104cdae11e80aea431c7920a23287c0f10", - "text" : "{\n \"_id\": {\n _data: \"8262E2EE54000000022B022C0100296E5A100448E5E3DD01364019AE8FE8C6859527E046645F6964006462E2EE54C8756C0D5CF6F0720004\"\n },\n \"operationType\": \"insert\",\n \"clusterTime\": Timestamp({ t: 1659039316, i: 2 }),\n \"wallTime\": ISODate(\"2022-07-28T20:15:16.148Z\"),\n \"fullDocument\": {\n \"_id\": ObjectId(\"62e2ee54c8756c0d5cf6f072\"),\n \"name\": \"Walker Percy\"\n },\n \"ns\": {\n \"db\": \"test\",\n \"coll\": \"names\"\n },\n \"documentKey\": { _id: ObjectId(\"62e2ee54c8756c0d5cf6f072\") }\n}" - } ], - "detail" : null, - "name" : "Open a Change Stream", + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", - "stem" : "openAChangeStream", + "status" : "UNSUPPORTED", + "stem" : null, "title" : "main" } ], "includes" : [ { - "blob" : "4b0d81d005a31a0fd7a69b219101e8177598a90f", - "path" : "content/manual/manual/source/includes/stable-api/change-stream-support.rst" + "blob" : "7588d80ee187268220dbbdabf90d3d7a8a76a06d", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/ChangeStream.snippet.change-stream-options.cs" + }, { + "blob" : "c74d3cecb4430f9ae9279b967776d9f4fcf8c18c", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/ChangeStream.snippet.change-stream.cs" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "changeStream", "pageBlob" : "09737538d3bc9f5694ebde87c54759bd3d299a58", @@ -7349,36 +6868,20 @@ } }, { "context" : "aggregation/stages", - "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "93f73aef6deac8d63fb3888a36b4d1013b7a438b16b710b9f2fc61364bb10276", - "text" : "db.myCollection.updateOne(\n { _id: 0 },\n { $set: { largeField: \"b\".repeat( 16 * 1024 * 1024 - 1024 ) } }\n)" - }, { - "role" : "DATA", - "sha256" : "1e41ea3547b65786eeca362bb617657711dec4955cbc6454b6b39471cb4e898a", - "text" : "db.myCollection.insertOne(\n { _id: 0, largeField: \"a\".repeat( 16 * 1024 * 1024 - 1024 ) }\n)" - }, { - "role" : "DATA", - "sha256" : "9486b878121babc7c75a78256622c9853f73732c3b3c02da011b1e65e0dab1d7", - "text" : "db.runCommand( {\n collMod: \"myCollection\",\n changeStreamPreAndPostImages: { enabled: true }\n} )" - }, { - "role" : "DATA", - "sha256" : "ca19d759c2031960f8699129b403b345eb7872a9ef675bf878a3bcdcb34aac60", - "text" : "myChangeStreamCursor = db.myCollection.watch(\n [ { $changeStreamSplitLargeEvent: {} } ],\n { fullDocument: \"required\", fullDocumentBeforeChange: \"required\" }\n)" - }, { - "role" : "EXPECTED", - "sha256" : "0c080d4ea36d19ef3d5be80659186b6051f8064bf7a381f85517a0f9145e5871", - "text" : "const firstFragment = myChangeStreamCursor.next()\nconst secondFragment = myChangeStreamCursor.next()\nconst thirdFragment = myChangeStreamCursor.next()" - } ], - "detail" : null, - "name" : "Split a Large Change Event", - "owner" : null, - "status" : "UNOWNED", - "stem" : "splitALargeChangeEvent", - "title" : "main" + "examples" : [ ], + "includes" : [ { + "blob" : "05df931446c4cc4d5be12f94d740351eb35d4791", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/ChangeStreamSplitLargeEvent.snippet.change-stream-split-large-event.cs" + }, { + "blob" : "a30c9990fd9665f1b373b853555be8aa15d23ff6", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/ChangeStreamSplitLargeEvent.snippet.large-document-class.cs" + }, { + "blob" : "668fc03c2772997b7c5641930e0c8ebbd8184cef", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/ChangeStreamSplitLargeEventOutput.txt" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], - "includes" : [ ], "operator" : "changeStreamSplitLargeEvent", "pageBlob" : "4e42a6b41fa8f4358b753f1f139c624088a0ade6", "source" : { @@ -7395,8 +6898,8 @@ "text" : "db.matrices.aggregate( [ { $collStats: { latencyStats: { histograms: true } } } ] )" }, { "role" : "EXPECTED", - "sha256" : "b17677b7e78e342810b9321d99143aedd4eadcb2f7aaf97172a613ba6c26470b", - "text" : "{ \"ns\" : \"test.matrices\",\n \"host\" : \"mongo.example.net:27017\",\n \"localTime\" : ISODate(\"2017-10-06T19:43:56.599Z\"),\n \"latencyStats\" :\n { \"reads\" :\n { \"histogram\" : [\n { \"micros\" : Long(16),\n \"count\" : Long(3) },\n { \"micros\" : Long(32),\n \"count\" : Long(1) },\n { \"micros\" : Long(128),\n \"count\" : Long(1) } ],\n \"latency\" : Long(264),\n \"ops\" : Long(5) },\n \"writes\" :\n { \"histogram\" : [\n { \"micros\" : Long(32),\n \"count\" : Long(1) },\n { \"micros\" : Long(64),\n \"count\" : Long(3) },\n { \"micros\" : Long(24576),\n \"count\" : Long(1) } ],\n \"latency\" : Long(27659),\n \"ops\" : Long(5) },\n \"commands\" :\n { \"histogram\" : [ \n {\n \"micros\" : Long(196608),\n \"count\" : Long(1)\n } \n ],\n \"latency\" : Long(0),\n \"ops\" : Long(0) },\n \"transactions\" : {\n \"histogram\" : [ ],\n \"latency\" : Long(0),\n \"ops\" : Long(0)\n }\n }\n}" + "sha256" : "0e9cd051cdf7bbbdc626097c4936ba79a446d2fc9c0aec0beca27b25429d7d4e", + "text" : "{ \"ns\" : \"test.matrices\",\n \"host\" : \"mongo.example.net:27017\",\n \"localTime\" : ISODate(\"2017-10-06T19:43:56.599Z\"),\n \"latencyStats\" :\n { \"reads\" :\n { \"histogram\" : [\n { \"micros\" : Long(16),\n \"count\" : Long(3) },\n { \"micros\" : Long(32),\n \"count\" : Long(1) },\n { \"micros\" : Long(128),\n \"count\" : Long(1) } ],\n \"latency\" : Long(264),\n \"ops\" : Long(5) },\n \"writes\" :\n { \"histogram\" : [\n { \"micros\" : Long(32),\n \"count\" : Long(1) },\n { \"micros\" : Long(64),\n \"count\" : Long(3) },\n { \"micros\" : Long(24576),\n \"count\" : Long(1) } ],\n \"latency\" : Long(27659),\n \"ops\" : Long(5) },\n \"commands\" :\n { \"histogram\" : [\n {\n \"micros\" : Long(196608),\n \"count\" : Long(1)\n }\n ],\n \"latency\" : Long(0),\n \"ops\" : Long(0) },\n \"transactions\" : {\n \"histogram\" : [ ],\n \"latency\" : Long(0),\n \"ops\" : Long(0)\n }\n }\n}" } ], "detail" : null, "owner" : null, @@ -7408,16 +6911,19 @@ "role" : "ACTION", "sha256" : "2b7999310b37793f942ab7e1870ed01a073f650ba3c2224f8069e9e891883a5b", "text" : "db.matrices.aggregate( [ { $collStats: { storageStats: { } } } ] )" - }, { - "role" : "EXPECTED", - "sha256" : "ca8448118ff149b96f126b7eecd9510f6ac5523eeb2072db2e1498d0a7b96ec8", - "text" : " {\n localTime : 2020-03-06T01:44:57.437Z,\n storageStats: {\n size: 608500363,\n count: 1104369,\n avgObjSize: 550,\n storageSize: 4096,\n freeStorageSize: 2490380,\n capped: false,\n wiredTiger : {\n ...\n },\n nindexes : 2,\n indexDetails : {\n ...\n },\n indexBuilds: [\n _id_1_abc_1\n ],\n totalIndexSize: 260337664,\n indexSizes: {\n _id_ : 9891840,\n _id_1_abc_1 : 250445824\n },\n totalSize: 613216256,\n scaleFactor : 1 \n },\n host : 'mongo.example.net:27017',\n ns : 'test.matrices'\n}" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", "stem" : "storageStats", "title" : "storageStats" + }, { + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "storageStatsOnTimeSeriesCollections", + "title" : "storageStats on Time Series Collections" }, { "blocks" : [ { "role" : "ACTION", @@ -7465,11 +6971,8 @@ "title" : "$collStats on Sharded Collections" } ], "includes" : [ { - "blob" : "a18bc0e88f2cab958244639a64288704527fc68a", - "path" : "content/manual/manual/source/includes/fact-unexpected-shutdown-accuracy.rst" - }, { - "blob" : "9aae3c85898a587479e06340cc9a49c3ab9c0fce", - "path" : "content/manual/manual/source/includes/fact-latencystats-reference.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "collStats", "pageBlob" : "2b27409b08781909e035e3223a40e27727e86829", @@ -7489,32 +6992,20 @@ "title" : "main" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "6d6379a5938ce8cc7449de802d9c81bf537c0790", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/count/perfect-score-output.sh" }, { "blob" : "3827cd58afe92f6be5cd405e84badc89113548c3", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/count/perfect-score.snippet.count-perfect-score.js" }, { - "blob" : "6d6379a5938ce8cc7449de802d9c81bf537c0790", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/count/perfect-score-output.sh" + "blob" : "2575c988e37f025f74e1dac195d37da31b9f3ddc", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Count.snippet.count.cs" + }, { + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "count", "pageBlob" : "515ac58f697f298020edb30001171857a809562d", @@ -7526,55 +7017,30 @@ }, { "context" : "aggregation/stages", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "030833abe66b5010e1ad768cb461b4434d7d3289c5a83e2ccd388a7ff74a2964", - "text" : "db.getSiblingDB(\"admin\").aggregate( [\n { $currentOp : { allUsers: true, idleSessions: true } },\n { $match : { active: false, transaction : { $exists: true } } }\n] )" - }, { - "role" : "EXPECTED", - "sha256" : "164c21f9b1260db9cc3639feb344e68f8248aa764dec196ddea7938d44fd93ec", - "text" : "{\n \"type\" : \"idleSession\",\n \"host\" : \"example.mongodb.com:27017\",\n \"desc\" : \"inactive transaction\",\n \"client\" : \"198.51.100.1:50428\",\n \"connectionId\" : Long(32),\n \"appName\" : \"\",\n \"clientMetadata\" : {\n \"driver\" : {\n \"name\" : \"PyMongo\",\n \"version\" : \"3.9.0\"\n },\n \"os\" : {\n \"type\" : \"Darwin\",\n \"name\" : \"Darwin\",\n \"architecture\" : \"x86_64\",\n \"version\" : \"10.14.5\"\n },\n \"platform\" : \"CPython 3.7.1.final.0\"\n },\n \"lsid\" : {\n \"id\" : UUID(\"ff21e1a9-a130-4fe0-942f-9e6b6c67ea3c\"),\n \"uid\" : BinData(0,\"3pxqkATNUYKV/soT7qqKE0zC0BFb0pBz1pk4xXcSHsI=\")\n },\n \"transaction\" : {\n \"parameters\" : {\n \"txnNumber\" : Long(4),\n \"autocommit\" : false,\n \"readConcern\" : {\n \"level\" : \"snapshot\",\n \"afterClusterTime\" : Timestamp(1563892246, 1)\n }\n },\n \"readTimestamp\" : Timestamp(0, 0),\n \"startWallClockTime\" : \"2019-07-23T10:30:49.461-04:00\",\n \"timeOpenMicros\" : Long(1913590),\n \"timeActiveMicros\" : Long(55),\n \"timeInactiveMicros\" : Long(1913535),\n \"expiryTime\" : \"2019-07-23T10:31:49.461-04:00\"\n },\n \"waitingForLock\" : false,\n \"active\" : false,\n \"locks\" : {\n \"ReplicationStateTransition\" : \"w\",\n \"Global\" : \"w\",\n \"Database\" : \"w\",\n \"Collection\" : \"w\"\n },\n \"lockStats\" : {\n \"ReplicationStateTransition\" : {\n \"acquireCount\" : {\n \"w\" : Long(5)\n }\n },\n \"Global\" : {\n \"acquireCount\" : {\n \"r\" : Long(3),\n \"w\" : Long(1)\n }\n },\n \"Database\" : {\n \"acquireCount\" : {\n \"r\" : Long(2),\n \"w\" : Long(1)\n }\n },\n \"Collection\" : {\n \"acquireCount\" : {\n \"w\" : Long(1)\n }\n },\n \"Mutex\" : {\n \"acquireCount\" : {\n \"r\" : Long(3)\n }\n },\n \"oplog\" : {\n \"acquireCount\" : {\n \"r\" : Long(2)\n }\n }\n },\n \"waitingForFlowControl\" : false,\n \"flowControlStats\" : {},\n}" - } ], - "detail" : null, - "name" : "Find Inactive Sessions with Open Transactions", + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", - "stem" : "findInactiveSessionsWithOpenTransactions", - "title" : "main" - } ], - "includes" : [ { - "blob" : "246f0b80b386254cb935b698d75ae629b962f54f", - "path" : "content/manual/manual/source/includes/fact-currentOp-aggregation-stage.rst" - }, { - "blob" : "f7a7454766d32ec28aa7e605432f71f57b2143f2", - "path" : "content/manual/manual/source/includes/currentOp-query-analyzer-output.rst" + "status" : "UNSUPPORTED", + "stem" : "inactiveSessions", + "title" : "Inactive Sessions" }, { - "blob" : "0aeda986f81e2ce09c85d9d6a5c0b39175e74a31", - "path" : "content/manual/manual/source/includes/fact-client-appname.rst" - }, { - "blob" : "30f7d119345cc9ef9224620a51126d398523886f", - "path" : "content/manual/manual/source/includes/extracts-warning-terminating-operations.yaml" - }, { - "blob" : "975011a6f062cd29759cff92640c93af60bb5780", - "path" : "content/manual/manual/source/includes/extracts-command-field.yaml" - }, { - "blob" : "7df003498ec1dea4b22d8eb093b129ed18a285ad", - "path" : "content/manual/manual/source/includes/currentop-changestreams-optime.rst" - }, { - "blob" : "8f1399b8273cde06faf982d841008117d19a1d01", - "path" : "content/manual/manual/source/includes/in-use-memory.rst" - }, { - "blob" : "942810f870916c20ac5313674104084d73e9fc14", - "path" : "content/manual/manual/source/includes/peak-memory.rst" - }, { - "blob" : "cffa9626635753892c0d4930afbd2146fc984a18", - "path" : "content/manual/manual/source/includes/query-shape-hash-field.rst" - }, { - "blob" : "bd5b26886ba9b55b1b3810b9ac473a5d00e097c1", - "path" : "content/manual/manual/source/includes/fact-lock-types.rst" + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "sampledQueries", + "title" : "Sampled Queries" }, { - "blob" : "cf893a81cad8460c4cdda0ef017811d01b683e05", - "path" : "content/manual/manual/source/includes/fact-lock-modes.rst" + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "countCollectionConnections", + "title" : "Count Collection Connections" + } ], + "includes" : [ { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "currentOp", "pageBlob" : "97d72474ff98a27451ac32bc5729ca8b0f8f583b", @@ -7587,61 +7053,80 @@ "context" : "aggregation/stages", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "f04db7a01a8e97bf6b450b0c3940bdcbcb7d7c31f839149369613c311b3fa6f6", - "text" : "db.weather.aggregate( [\n {\n $densify: {\n field: \"timestamp\",\n range: {\n step: 1,\n unit: \"hour\",\n bounds:[ ISODate(\"2021-05-18T00:00:00.000Z\"), ISODate(\"2021-05-18T08:00:00.000Z\") ]\n }\n }\n }\n] )" - }, { "role" : "DATA", "sha256" : "b3415be8c72026acf1cf50ca163d7f39ee479da9656ea12e68de9d9c9953d1a9", "text" : "db.weather.insertMany( [\n {\n \"metadata\": { \"sensorId\": 5578, \"type\": \"temperature\" },\n \"timestamp\": ISODate(\"2021-05-18T00:00:00.000Z\"),\n \"temp\": 12\n },\n {\n \"metadata\": { \"sensorId\": 5578, \"type\": \"temperature\" },\n \"timestamp\": ISODate(\"2021-05-18T04:00:00.000Z\"),\n \"temp\": 11\n },\n {\n \"metadata\": { \"sensorId\": 5578, \"type\": \"temperature\" },\n \"timestamp\": ISODate(\"2021-05-18T08:00:00.000Z\"),\n \"temp\": 11\n },\n {\n \"metadata\": { \"sensorId\": 5578, \"type\": \"temperature\" },\n \"timestamp\": ISODate(\"2021-05-18T12:00:00.000Z\"),\n \"temp\": 12\n }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "876e2bcb09f785c573f004c5f99ca084eb86c69b594b1a492d3feff8986b2a9a", - "text" : "[\n {\n _id: ObjectId(\"618c207c63056cfad0ca4309\"),\n metadata: { sensorId: 5578, type: 'temperature' },\n timestamp: ISODate(\"2021-05-18T00:00:00.000Z\"),\n temp: 12\n },\n { timestamp: ISODate(\"2021-05-18T01:00:00.000Z\") },\n { timestamp: ISODate(\"2021-05-18T02:00:00.000Z\") },\n { timestamp: ISODate(\"2021-05-18T03:00:00.000Z\") },\n {\n _id: ObjectId(\"618c207c63056cfad0ca430a\"),\n metadata: { sensorId: 5578, type: 'temperature' },\n timestamp: ISODate(\"2021-05-18T04:00:00.000Z\"),\n temp: 11\n },\n { timestamp: ISODate(\"2021-05-18T05:00:00.000Z\") },\n { timestamp: ISODate(\"2021-05-18T06:00:00.000Z\") },\n { timestamp: ISODate(\"2021-05-18T07:00:00.000Z\") },\n {\n _id: ObjectId(\"618c207c63056cfad0ca430b\"),\n metadata: { sensorId: 5578, type: 'temperature' },\n timestamp: ISODate(\"2021-05-18T08:00:00.000Z\"),\n temp: 11\n }\n {\n _id: ObjectId(\"618c207c63056cfad0ca430c\"),\n metadata: { sensorId: 5578, type: 'temperature' },\n timestamp: ISODate(\"2021-05-18T12:00:00.000Z\"),\n temp: 12\n }\n]" + "role" : "ACTION", + "sha256" : "f04db7a01a8e97bf6b450b0c3940bdcbcb7d7c31f839149369613c311b3fa6f6", + "text" : "db.weather.aggregate( [\n {\n $densify: {\n field: \"timestamp\",\n range: {\n step: 1,\n unit: \"hour\",\n bounds:[ ISODate(\"2021-05-18T00:00:00.000Z\"), ISODate(\"2021-05-18T08:00:00.000Z\") ]\n }\n }\n }\n] )" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", "stem" : "densifyTimeSeriesData", "title" : "Densify Time Series Data" + }, { + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "densificationWithPartitions", + "title" : "Densification with Partitions" }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "a0c2c64d565a2e3952a9a7a4402292d541abd4a84831a8e4e524dcf3936f78ef", + "text" : "db.coffee.insertMany( [\n {\n \"altitude\": 600,\n \"variety\": \"Arabica Typica\",\n \"score\": 68.3\n },\n {\n \"altitude\": 750,\n \"variety\": \"Arabica Typica\",\n \"score\": 69.5\n },\n {\n \"altitude\": 950,\n \"variety\": \"Arabica Typica\",\n \"score\": 70.5\n },\n {\n \"altitude\": 1250,\n \"variety\": \"Gesha\",\n \"score\": 88.15\n },\n {\n \"altitude\": 1700,\n \"variety\": \"Gesha\",\n \"score\": 95.5,\n \"price\": 1029\n }\n ] )" + }, { "role" : "ACTION", "sha256" : "e6a91e5207fe7e79d4db6c6b799bce75a53f58010ec044e494e7689f4af84371", "text" : "db.coffee.aggregate( [\n {\n $densify: {\n field: \"altitude\",\n partitionByFields: [ \"variety\" ],\n range: {\n bounds: \"full\",\n step: 200\n }\n }\n }\n] )" }, { + "role" : "EXPECTED", + "sha256" : "6312840d4c537d0974a34688e391435e51c652655db2c4aea5af8d26132b2a6c", + "text" : "[\n {\n _id: ObjectId(\"618c031814fbe03334480475\"),\n altitude: 600,\n variety: 'Arabica Typica',\n score: 68.3\n },\n {\n _id: ObjectId(\"618c031814fbe03334480476\"),\n altitude: 750,\n variety: 'Arabica Typica',\n score: 69.5\n },\n { variety: 'Arabica Typica', altitude: 800 },\n {\n _id: ObjectId(\"618c031814fbe03334480477\"),\n altitude: 950,\n variety: 'Arabica Typica',\n score: 70.5\n },\n { variety: 'Gesha', altitude: 600 },\n { variety: 'Gesha', altitude: 800 },\n { variety: 'Gesha', altitude: 1000 },\n { variety: 'Gesha', altitude: 1200 },\n {\n _id: ObjectId(\"618c031814fbe03334480478\"),\n altitude: 1250,\n variety: 'Gesha',\n score: 88.15\n },\n { variety: 'Gesha', altitude: 1400 },\n { variety: 'Gesha', altitude: 1600 },\n {\n _id: ObjectId(\"618c031814fbe03334480479\"),\n altitude: 1700,\n variety: 'Gesha',\n score: 95.5,\n price: 1029\n },\n { variety: 'Arabica Typica', altitude: 1000 },\n { variety: 'Arabica Typica', altitude: 1200 },\n { variety: 'Arabica Typica', altitude: 1400 },\n { variety: 'Arabica Typica', altitude: 1600 }\n]" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "densifyTheFullRangeOfValues", + "title" : "Densify the Full Range of Values" + }, { + "blocks" : [ { "role" : "DATA", "sha256" : "a0c2c64d565a2e3952a9a7a4402292d541abd4a84831a8e4e524dcf3936f78ef", "text" : "db.coffee.insertMany( [\n {\n \"altitude\": 600,\n \"variety\": \"Arabica Typica\",\n \"score\": 68.3\n },\n {\n \"altitude\": 750,\n \"variety\": \"Arabica Typica\",\n \"score\": 69.5\n },\n {\n \"altitude\": 950,\n \"variety\": \"Arabica Typica\",\n \"score\": 70.5\n },\n {\n \"altitude\": 1250,\n \"variety\": \"Gesha\",\n \"score\": 88.15\n },\n {\n \"altitude\": 1700,\n \"variety\": \"Gesha\",\n \"score\": 95.5,\n \"price\": 1029\n }\n ] )" + }, { + "role" : "ACTION", + "sha256" : "128ca002ff6b091c907e01818180a3d0ae3ab62e6a61d5f3c633a038f3e37bb4", + "text" : "db.coffee.aggregate( [\n {\n $densify: {\n field: \"altitude\",\n partitionByFields: [ \"variety\" ],\n range: {\n bounds: \"partition\",\n step: 200\n }\n }\n }\n] )" }, { "role" : "EXPECTED", - "sha256" : "6312840d4c537d0974a34688e391435e51c652655db2c4aea5af8d26132b2a6c", - "text" : "[\n {\n _id: ObjectId(\"618c031814fbe03334480475\"),\n altitude: 600,\n variety: 'Arabica Typica',\n score: 68.3\n },\n {\n _id: ObjectId(\"618c031814fbe03334480476\"),\n altitude: 750,\n variety: 'Arabica Typica',\n score: 69.5\n },\n { variety: 'Arabica Typica', altitude: 800 },\n {\n _id: ObjectId(\"618c031814fbe03334480477\"),\n altitude: 950,\n variety: 'Arabica Typica',\n score: 70.5\n },\n { variety: 'Gesha', altitude: 600 },\n { variety: 'Gesha', altitude: 800 },\n { variety: 'Gesha', altitude: 1000 },\n { variety: 'Gesha', altitude: 1200 },\n {\n _id: ObjectId(\"618c031814fbe03334480478\"),\n altitude: 1250,\n variety: 'Gesha',\n score: 88.15\n },\n { variety: 'Gesha', altitude: 1400 },\n { variety: 'Gesha', altitude: 1600 },\n {\n _id: ObjectId(\"618c031814fbe03334480479\"),\n altitude: 1700,\n variety: 'Gesha',\n score: 95.5,\n price: 1029\n },\n { variety: 'Arabica Typica', altitude: 1000 },\n { variety: 'Arabica Typica', altitude: 1200 },\n { variety: 'Arabica Typica', altitude: 1400 },\n { variety: 'Arabica Typica', altitude: 1600 }\n]" + "sha256" : "2436b1a10c2f1aff684d86d45fa7ec44cce5490a3a2a76754d61f1ae4d51d759", + "text" : "[\n {\n _id: ObjectId(\"618c031814fbe03334480475\"),\n altitude: 600,\n variety: 'Arabica Typica',\n score: 68.3\n },\n {\n _id: ObjectId(\"618c031814fbe03334480476\"),\n altitude: 750,\n variety: 'Arabica Typica',\n score: 69.5\n },\n { variety: 'Arabica Typica', altitude: 800 },\n {\n _id: ObjectId(\"618c031814fbe03334480477\"),\n altitude: 950,\n variety: 'Arabica Typica',\n score: 70.5\n },\n {\n _id: ObjectId(\"618c031814fbe03334480478\"),\n altitude: 1250,\n variety: 'Gesha',\n score: 88.15\n },\n { variety: 'Gesha', altitude: 1450 },\n { variety: 'Gesha', altitude: 1650 },\n {\n _id: ObjectId(\"618c031814fbe03334480479\"),\n altitude: 1700,\n variety: 'Gesha',\n score: 95.5,\n price: 1029\n }\n]" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", - "stem" : "densificationWithPartitions", - "title" : "Densification with Partitions" + "stem" : "densifyValuesWithinEachPartition", + "title" : "Densify Values within Each Partition" } ], "includes" : [ { - "blob" : "324ff3f0609ab2cf2413bbb59ea90d6a5299bdae", - "path" : "content/manual/manual/source/includes/fact-densify-description.rst" - }, { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" + "blob" : "a7156b327acca642cc465f177407dd614911123d", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Densify.snippet.densify.cs" }, { - "blob" : "b075b4d66b79c5d4616edae041f9cf8baad51d80", - "path" : "content/manual/manual/source/includes/densify-validation-examples.rst" + "blob" : "53113105e3412617e6fb413e6e4e018359c53b66", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Densify.snippet.weather-class.cs" }, { - "blob" : "a5cfb5928c49a16fe608858a55943bd0a9495e67", - "path" : "content/manual/manual/source/includes/fact-densify-image-explanation.rst" + "blob" : "66c8819ab370a8cc14f43a7021d053921b485c1a", + "path" : "content/manual/manual/source/images/densification-by-partition.png" }, { - "blob" : "59db17f5133f42dc4783992cc265fd567cdcdc5e", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-weather.rst" + "blob" : "475c329fa781cc7e688b2293b7b0ad59604df710", + "path" : "content/manual/manual/source/images/densification-full-range.png" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "densify", "pageBlob" : "288e50c2279fbe39dc3a750985b9f5708e82e8c3", @@ -7653,31 +7138,29 @@ }, { "context" : "aggregation/stages", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "2f58340d4ad8166f09bc794e8640c3fa27a0e34458c6dabed2b31c74d81d12ed", - "text" : "db.aggregate(\n [\n { $documents: [ { x: 10 }, { x: 2 }, { x: 5 } ] },\n { $bucketAuto: { groupBy: \"$x\", buckets: 4 } }\n ]\n)" - }, { - "role" : "EXPECTED", - "sha256" : "ed6fa4efe4bfd870effd00613cad97e9b3249694ac599154284344ed445ad4c9", - "text" : "[\n { _id: { min: 2, max: 5 }, count: 1 },\n { _id: { min: 5, max: 10 }, count: 1 },\n { _id: { min: 10, max: 10 }, count: 1 }\n]" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "testAPipelineStage", "title" : "Test a Pipeline Stage" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/stages/documents/useADocumentsStageInALookupStage", "status" : "OWNED", "stem" : null, - "title" : "Use a ``$documents`` Stage in a ``$lookup`` Stage" + "title" : "Use a $documents Stage in a $lookup Stage" } ], "includes" : [ { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "74837c7748ee0786dee514e384b97ee24d5a6f1e", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Documents.snippet.documents.cs" + }, { + "blob" : "fb4e922b1d93c64716956f47bfe7de1bbeab982c", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/DocumentsOutput.txt" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "documents", "pageBlob" : "150928a94b030c53705f155b591317937040cfc5", @@ -7691,12 +7174,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "fcee9241e8de20239e50ec66b3b6e6f3750ded612a7b056d338cc482eafd3c28", - "text" : "db.movies.aggregate( [\n { $match: { runtime: { $gt: 1000 } } },\n {\n $facet: {\n \"categorizedByGenres\": [\n { $unwind: \"$genres\" },\n { $sortByCount: \"$genres\" }\n ],\n \"categorizedByRuntime\": [\n {\n $bucket: {\n groupBy: \"$runtime\",\n boundaries: [ 1000, 1200, 1400 ],\n default: \"Other\",\n output: {\n \"count\": { $sum: 1 },\n \"titles\": { $push: \"$title\" }\n }\n }\n }\n ],\n \"categorizedByYear(Auto)\": [\n {\n $bucketAuto: {\n groupBy: \"$year\",\n buckets: 4\n }\n }\n ]\n }\n }\n] )" + "sha256" : "acad323ef8f2bdea722a8a0908b578b88e6f87364f865e6276d188cd56b7ee51", + "text" : "db.movies.aggregate( [\n { $match: { runtime: { $gt: 1000 } } },\n {\n $facet: {\n \"categorizedByGenres\": [\n { $unwind: \"$genres\" },\n { $sortByCount: \"$genres\" }\n ],\n \"categorizedByRuntime\": [\n {\n $bucket: {\n groupBy: \"$runtime\",\n boundaries: [ 1000, 1200, 1400 ],\n default: \"Other\",\n output: {\n \"count\": { $sum: 1 },\n \"titles\": { $push: \"$title\" }\n }\n }\n }\n ],\n \"categorizedByYear(Auto)\": [\n {\n $bucketAuto: {\n groupBy: \"$year\",\n buckets: 4\n }\n }\n ]\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "fe85383ddfa36d8e503e4d65aed51de9be09e83f6bb3f1d456cf08ca686cc63f", - "text" : "[\n {\n categorizedByGenres: [\n { _id: 'Sport', count: 1 },\n { _id: 'Documentary', count: 1 },\n { _id: 'Action', count: 1 },\n { _id: 'Drama', count: 1 },\n { _id: 'Adventure', count: 1 },\n { _id: 'History', count: 1 }\n ],\n categorizedByRuntime: [\n { _id: 1000, count: 1, titles: [ 'Baseball' ] },\n { _id: 1200, count: 1, titles: [ 'Centennial' ] }\n ],\n 'categorizedByYear(Auto)': [\n { _id: { min: 1978, max: 1994 }, count: 1 },\n { _id: { min: 1994, max: 1994 }, count: 1 }\n ]\n }\n]" + "sha256" : "1ecd970b1443c04a9a6338aeca1de1599b4eab8e04816b172e2fc7eb2baf6c27", + "text" : "[\n {\n categorizedByGenres: [\n { _id: 'Sport', count: 1 },\n { _id: 'Documentary', count: 1 },\n { _id: 'Action', count: 1 },\n { _id: 'Drama', count: 1 },\n { _id: 'Adventure', count: 1 },\n { _id: 'History', count: 1 }\n ],\n categorizedByRuntime: [\n { _id: 1000, count: 1, titles: [ 'Baseball' ] },\n { _id: 1200, count: 1, titles: [ 'Centennial' ] }\n ],\n 'categorizedByYear(Auto)': [\n { _id: { min: 1978, max: 1994 }, count: 1 },\n { _id: { min: 1994, max: 1994 }, count: 1 }\n ]\n }\n]\n" } ], "detail" : null, "name" : "Categorize Movies Several Ways", @@ -7706,32 +7189,23 @@ "title" : "main" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" + "blob" : "33acc41a7cbe0bba33afeb46306b3e6d034d19ee", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/facet/facet-output.sh" }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "67c0e55b996b7dd6491bae639114949c1b5eb0b1", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/facet/facet.snippet.facet.js" }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blob" : "dbaa987b2280b6c6eb39c82059aae5a8b66c0abf", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Facet.snippet.facet.cs" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" }, { - "blob" : "67c0e55b996b7dd6491bae639114949c1b5eb0b1", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/facet/facet.snippet.facet.js" + "blob" : "4259fb20fc95fd59187c094ad4534f26bc5976c7", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/FacetOutput.txt" }, { - "blob" : "33acc41a7cbe0bba33afeb46306b3e6d034d19ee", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/facet/facet-output.sh" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "facet", "pageBlob" : "ec7879b3546b5db03b444f8de4fac4916e231023", @@ -7772,20 +7246,20 @@ "title" : "Fill Data for Distinct Partitions" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/stages/fill/indicateIfAFieldWasPopulatedUsingFill", "status" : "OWNED", "stem" : null, - "title" : "Indicate if a Field was Populated Using ``$fill``" + "title" : "Indicate if a Field was Populated Using $fill" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "893876e5606ba8b9af0b1d5382880748638900c8fc42557b06fd09af6ae62a32", - "text" : "db.restaurantReviewsMultiple.aggregate( [\n {\n $fill: {\n sortBy: { date: 1 },\n partitionBy: { \"restaurant\": \"$restaurant\" },\n output: { \"score\": { method: \"linear\" } }\n }\n }\n] )" - }, { "role" : "DATA", "sha256" : "8170b39c762ff3e3ce33f1efe383376793ec63498ed5ea368c80045ae5dd98b4", "text" : "db.restaurantReviewsMultiple.insertMany( [\n {\n date: ISODate(\"2021-03-08\"),\n restaurant: \"Steve's Pizza\",\n score: 90\n },\n {\n date: ISODate(\"2021-03-08\"),\n restaurant: \"Sally's Deli\",\n score: 75\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "893876e5606ba8b9af0b1d5382880748638900c8fc42557b06fd09af6ae62a32", + "text" : "db.restaurantReviewsMultiple.aggregate( [\n {\n $fill: {\n sortBy: { date: 1 },\n partitionBy: { \"restaurant\": \"$restaurant\" },\n output: { \"score\": { method: \"linear\" } }\n }\n }\n] )" }, { "role" : "EXPECTED", "sha256" : "b210f9c7d9bd089096c9b945699bba5fef9869186116ffd8247978c50af6be88", @@ -7798,14 +7272,8 @@ "title" : "Interpolate Identical Values in Different Partitions" } ], "includes" : [ { - "blob" : "0173af6ff3a72a2ee52cbb8862869f66cb4056ed", - "path" : "content/manual/manual/source/includes/fact-fill-description.rst" - }, { - "blob" : "10e5048dc5506af8133ec7b3ac7bd9ca97dc2771", - "path" : "content/manual/manual/source/includes/fill-linear-method.rst" - }, { - "blob" : "59db17f5133f42dc4783992cc265fd567cdcdc5e", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-weather.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "fill", "pageBlob" : "028133c06f1416b89625d18cf6b613bb132d65a9", @@ -7818,13 +7286,13 @@ "context" : "aggregation/stages", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "4c85ab5707f61cdd61942fa2c1339029f4aca29113d77ce203c4e12eb9f728fd", - "text" : "db.places.aggregate([\n {\n $geoNear: {\n near: { type: \"Point\", coordinates: [ -73.99279 , 40.719296 ] },\n distanceField: \"dist.calculated\",\n maxDistance: 2,\n query: { category: \"Parks\" },\n includeLocs: \"dist.location\",\n spherical: true\n }\n }\n])" - }, { "role" : "DATA", "sha256" : "05f86d9c17a5cf8dbbc457582d46789ac7289d982df96a8bc014593ac1d27209", "text" : "db.places.insertMany( [\n {\n name: \"Central Park\",\n location: { type: \"Point\", coordinates: [ -73.97, 40.77 ] },\n category: \"Parks\"\n },\n {\n name: \"Sara D. Roosevelt Park\",\n location: { type: \"Point\", coordinates: [ -73.9928, 40.7193 ] },\n category: \"Parks\"\n },\n {\n name: \"Polo Grounds\",\n location: { type: \"Point\", coordinates: [ -73.9375, 40.8303 ] },\n category: \"Stadiums\"\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "4c85ab5707f61cdd61942fa2c1339029f4aca29113d77ce203c4e12eb9f728fd", + "text" : "db.places.aggregate([\n {\n $geoNear: {\n near: { type: \"Point\", coordinates: [ -73.99279 , 40.719296 ] },\n distanceField: \"dist.calculated\",\n maxDistance: 2,\n query: { category: \"Parks\" },\n includeLocs: \"dist.location\",\n spherical: true\n }\n }\n])" }, { "role" : "EXPECTED", "sha256" : "514c4ec82962b3469166ee66228aa84b93491640625436304572706f1fd64169", @@ -7837,13 +7305,13 @@ "title" : "Maximum Distance" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "e8ae3cef34d7c72772bd34b0ee9b83b849d8363f4de4da7c6edb043cd47d7d1c", - "text" : "db.places.aggregate([ \n {\n $geoNear: {\n near: { type: \"Point\", coordinates: [ -73.99279 , 40.719296 ] },\n distanceField: \"dist.calculated\",\n minDistance: 2,\n query: { category: \"Parks\" },\n includeLocs: \"dist.location\",\n spherical: true\n }\n }\n])" - }, { "role" : "DATA", "sha256" : "05f86d9c17a5cf8dbbc457582d46789ac7289d982df96a8bc014593ac1d27209", "text" : "db.places.insertMany( [\n {\n name: \"Central Park\",\n location: { type: \"Point\", coordinates: [ -73.97, 40.77 ] },\n category: \"Parks\"\n },\n {\n name: \"Sara D. Roosevelt Park\",\n location: { type: \"Point\", coordinates: [ -73.9928, 40.7193 ] },\n category: \"Parks\"\n },\n {\n name: \"Polo Grounds\",\n location: { type: \"Point\", coordinates: [ -73.9375, 40.8303 ] },\n category: \"Stadiums\"\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "9a8ded2668091a9d92a2da1d54d1761b1e1ec56155d32f5366534887035a3622", + "text" : "db.places.aggregate([\n {\n $geoNear: {\n near: { type: \"Point\", coordinates: [ -73.99279 , 40.719296 ] },\n distanceField: \"dist.calculated\",\n minDistance: 2,\n query: { category: \"Parks\" },\n includeLocs: \"dist.location\",\n spherical: true\n }\n }\n])" } ], "detail" : null, "owner" : null, @@ -7852,13 +7320,13 @@ "title" : "Minimum Distance" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "195b8e8fc266cc26c059e7753707766c0d497bea8ea0adf648ca910d84832406", - "text" : "db.places.aggregate(\n[\n {\n \"$geoNear\":\n {\n \"near\":\"$$pt\",\n \"distanceField\":\"distance\",\n \"maxDistance\":2,\n \"query\":{\"category\":\"Parks\"},\n \"includeLocs\":\"dist.location\",\n \"spherical\":true\n }\n }\n],\n{\n \"let\":{ \"pt\": [ -73.99279, 40.719296 ] }\n}\n)" - }, { "role" : "DATA", "sha256" : "05f86d9c17a5cf8dbbc457582d46789ac7289d982df96a8bc014593ac1d27209", "text" : "db.places.insertMany( [\n {\n name: \"Central Park\",\n location: { type: \"Point\", coordinates: [ -73.97, 40.77 ] },\n category: \"Parks\"\n },\n {\n name: \"Sara D. Roosevelt Park\",\n location: { type: \"Point\", coordinates: [ -73.9928, 40.7193 ] },\n category: \"Parks\"\n },\n {\n name: \"Polo Grounds\",\n location: { type: \"Point\", coordinates: [ -73.9375, 40.8303 ] },\n category: \"Stadiums\"\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "195b8e8fc266cc26c059e7753707766c0d497bea8ea0adf648ca910d84832406", + "text" : "db.places.aggregate(\n[\n {\n \"$geoNear\":\n {\n \"near\":\"$$pt\",\n \"distanceField\":\"distance\",\n \"maxDistance\":2,\n \"query\":{\"category\":\"Parks\"},\n \"includeLocs\":\"dist.location\",\n \"spherical\":true\n }\n }\n],\n{\n \"let\":{ \"pt\": [ -73.99279, 40.719296 ] }\n}\n)" }, { "role" : "EXPECTED", "sha256" : "df92d1d0243956809b8ec81ceed12489dcf95e48482695d94da91ba596f3897d", @@ -7868,16 +7336,16 @@ "owner" : null, "status" : "UNOWNED", "stem" : "geoNearWithTheLetOption", - "title" : "$geoNear with the ``let`` option" + "title" : "$geoNear with the let option" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "4eecb60906ebfa40ce53d74983267c81f899997334f948055c12a8956527a588", - "text" : "db.places.aggregate( [\n {\n $lookup: {\n from: \"places\",\n let: { pt: \"$location\" },\n pipeline: [\n {\n $geoNear: {\n near: \"$$pt\",\n distanceField: \"distance\"\n }\n }\n ],\n as: \"joinedField\"\n }\n },\n { \n $match: { name: \"Sara D. Roosevelt Park\" }\n }\n] );" - }, { "role" : "DATA", "sha256" : "05f86d9c17a5cf8dbbc457582d46789ac7289d982df96a8bc014593ac1d27209", "text" : "db.places.insertMany( [\n {\n name: \"Central Park\",\n location: { type: \"Point\", coordinates: [ -73.97, 40.77 ] },\n category: \"Parks\"\n },\n {\n name: \"Sara D. Roosevelt Park\",\n location: { type: \"Point\", coordinates: [ -73.9928, 40.7193 ] },\n category: \"Parks\"\n },\n {\n name: \"Polo Grounds\",\n location: { type: \"Point\", coordinates: [ -73.9375, 40.8303 ] },\n category: \"Stadiums\"\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "8090d7edf4dbaa95960872e0322b0e05cea3a29736d79cc4cc546fbef05e80cd", + "text" : "db.places.aggregate( [\n {\n $lookup: {\n from: \"places\",\n let: { pt: \"$location\" },\n pipeline: [\n {\n $geoNear: {\n near: \"$$pt\",\n distanceField: \"distance\"\n }\n }\n ],\n as: \"joinedField\"\n }\n },\n {\n $match: { name: \"Sara D. Roosevelt Park\" }\n }\n] );" }, { "role" : "EXPECTED", "sha256" : "0abfdd40fc00847e3eb33e447f88bfa361b4515e1959b29480ec1d4b87f1a909", @@ -7887,16 +7355,16 @@ "owner" : null, "status" : "UNOWNED", "stem" : "geoNearWithBoundLetOption", - "title" : "$geoNear with Bound ``let`` Option" + "title" : "$geoNear with Bound let Option" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "b572c9258c7ea2f9fba93f55511a4d6fc282e40b8b1e8e478bc9c750aac03061", - "text" : "db.places.aggregate([\n {\n $geoNear: {\n near: { type: \"Point\", coordinates: [ -73.98142 , 40.71782 ] },\n key: \"location\",\n distanceField: \"dist.calculated\",\n query: { \"category\": \"Parks\" }\n }\n },\n { $limit: 5 }\n])" - }, { "role" : "DATA", "sha256" : "15dacf069b1e2066393f0f3d2d1584451c89ca00a20d595fa13c4f0ab14d84a6", "text" : "{\n \"_id\" : 3,\n \"name\" : \"Polo Grounds\",\n \"location\": {\n \"type\" : \"Point\",\n \"coordinates\" : [ -73.9375, 40.8303 ]\n },\n \"legacy\" : [ -73.9375, 40.8303 ],\n \"category\" : \"Stadiums\"\n}" + }, { + "role" : "ACTION", + "sha256" : "b572c9258c7ea2f9fba93f55511a4d6fc282e40b8b1e8e478bc9c750aac03061", + "text" : "db.places.aggregate([\n {\n $geoNear: {\n near: { type: \"Point\", coordinates: [ -73.98142 , 40.71782 ] },\n key: \"location\",\n distanceField: \"dist.calculated\",\n query: { \"category\": \"Parks\" }\n }\n },\n { $limit: 5 }\n])" }, { "role" : "EXPECTED", "sha256" : "1d3fe0239116305a809c586f2d675b60232f03b941117cadc77209d58be28b72", @@ -7909,23 +7377,23 @@ "title" : "Specify Which Geospatial Index to Use" } ], "includes" : [ { - "blob" : "1949f5ebae3e704930886d6424fc280627a1fecb", - "path" : "content/manual/manual/source/includes/fact-geoNear-timeseries-key-required.rst" + "blob" : "708e165e062a376326ab88447d448086f18fed0a", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/GeoNear.snippet.geo-near-min.cs" }, { - "blob" : "e62d83a442681b7e89358273ecbe4df32921dc8e", - "path" : "content/manual/manual/source/includes/fact-geoNear-restrict-near-in-query.rst" + "blob" : "74235fc7ca38afce584efcc13284c5cb5f1b5e88", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/GeoNear.snippet.geo-near.cs" }, { - "blob" : "43d1ef5dc676a62c9723280dd655d526af622108", - "path" : "content/manual/manual/source/includes/fact-geoNear-timeseries-query-restriction.rst" + "blob" : "a83b662ff2bafad70f9cec1de816f32e34338d3c", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/GeoNear.snippet.theater-class.cs" }, { - "blob" : "90833abc7fb5679a24bbd4b0ccbb196bcacb115a", - "path" : "content/manual/manual/source/includes/geospatial-places-data-setup.rst" + "blob" : "dc1fc156763bf6bd4ccbe061c5adb83871754906", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/GeoNearMinOutput.txt" }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blob" : "28a0a812ee12b9e2caad09b1f374c5b97e9f19fd", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/GeoNearOutput.txt" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "geoNear", "pageBlob" : "e4d89f1859b69d8537bba15c21665374d67dd83d", @@ -7945,21 +7413,21 @@ "title" : "Within a Single Collection" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "2307d7043a9abff0bcb4efcb4efe26c89801cbfab9d54f1d483d0fe04ad826cc", - "text" : "db.travelers.aggregate( [\n {\n $graphLookup: {\n from: \"airports\",\n startWith: \"$nearestAirport\",\n connectFromField: \"connects\",\n connectToField: \"airport\",\n maxDepth: 2,\n depthField: \"numConnections\",\n as: \"destinations\"\n }\n }\n] )" - }, { "role" : "DATA", - "sha256" : "515ac57d4c6bc472d31aca191bdefc9796ec1db572bcd3eb90213e63ba3682f3", - "text" : "db.airports.insertMany( [\n { _id: 0, airport: \"JFK\", connects: [ \"BOS\", \"ORD\" ] },\n { _id: 1, airport: \"BOS\", connects: [ \"JFK\", \"PWM\" ] },\n { _id: 2, airport: \"ORD\", connects: [ \"JFK\" ] },\n { _id: 3, airport: \"PWM\", connects: [ \"BOS\", \"LHR\" ] },\n { _id: 4, airport: \"LHR\", connects: [ \"PWM\" ] }\n] )" + "sha256" : "a1568ccc95ddcfc9b0440c19425741b6c6a2f9917d433f4ad47ef86a85979e06", + "text" : "db.airports.insertMany( [\n { _id: 0, airport: \"JFK\", connects: [ \"BOS\", \"ORD\" ] },\n { _id: 1, airport: \"BOS\", connects: [ \"JFK\", \"PWM\" ] },\n { _id: 2, airport: \"ORD\", connects: [ \"JFK\" ] },\n { _id: 3, airport: \"PWM\", connects: [ \"BOS\", \"LHR\" ] },\n { _id: 4, airport: \"LHR\", connects: [ \"PWM\" ] }\n] )\n" }, { "role" : "DATA", - "sha256" : "315799a351d0730be7d528103983e43515d196c72d7538eb718c52b568870af4", - "text" : "db.travelers.insertMany( [\n { _id: 1, name: \"Dev\", nearestAirport: \"JFK\" },\n { _id: 2, name: \"Eliot\", nearestAirport: \"JFK\" },\n { _id: 3, name: \"Jeff\", nearestAirport: \"BOS\" }\n] )" + "sha256" : "a80c27d4140d76a7bcec4ddf1b941a44fa0170f0483bb8b82bb24e050a8eecec", + "text" : "db.travelers.insertMany( [\n { _id: 1, name: \"Dev\", nearestAirport: \"JFK\" },\n { _id: 2, name: \"Eliot\", nearestAirport: \"JFK\" },\n { _id: 3, name: \"Jeff\", nearestAirport: \"BOS\" }\n] )\n" + }, { + "role" : "ACTION", + "sha256" : "21dd2cce6f386412edf3166f7e5fe272691c49843319c550c549eda6fb894618", + "text" : "db.travelers.aggregate( [\n {\n $graphLookup: {\n from: \"airports\",\n startWith: \"$nearestAirport\",\n connectFromField: \"connects\",\n connectToField: \"airport\",\n maxDepth: 2,\n depthField: \"numConnections\",\n as: \"destinations\"\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "bba1f4e6a15396c2fabc96ecbf4159bba529360957a0513d002e4dd62750cac7", - "text" : "[\n {\n _id: 1,\n name: 'Dev',\n nearestAirport: 'JFK',\n destinations: [\n {\n _id: 0,\n airport: 'JFK',\n connects: [ 'BOS', 'ORD' ],\n numConnections: Long('0')\n },\n {\n _id: 1,\n airport: 'BOS',\n connects: [ 'JFK', 'PWM' ],\n numConnections: Long('1')\n },\n {\n _id: 3,\n airport: 'PWM',\n connects: [ 'BOS', 'LHR' ],\n numConnections: Long('2')\n },\n {\n _id: 2,\n airport: 'ORD',\n connects: [ 'JFK' ],\n numConnections: Long('1')\n }\n ]\n },\n {\n _id: 2,\n name: 'Eliot',\n nearestAirport: 'JFK',\n destinations: [\n {\n _id: 0,\n airport: 'JFK',\n connects: [ 'BOS', 'ORD' ],\n numConnections: Long('0')\n },\n {\n _id: 1,\n airport: 'BOS',\n connects: [ 'JFK', 'PWM' ],\n numConnections: Long('1')\n },\n {\n _id: 3,\n airport: 'PWM',\n connects: [ 'BOS', 'LHR' ],\n numConnections: Long('2')\n },\n {\n _id: 2,\n airport: 'ORD',\n connects: [ 'JFK' ],\n numConnections: Long('1')\n }\n ]\n },\n {\n _id: 3,\n name: 'Jeff',\n nearestAirport: 'BOS',\n destinations: [\n {\n _id: 0,\n airport: 'JFK',\n connects: [ 'BOS', 'ORD' ],\n numConnections: Long('1')\n },\n {\n _id: 1,\n airport: 'BOS',\n connects: [ 'JFK', 'PWM' ],\n numConnections: Long('0')\n },\n {\n _id: 4,\n airport: 'LHR',\n connects: [ 'PWM' ],\n numConnections: Long('2')\n },\n {\n _id: 3,\n airport: 'PWM',\n connects: [ 'BOS', 'LHR' ],\n numConnections: Long('1')\n },\n {\n _id: 2,\n airport: 'ORD',\n connects: [ 'JFK' ],\n numConnections: Long('2')\n }\n ]\n }\n]" + "sha256" : "70607c9a484387a0f95b6c4f72b74bcde386455fe7740ec973e459e74430352d", + "text" : "[\n {\n _id: 1,\n name: 'Dev',\n nearestAirport: 'JFK',\n destinations: [\n {\n _id: 0,\n airport: 'JFK',\n connects: [ 'BOS', 'ORD' ],\n numConnections: Long('0')\n },\n {\n _id: 1,\n airport: 'BOS',\n connects: [ 'JFK', 'PWM' ],\n numConnections: Long('1')\n },\n {\n _id: 3,\n airport: 'PWM',\n connects: [ 'BOS', 'LHR' ],\n numConnections: Long('2')\n },\n {\n _id: 2,\n airport: 'ORD',\n connects: [ 'JFK' ],\n numConnections: Long('1')\n }\n ]\n },\n {\n _id: 2,\n name: 'Eliot',\n nearestAirport: 'JFK',\n destinations: [\n {\n _id: 0,\n airport: 'JFK',\n connects: [ 'BOS', 'ORD' ],\n numConnections: Long('0')\n },\n {\n _id: 1,\n airport: 'BOS',\n connects: [ 'JFK', 'PWM' ],\n numConnections: Long('1')\n },\n {\n _id: 3,\n airport: 'PWM',\n connects: [ 'BOS', 'LHR' ],\n numConnections: Long('2')\n },\n {\n _id: 2,\n airport: 'ORD',\n connects: [ 'JFK' ],\n numConnections: Long('1')\n }\n ]\n },\n {\n _id: 3,\n name: 'Jeff',\n nearestAirport: 'BOS',\n destinations: [\n {\n _id: 0,\n airport: 'JFK',\n connects: [ 'BOS', 'ORD' ],\n numConnections: Long('1')\n },\n {\n _id: 1,\n airport: 'BOS',\n connects: [ 'JFK', 'PWM' ],\n numConnections: Long('0')\n },\n {\n _id: 4,\n airport: 'LHR',\n connects: [ 'PWM' ],\n numConnections: Long('2')\n },\n {\n _id: 3,\n airport: 'PWM',\n connects: [ 'BOS', 'LHR' ],\n numConnections: Long('1')\n },\n {\n _id: 2,\n airport: 'ORD',\n connects: [ 'JFK' ],\n numConnections: Long('2')\n }\n ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -7975,47 +7443,59 @@ "title" : "With a Query Filter" } ], "includes" : [ { - "blob" : "88a019ea44d91726953d31d21e664e1333190efd", - "path" : "content/manual/manual/source/includes/graphLookup-sharded-coll-transaction-note.rst" - }, { - "blob" : "cbd3d430ce1585972827535fa6ce4ef6f7f7af69", - "path" : "content/manual/manual/source/includes/fact-graphlookup-memory-restrictions.rst" - }, { - "blob" : "8a430a89d3c2edbb9a1e0e5c8e49921ad0376919", - "path" : "content/manual/manual/source/includes/extracts-views.yaml" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "16042b99e3f8f595b68c0ab261e74c7fda138ee0", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/airports-insert.snippet.insert-airports.js" }, { "blob" : "e47ecb6fb8387dd4006d1f02bd4a64fa78f34875", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/employees-insert.snippet.insert-employees.js" + }, { + "blob" : "b8ee0ab541dd2d4f752be74690fc61f0bb7a05c0", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/employees-reporting-hierarchy-output.sh" }, { "blob" : "8708c038bdcec6da230d5a66800fec1b32e7ce0b", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/employees-reporting-hierarchy.snippet.employees-reporting-hierarchy.js" }, { - "blob" : "b8ee0ab541dd2d4f752be74690fc61f0bb7a05c0", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/employees-reporting-hierarchy-output.sh" + "blob" : "3cdf43d0b69fc28d4d8dbf70e4bcc6a9655bdbe7", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/people-golf-connections-output.sh" }, { - "blob" : "16042b99e3f8f595b68c0ab261e74c7fda138ee0", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/airports-insert.snippet.insert-airports.js" + "blob" : "d20f431b1f62d9fbcd989a84a0bce383fd14300b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/people-golf-connections.snippet.people-golf-connections.js" }, { - "blob" : "ef975f7d4ed9d03b6792d3023124e6afccf3d162", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/travelers-insert.snippet.insert-travelers.js" + "blob" : "488bc4af2b01f0435461e7397bddfd10f6063200", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/people-insert.snippet.insert-people.js" + }, { + "blob" : "9a666ae5147b4b4522ac5361058c4a25029cfd63", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/travelers-destinations-output.sh" }, { "blob" : "7be2e11695b0c975e1cc4594c3699cd537aeb0ff", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/travelers-destinations.snippet.travelers-destinations.js" }, { - "blob" : "9a666ae5147b4b4522ac5361058c4a25029cfd63", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/travelers-destinations-output.sh" + "blob" : "ef975f7d4ed9d03b6792d3023124e6afccf3d162", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/travelers-insert.snippet.insert-travelers.js" }, { - "blob" : "488bc4af2b01f0435461e7397bddfd10f6063200", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/people-insert.snippet.insert-people.js" + "blob" : "7fe6cd27c3b078584d920c7c196e3d443b484e13", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/GraphLookup.snippet.employee-class.cs" }, { - "blob" : "d20f431b1f62d9fbcd989a84a0bce383fd14300b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/people-golf-connections.snippet.people-golf-connections.js" + "blob" : "b69e880a7630c25302b348f4148cb791be201cab", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/GraphLookup.snippet.graph-lookup-basic.cs" }, { - "blob" : "3cdf43d0b69fc28d4d8dbf70e4bcc6a9655bdbe7", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/graphLookup/people-golf-connections-output.sh" + "blob" : "af94fbdc51f6c193b33886a5d7927ac78f233754", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/GraphLookup.snippet.graph-lookup-depth.cs" + }, { + "blob" : "4ad8e1212ebcaf351fdd1f3ea2059d80e24469ec", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/GraphLookup.snippet.graph-lookup-match.cs" + }, { + "blob" : "96cfe17bb377d4e9d9abfe0edf44e68c662ae147", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/GraphLookupBasicOutput.txt" + }, { + "blob" : "96cfe17bb377d4e9d9abfe0edf44e68c662ae147", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/GraphLookupDepthOutput.txt" + }, { + "blob" : "12152e09bbb50c3bf378a30f6b27c454e7d635f9", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/GraphLookupMatchOutput.txt" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "graphLookup", "pageBlob" : "d3e1e0aac59fc7b811cd2ffcf23f0eed62fbcae9", @@ -8029,12 +7509,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "f6e681537495d2b826356d653e678c4d4ba59f71ee72221347e350564d0ebae8", - "text" : "db.movies.aggregate([\n {\n $group: {\n _id: null,\n count: { $count: {} }\n }\n }\n])" + "sha256" : "04301f9235f5b58e1649a686e08fbf26f1bbb447038473a133a7a88453f413b5", + "text" : "db.movies.aggregate([\n {\n $group: {\n _id: null,\n count: { $count: {} }\n }\n }\n])\n" }, { "role" : "EXPECTED", - "sha256" : "dbbccb4d3fd88c0c69548da57b5f735183dd9803bcffd3d2c1cf13d33f7cb2c4", - "text" : "[\n {\n _id: null,\n count: 21349\n }\n]" + "sha256" : "b1afa79864d005eec892fffaffe5e2a4d841a55784f8b945c0cd036d476afc28", + "text" : "[\n {\n _id: null,\n count: 21349\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -8044,12 +7524,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "9200e9c7c4ef3b46db8f01b7b617b7b5659cf3fd5484613c230b15f168d99386", - "text" : "db.movies.aggregate( [ { $group : { _id : \"$rated\" } } ] )" + "sha256" : "c389ed7c2ec32f3587152e6dcbc37997f0775d7af09ba57d36b01610e7a2672a", + "text" : "db.movies.aggregate( [ { $group : { _id : \"$rated\" } } ] )\n" }, { "role" : "EXPECTED", - "sha256" : "77b0ca1e9e3cc92a5b7661deb1c182f60be7c1153e1eeaca6376bd63760bfbf3", - "text" : "[\n {\n _id: 'TV-PG'\n },\n {\n _id: 'PG'\n },\n {\n _id: 'TV-14'\n },\n {\n _id: 'OPEN'\n },\n {\n _id: 'Not Rated'\n },\n {\n _id: 'GP'\n },\n {\n _id: 'TV-Y7'\n },\n {\n _id: 'G'\n },\n {\n _id: 'PG-13'\n },\n {\n _id: null\n },\n {\n _id: 'M'\n },\n {\n _id: 'R'\n },\n {\n _id: 'TV-MA'\n },\n {\n _id: 'APPROVED'\n },\n {\n _id: 'PASSED'\n },\n {\n _id: 'Approved'\n },\n {\n _id: 'AO'\n },\n {\n _id: 'TV-G'\n }\n]" + "sha256" : "e3a07d426f3e68f26f9f3c4b026eb8a1f0efe29d5beae7d11ccdb67a5e470b5d", + "text" : "[\n {\n _id: 'TV-PG'\n },\n {\n _id: 'PG'\n },\n {\n _id: 'TV-14'\n },\n {\n _id: 'OPEN'\n },\n {\n _id: 'Not Rated'\n },\n {\n _id: 'GP'\n },\n {\n _id: 'TV-Y7'\n },\n {\n _id: 'G'\n },\n {\n _id: 'PG-13'\n },\n {\n _id: null\n },\n {\n _id: 'M'\n },\n {\n _id: 'R'\n },\n {\n _id: 'TV-MA'\n },\n {\n _id: 'APPROVED'\n },\n {\n _id: 'PASSED'\n },\n {\n _id: 'Approved'\n },\n {\n _id: 'AO'\n },\n {\n _id: 'TV-G'\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -8059,12 +7539,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "3906968b45f619f8c9bfec23d26781cca4c4519ea1d0ab3bc68ca0daf3ce67ed", - "text" : "db.movies.aggregate(\n [\n // First Stage\n {\n $group: {\n _id: \"$rated\",\n totalRuntime: { $sum: \"$runtime\" }\n }\n },\n // Second Stage\n {\n $match: { \"totalRuntime\": { $gte: 100000 } }\n }\n ]\n)" + "sha256" : "12779c0a82e2e4d46a5f79471934c3ff7850d267eba2459aa5dae82799ee67ed", + "text" : "db.movies.aggregate(\n [\n // First Stage\n {\n $group: {\n _id: \"$rated\",\n totalRuntime: { $sum: \"$runtime\" }\n }\n },\n // Second Stage\n {\n $match: { \"totalRuntime\": { $gte: 100000 } }\n }\n ]\n)\n" }, { "role" : "EXPECTED", - "sha256" : "f2f2d96cc35f4f82910b7bb0becf3f9aa2e118f057e2a6cc8ee5d1ac6f991cc7", - "text" : "[\n {\n _id: 'PG-13',\n totalRuntime: 250843\n },\n {\n _id: 'R',\n totalRuntime: 582318\n },\n {\n _id: null,\n totalRuntime: 967127\n },\n {\n _id: 'PG',\n totalRuntime: 191204\n }\n]" + "sha256" : "4e6285d0f058e24ddb9a8f803b808606f754eca40d56fb4438fd8c632502fe34", + "text" : "[\n {\n _id: 'PG-13',\n totalRuntime: 250843\n },\n {\n _id: 'R',\n totalRuntime: 582318\n },\n {\n _id: null,\n totalRuntime: 967127\n },\n {\n _id: 'PG',\n totalRuntime: 191204\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -8074,101 +7554,121 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "96c227f4160a8860535228c4e3d2dc0fc25feb1fec167842c3c38e261def9a6c", - "text" : "db.movies.aggregate([\n { $match: { \"year\": { $lt: 1910 } } },\n {\n $group: {\n _id: \"$year\",\n totalRuntime: { $sum: \"$runtime\" },\n averageRuntime: { $avg: \"$runtime\" },\n count: { $sum: 1 }\n }\n },\n { $sort: { totalRuntime: -1 } }\n])" + "sha256" : "79b516a976df17dfd6554c3e6f30799901064ecb53044ebc10dda82bbee5ee4b", + "text" : "db.movies.aggregate([\n { $match: { \"year\": { $lt: 1910 } } },\n {\n $group: {\n _id: \"$year\",\n totalRuntime: { $sum: \"$runtime\" },\n averageRuntime: { $avg: \"$runtime\" },\n count: { $sum: 1 }\n }\n },\n { $sort: { totalRuntime: -1 } }\n])\n" }, { "role" : "EXPECTED", - "sha256" : "f0a464a28e6388c3c7a5a96008785916e5db08eb9eca8ce073aae6da7610ee21", - "text" : "[\n { _id: 1909, totalRuntime: 14, averageRuntime: 14, count: 1 },\n { _id: 1903, totalRuntime: 11, averageRuntime: 11, count: 1 },\n { _id: 1896, totalRuntime: 2, averageRuntime: 1, count: 2 }\n]" + "sha256" : "069818eebb622eb4995b9f7199d748371f9ec5da00b33c01fc9f4b75a208f216", + "text" : "[\n { _id: 1909, totalRuntime: 14, averageRuntime: 14, count: 1 },\n { _id: 1903, totalRuntime: 11, averageRuntime: 11, count: 1 },\n { _id: 1896, totalRuntime: 2, averageRuntime: 1, count: 2 }\n]\n" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", - "stem" : "calculateCountSumAndAverage", - "title" : "Calculate Count, Sum, and Average" + "stem" : "groupByYear", + "title" : "Group by Year" }, { - "blocks" : [ ], + "blocks" : [ { + "role" : "ACTION", + "sha256" : "e0d743894709a95ec4980ab69ffcceb669f43b1c03c18277b3832a2439eb4c20", + "text" : "db.movies.aggregate([\n {\n $group: {\n _id: null,\n totalRuntime: { $sum: \"$runtime\" },\n averageRuntime: { $avg: \"$runtime\" },\n count: { $sum: 1 }\n }\n }\n])\n" + }, { + "role" : "EXPECTED", + "sha256" : "afc6a4bce8f41335f22a363fbd3886f3c2b2847a854e9bee23e6914d3b624d78", + "text" : "[\n {\n _id: null,\n totalRuntime: 2167458,\n averageRuntime: 103.65652797704448,\n count: 21349\n }\n]\n" + } ], "detail" : null, - "owner" : "aggregation/stages/group/pivotData", - "status" : "OWNED", - "stem" : null, - "title" : "Pivot Data" - } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "2cdafbda5059c106db3b9be9a0c5f2d66480dad6", - "path" : "content/manual/manual/source/includes/blocking-performance.rst" - }, { - "blob" : "16f39a34c93b2585f53ddb5045654af41dc0d6e2", - "path" : "content/manual/manual/source/includes/extracts-agg-operators.yaml" - }, { - "blob" : "5ba8939bc7515c153aa2f6eef9953927f0183ce2", - "path" : "content/manual/manual/source/includes/fact-sbe-group-overview.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "owner" : null, + "status" : "UNOWNED", + "stem" : "groupByNull", + "title" : "Group by null" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "e94a233a54a9ea8a44dc607728d0514c5962783060a5dbe7096110686fb95fa5", + "text" : "db.movies.aggregate([\n { $match: { year: { $lt: 1910 } } },\n { $group: { _id: \"$year\", titles: { $push: \"$title\" } } },\n { $sort: { _id: 1 } }\n])\n" + }, { + "role" : "EXPECTED", + "sha256" : "d7e8870a2ffd0a88f73806d15b303e6e573609c4d92e9bee5c6750b866bdef24", + "text" : "[\n { _id: 1896, titles: [ 'The Kiss', 'The Kiss' ] },\n { _id: 1903, titles: [ 'The Great Train Robbery' ] },\n { _id: 1909, titles: [ 'A Corner in Wheat' ] }\n]\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "groupTitlesByYear", + "title" : "Group Titles by Year" }, { - "blob" : "7082aa6ec4eef82ae2a4fbbddb92f9e1822dfe50", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/index-optimization.snippet.index-optimization.js" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "a28efa4be798f65d077acc47da72bf83c51cdeea0f4c2177a708dbbfb6cb6837", + "text" : "db.movies.aggregate([\n { $match: { year: { $lt: 1910 } } },\n { $group: { _id: \"$year\", movies: { $push: \"$$ROOT\" } } },\n {\n $addFields: {\n totalRuntime: { $sum: \"$movies.runtime\" }\n }\n },\n { $sort: { _id: 1 } }\n])\n" + }, { + "role" : "EXPECTED", + "sha256" : "b0a9028121afdbf4c308a528bf4e040c8b5923ce3ad1fd1c04618e065cce0383", + "text" : "[\n { _id: 1896, movies: '...', totalRuntime: 2 },\n { _id: 1903, movies: '...', totalRuntime: 11 },\n { _id: 1909, movies: '...', totalRuntime: 14 }\n]\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "groupDocumentsByYear", + "title" : "Group Documents by Year" + } ], + "includes" : [ { + "blob" : "6da2abfd0961440983988c6ac1957a0d8ca3cf83", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/count-documents-output.sh" }, { "blob" : "0ee3bd3bf2b74fa1fa1b872acd5e1dff1542ae11", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/count-documents.snippet.count-documents.js" }, { - "blob" : "6da2abfd0961440983988c6ac1957a0d8ca3cf83", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/count-documents-output.sh" + "blob" : "53e924dfcfc8f841724fd8dab5eb64f4d6e0113a", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/distinct-values-output.sh" }, { "blob" : "2284076881fcd72d1df75db25cd09b457763870f", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/distinct-values.snippet.distinct-values.js" }, { - "blob" : "53e924dfcfc8f841724fd8dab5eb64f4d6e0113a", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/distinct-values-output.sh" + "blob" : "99d031e8956c0734bba7aec6279ebbd149826c3e", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-by-null-output.sh" }, { - "blob" : "d4a7de9412e8da640d0dc506cab80b0dcb5b643f", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-by-rating.snippet.group-by-rating.js" + "blob" : "40d2c73ce671fdd707f0ec1e533a4b0038be8af3", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-by-null.snippet.group-by-null.js" }, { "blob" : "2def3709136f5a6bb47242914667e83d36a4f526", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-by-rating-output.sh" }, { - "blob" : "d0cc0e03a073125db2ee8223d8679286fe40926a", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-by-year.snippet.group-by-year.js" + "blob" : "d4a7de9412e8da640d0dc506cab80b0dcb5b643f", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-by-rating.snippet.group-by-rating.js" }, { "blob" : "371bd606780d8a02e09fe9ac4c62e5dc4b9b1952", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-by-year-output.sh" }, { - "blob" : "40d2c73ce671fdd707f0ec1e533a4b0038be8af3", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-by-null.snippet.group-by-null.js" + "blob" : "d0cc0e03a073125db2ee8223d8679286fe40926a", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-by-year.snippet.group-by-year.js" }, { - "blob" : "99d031e8956c0734bba7aec6279ebbd149826c3e", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-by-null-output.sh" + "blob" : "88f32e826fb48596e10425184ab992c2f3d13c0d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-documents-by-year-output.sh" }, { - "blob" : "b32753b02834404415a53e6a9b5cdc7165ef17d5", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-titles-by-year.snippet.group-titles-by-year.js" + "blob" : "0e93e979e8a05a473b3a127d7580d445dba5e971", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-documents-by-year.snippet.group-documents-by-year.js" }, { "blob" : "0d42762ae5af381fb0a632fb0ccbf1418366bb71", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-titles-by-year-output.sh" }, { - "blob" : "0e93e979e8a05a473b3a127d7580d445dba5e971", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-documents-by-year.snippet.group-documents-by-year.js" + "blob" : "b32753b02834404415a53e6a9b5cdc7165ef17d5", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-titles-by-year.snippet.group-titles-by-year.js" }, { - "blob" : "88f32e826fb48596e10425184ab992c2f3d13c0d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/group-documents-by-year-output.sh" + "blob" : "7082aa6ec4eef82ae2a4fbbddb92f9e1822dfe50", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/group/index-optimization.snippet.index-optimization.js" + }, { + "blob" : "4f37421c4f190820416dbd965deda668197eca61", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Group.snippet.group.cs" + }, { + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" + }, { + "blob" : "20a60e45b7f59431f9b0c865d0cc3ac181f607dc", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/GroupOutput.txt" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "group", "pageBlob" : "8a18fc90e2df0775fccd5531514e665a1a131341", @@ -8181,43 +7681,39 @@ "context" : "aggregation/stages", "examples" : [ { "blocks" : [ { + "role" : "INDEX", + "sha256" : "42ec0b051896c58ec21088554d90b41cab5d3344b069a70ee1f79144b08828b6", + "text" : "db.movies.createIndex( { year: 1, title: 1 } )\ndb.movies.createIndex( { rated: 1, year: 1 } )\ndb.movies.createIndex(\n { metacritic: 1 },\n { partialFilterExpression: { rated: \"R\" } }\n)\n" + }, { "role" : "ACTION", - "sha256" : "8d21b466c0c58f823addf3ce810309f8b8304b70fa2ef98bc05206ae2d270810", - "text" : "db.movies.find( { rated: \"R\" } )\ndb.movies.find( { year: 1994 } ).sort( { title: 1 } )\ndb.movies.find( { metacritic: { $gt: 90 } } )" + "sha256" : "240a65b03ac598132c6388bae98a483bae0d4dbbf94a0870fd32a5e00bc609d4", + "text" : "db.movies.aggregate( [ { $indexStats: { } } ] )\n" }, { "role" : "EXPECTED", - "sha256" : "af63fdf1f886c42166b2b361e0b17819942d603f8ba42670d254ffac2b1d87e3", - "text" : "[\n {\n name: 'year_1_title_1',\n key: { year: 1, title: 1 },\n host: ...,\n accesses: ...,\n spec: { v: 2, key: { year: 1, title: 1 }, name: 'year_1_title_1' }\n },\n {\n name: 'rated_1_year_1',\n key: { rated: 1, year: 1 },\n host: ...,\n accesses: ...,\n spec: { v: 2, key: { rated: 1, year: 1 }, name: 'rated_1_year_1' }\n },\n {\n name: 'metacritic_1',\n key: { metacritic: 1 },\n host: ...,\n accesses: ...,\n spec: {\n v: 2,\n key: { metacritic: 1 },\n name: 'metacritic_1',\n partialFilterExpression: { rated: 'R' }\n }\n },\n {\n name: '_id_',\n key: { _id: 1 },\n host: ...,\n accesses: ...,\n spec: { v: 2, key: { _id: 1 }, name: '_id_' }\n },\n {\n name: 'cast_text_fullplot_text_genres_text_title_text',\n key: { _fts: 'text', _ftsx: 1 },\n host: ...,\n accesses: ...,\n spec: ...\n }\n]" - }, { - "role" : "INDEX", - "sha256" : "61652805b3c8f99036b7db864c21fa70ffd6b2f4d9fb86219db2473d5ddddbc3", - "text" : "db.movies.createIndex( { year: 1, title: 1 } )\ndb.movies.createIndex( { rated: 1, year: 1 } )\ndb.movies.createIndex(\n { metacritic: 1 },\n { partialFilterExpression: { rated: \"R\" } }\n)" + "sha256" : "beb8ef307bd441431a17c9fc87670bafdc4d4c2434838a0776ab180d05dcc85f", + "text" : "[\n {\n name: 'year_1_title_1',\n key: { year: 1, title: 1 },\n host: ...,\n accesses: ...,\n spec: { v: 2, key: { year: 1, title: 1 }, name: 'year_1_title_1' }\n },\n {\n name: 'rated_1_year_1',\n key: { rated: 1, year: 1 },\n host: ...,\n accesses: ...,\n spec: { v: 2, key: { rated: 1, year: 1 }, name: 'rated_1_year_1' }\n },\n {\n name: 'metacritic_1',\n key: { metacritic: 1 },\n host: ...,\n accesses: ...,\n spec: {\n v: 2,\n key: { metacritic: 1 },\n name: 'metacritic_1',\n partialFilterExpression: { rated: 'R' }\n }\n },\n {\n name: '_id_',\n key: { _id: 1 },\n host: ...,\n accesses: ...,\n spec: { v: 2, key: { _id: 1 }, name: '_id_' }\n },\n {\n name: 'cast_text_fullplot_text_genres_text_title_text',\n key: { _fts: 'text', _ftsx: 1 },\n host: ...,\n accesses: ...,\n spec: ...\n }\n]\n" } ], - "detail" : null, - "name" : "Return Index Usage Statistics", + "detail" : "SYNTAX", "owner" : null, - "status" : "UNOWNED", - "stem" : "returnIndexUsageStatistics", + "status" : "UNSUPPORTED", + "stem" : null, "title" : "main" } ], "includes" : [ { - "blob" : "229b18c565a0524bcb3687d5661fa8650a3c93a5", - "path" : "content/manual/manual/source/includes/sample-data-usage-singular.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" - }, { "blob" : "183b43b5e62765ff1341342f027a57e6648f1e88", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/indexStats/create-indexes.snippet.create-indexes.js" }, { - "blob" : "079b09f001f5eb4ac4b3ac340e8f00590af0c5b3", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/indexStats/run-queries.snippet.run-queries.js" + "blob" : "5d650fdeba8d83ca2acca29f3c43c9c099de7aad", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/indexStats/index-stats-output.sh" }, { "blob" : "1cb9fb581f3b15762535eb27d3ed6b9277715ff3", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/indexStats/index-stats.snippet.index-stats.js" }, { - "blob" : "5d650fdeba8d83ca2acca29f3c43c9c099de7aad", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/indexStats/index-stats-output.sh" + "blob" : "079b09f001f5eb4ac4b3ac340e8f00590af0c5b3", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/indexStats/run-queries.snippet.run-queries.js" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "indexStats", "pageBlob" : "e28325088e928c6f187bbc8f98ebba20ff423b85", @@ -8231,8 +7727,8 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "71aa6e659a61188b24e2de7b027a3f264ba0eab0f1d75977d049c89e8f474e62", - "text" : "db.movies.aggregate([\n { $limit : 5 }\n])" + "sha256" : "0d9a3c4499ee595a0a63b9a4088cec3be70a9d0d4ddc6c8b66d6650c94d089ec", + "text" : "db.movies.aggregate([\n { $limit : 5 }\n])\n" } ], "detail" : null, "name" : "Return the First Five Movies", @@ -8242,29 +7738,20 @@ "title" : "main" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" + "blob" : "9b6c4353190c4512555ab70f353b7e39988d3249", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/limit/limit-movies.snippet.limit-movies.js" }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "b2e6ba8e71bc64151afcbab4b276dc583db1aaea", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Limit.snippet.limit.cs" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" }, { - "blob" : "ad8da777c6a2df6b7d30cc3a4fa3aeaa2207ecb4", - "path" : "content/manual/manual/source/includes/fact-agg-sort-limit.rst" + "blob" : "44196f7a5cea1a654a7e60375e2e037af1bb09e9", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/LimitOutput.txt" }, { - "blob" : "9b6c4353190c4512555ab70f353b7e39988d3249", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/limit/limit-movies.snippet.limit-movies.js" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "limit", "pageBlob" : "dd2697099f95717ab686268d8209c1b968a0e9dc", @@ -8276,39 +7763,23 @@ }, { "context" : "aggregation/stages", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "948de0b04a48e5a7e581c0618a55f45b35873c546be2c68bbcd99e66b196b68b", - "text" : "use sample_mflix\n\ndb.aggregate([\n {\n $listClusterCatalog: {}\n }\n])" - }, { - "role" : "EXPECTED", - "sha256" : "8768cdcdd5288a0fdb804df15e230000d27b7b94be14486c84c6a566402a625a", - "text" : "[\n {\n ns: \"sample_mflix.movies\",\n db: \"sample_mflix\",\n type: \"collection\",\n idIndex: { v: 2, key: { _id: 1 }, name: '_id' },\n options: { ... },\n sharded: false,\n info: {\n readOnly: false,\n uuid: new UUID(\"6c46c8b9-4999-4213-bcef-9a36b0cff228\")\n }\n },\n {\n ns: \"sample_mflix.comments\",\n db: \"sample_mflix\",\n type: \"collection\",\n options: { ... },\n sharded: true,\n info: {\n readOnly: true,\n uuid: new UUID(\"6c448eb9-4090-4213-bbaf-9a36bb7fc98e\")\n }\n shardKey: { _id: 1}\n },\n ...\n]" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "listInformationFromAllCollections", "title" : "List Information from All Collections" }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "f952c6f841edbd3e78b1b82743a7bc30853076abd99b8623be36d58a436d3fc6", - "text" : "use sample_mflix\n\ndb.aggregate([\n {\n $listClusterCatalog: {\n balancingConfiguration: true\n }\n }\n])" - }, { - "role" : "EXPECTED", - "sha256" : "0be10e20869b7998d690df3aa8258e4a821060fc692398e819a11a624de06cb0", - "text" : "[\n {\n ns: \"sample_mflix.movies\",\n db: \"sample_mflix\",\n type: \"collection\",\n idIndex: { v: 2, key: { _id: 1 }, name: '_id' },\n options: { ... },\n sharded: false,\n ...\n },\n {\n ns: \"sample_mflix.comments\",\n db: \"sample_mflix\",\n type: \"collection\",\n sharded: true,\n shardKey: { _id: 1},\n balancingEnabled: true,\n balancingEnabledReason: {\n enableBalancing: true,\n allowMigrations: false\n },\n autoMergingEnabled: false,\n chunkSize: 256,\n ...\n },\n ...\n]" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "balancingConfiguration", "title" : "Balancing Configuration" } ], "includes" : [ { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "listClusterCatalog", "pageBlob" : "c0e6b547fe9e47759ab6da27e316c9190104314f", @@ -8320,44 +7791,31 @@ }, { "context" : "aggregation/stages", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "dff220090f82699b872de5a7f892d3c22233ce951fdc21fe508751571e4696cf", - "text" : "db.aggregate( [ { $listLocalSessions: { allUsers: true } } ] )" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "listAllLocalSessions", "title" : "List All Local Sessions" }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "39bd33cf5d512a955e0b428a1ae7207b11f702f7029493ba31f2f9dd4f758c6a", - "text" : "db.aggregate( [ { $listLocalSessions: { users: [ { user: \"myAppReader\", db: \"test\" } ] } } ] )" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "listAllLocalSessionsForTheSpecifiedUsers", "title" : "List All Local Sessions for the Specified Users" }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "cb3eeb6bb4b479b14fb5710455c91dccb716e3d68c85a2b7a0879468fe54dc40", - "text" : "db.aggregate( [ { $listLocalSessions: { } } ] )" - }, { - "role" : "EXPECTED", - "sha256" : "af0b9eb5784c5cb18cb248966413fa9a80b1557f3595e93256b38bf4f0b6d0f5", - "text" : "{\n _id: {\n id: ,\n uid: \n },\n lastUse: \n}" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "listAllLocalSessionsForTheCurrentUser", "title" : "List All Local Sessions for the Current User" } ], - "includes" : [ ], + "includes" : [ { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" + } ], "operator" : "listLocalSessions", "pageBlob" : "964128a9492818f2db15b74b342f0b178371ace2", "source" : { @@ -8368,29 +7826,24 @@ }, { "context" : "aggregation/stages", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "4f8f262fe3b3cbc6b9de7a82ae56ad0e595b43377ff69e10967cdcd4c8d4654a", - "text" : "db.aggregate( [ { $listSampledQueries: { } } ] )" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "listSampledQueriesForAllCollections", "title" : "List Sampled Queries for All Collections" }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "ac68b46d0611cc76947685df7bec768b5ff05b403c6e43bc2805121a0d28dc92", - "text" : "db.aggregate( [ { $listSampledQueries: { namespace: \"social.post\" } } ] )" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "listSampledQueriesForASpecificCollection", "title" : "List Sampled Queries for A Specific Collection" } ], - "includes" : [ ], + "includes" : [ { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" + } ], "operator" : "listSampledQueries", "pageBlob" : "970936ce7a205efbba1300f66f1af79b32b2f796", "source" : { @@ -8447,32 +7900,8 @@ "title" : "Return a Single Search Index by id" } ], "includes" : [ { - "blob" : "792263b8c6a48cb59c4832140781f4f838d61137", - "path" : "content/manual/manual/source/includes/atlas-search-commands/command-descriptions/getSearchIndexes-description.rst" - }, { - "blob" : "c08242a930f02ca58bd897e1b9045bfa52aa5237", - "path" : "content/manual/manual/source/includes/atlas-search-commands/access-control/list-access-control.rst" - }, { - "blob" : "1a63426dea0160643ee80c7000a16e07406c7d02", - "path" : "content/manual/manual/source/includes/atlas-search-commands/command-output/listSearchIndex-output.rst" - }, { - "blob" : "53ec0c131c4012511bbd83e7f47a5690c7de2b42", - "path" : "content/manual/manual/source/includes/atlas-search-commands/command-output/search-index-details.rst" - }, { - "blob" : "656f468b91f3259063792403c73799328a559a43", - "path" : "content/manual/manual/source/includes/atlas-search-commands/command-output/search-index-synonym-details.rst" - }, { - "blob" : "26e9b47fe74d69451e11dde019b4f22954d9e763", - "path" : "content/manual/manual/source/includes/atlas-search-commands/command-output/search-index-statuses.rst" - }, { - "blob" : "6fbeab5e88a61bb39b4207a00fcd82d381de87ca", - "path" : "content/manual/manual/source/includes/atlas-search-commands/command-output/examples/multi-doc-example-output.rst" - }, { - "blob" : "9d49db96c7ff3a551f28e025eb4f7ed018593304", - "path" : "content/manual/manual/source/includes/atlas-search-commands/command-output/examples/single-doc-synonyms-example-output.rst" - }, { - "blob" : "94ed12420e70de8ac01fd205ee6e1a3df22c7dd8", - "path" : "content/manual/manual/source/includes/atlas-search-commands/command-output/examples/single-doc-default-example-output.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "listSearchIndexes", "pageBlob" : "7869e7ae0f16daa421ebbe7718ec943e9b892e39", @@ -8484,44 +7913,31 @@ }, { "context" : "aggregation/stages", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "f52b727878065a4dba225d87101bab76877bb059ca101f8bf906edbf4ebc12aa", - "text" : "use config\n\ndb.system.sessions.aggregate( [ { $listSessions: { allUsers: true } } ] )" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "listAllSessions", "title" : "List All Sessions" }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "011a1612b26b5504579abbf2541ee2f693dcc1526fd00fc092ae12b232efbbd4", - "text" : "use config\n\ndb.system.sessions.aggregate( [ { $listSessions: { users: [ {user: \"myAppReader\", db: \"test\" } ] } } ] )" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "listAllSessionsForTheSpecifiedUsers", "title" : "List All Sessions for the Specified Users" }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "0547ef796d3908193e8bfa211dd16bc6101fdf3599c9350107872f853eabb22e", - "text" : "use config\n\ndb.system.sessions.aggregate( [ { $listSessions: { } } ] )" - }, { - "role" : "EXPECTED", - "sha256" : "af0b9eb5784c5cb18cb248966413fa9a80b1557f3595e93256b38bf4f0b6d0f5", - "text" : "{\n _id: {\n id: ,\n uid: \n },\n lastUse: \n}" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "listAllSessionsForTheCurrentUser", "title" : "List All Sessions for the Current User" } ], - "includes" : [ ], + "includes" : [ { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" + } ], "operator" : "listSessions", "pageBlob" : "a55bb776157bcd674259b836c9c37540621a30fa", "source" : { @@ -8533,34 +7949,34 @@ "context" : "aggregation/stages", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by name", "owner" : "aggregation/stages/lookup/performASingleEqualityJoinWithLookup", "status" : "OWNED", "stem" : null, - "title" : "Perform a Single Equality Join with ``$lookup``" + "title" : "Perform a Single Equality Join with $lookup" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by name", "owner" : "aggregation/stages/lookup/useLookupWithAnArray", "status" : "OWNED", "stem" : null, - "title" : "Use ``$lookup`` with an Array" + "title" : "Use $lookup with an Array" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by name", "owner" : "aggregation/stages/lookup/useLookupWithMergeObjects", "status" : "OWNED", "stem" : null, - "title" : "Use ``$lookup`` with ``$mergeObjects``" + "title" : "Use $lookup with $mergeObjects" }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "193c498319799ef5b904a3fda031bfa032d1209aa3b5ca4b006a11350252cce0", - "text" : "db.movies.aggregate( [\n {\n $match: {\n title: {\n $in: [ \"Class Action\", \"Kafka\", \"Corpse Bride\" ]\n }\n }\n },\n {\n $lookup: {\n from: \"comments\",\n localField: \"_id\",\n foreignField: \"movie_id\",\n let: { movie_year: \"$year\" },\n pipeline: [\n {\n $match: {\n $expr: {\n $gt: [\n { $year: \"$date\" }, \"$$movie_year\"\n ]\n }\n }\n },\n { $project: { _id: 0, name: 1, date: 1 } }\n ],\n as: \"post_release_comments\"\n }\n },\n {\n $project: {\n _id: 0,\n title: 1,\n year: 1,\n post_release_comments: 1\n }\n }\n] )" + "sha256" : "fd80b2b2c6dfd55699a4818a479eb9e90e124d081b6f56967ac6af83f18a60e8", + "text" : "db.movies.aggregate( [\n {\n $match: {\n title: {\n $in: [ \"Class Action\", \"Kafka\", \"Corpse Bride\" ]\n }\n }\n },\n {\n $lookup: {\n from: \"comments\",\n localField: \"_id\",\n foreignField: \"movie_id\",\n let: { movie_year: \"$year\" },\n pipeline: [\n {\n $match: {\n $expr: {\n $gt: [\n { $year: \"$date\" }, \"$$movie_year\"\n ]\n }\n }\n },\n { $project: { _id: 0, name: 1, date: 1 } }\n ],\n as: \"post_release_comments\"\n }\n },\n {\n $project: {\n _id: 0,\n title: 1,\n year: 1,\n post_release_comments: 1\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "f943b284e56a717cdfc9fdbe8012089e74516447cd0c341da8e126437c53a90e", - "text" : "[\n {\n year: 1991,\n title: 'Class Action',\n post_release_comments: [\n { name: 'Khal Drogo', date: ISODate('2016-12-06T07:17:03.000Z') }\n ]\n },\n {\n year: 1991,\n title: 'Kafka',\n post_release_comments: [\n { name: 'Khal Drogo', date: ISODate('1998-05-10T03:10:20.000Z') }\n ]\n },\n { year: 2005, title: 'Corpse Bride', post_release_comments: [] }\n]" + "sha256" : "f20ca4d096ea43224f9ce433052bdb79714bdf9cd6b349bf4aeaeb51a941788d", + "text" : "[\n {\n year: 1991,\n title: 'Class Action',\n post_release_comments: [\n { name: 'Khal Drogo', date: ISODate('2016-12-06T07:17:03.000Z') }\n ]\n },\n {\n year: 1991,\n title: 'Kafka',\n post_release_comments: [\n { name: 'Khal Drogo', date: ISODate('1998-05-10T03:10:20.000Z') }\n ]\n },\n { year: 2005, title: 'Corpse Bride', post_release_comments: [] }\n]\n" } ], "detail" : null, "owner" : null, @@ -8569,103 +7985,104 @@ "title" : "Use Multiple Join Conditions and a Correlated Subquery" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by name", "owner" : "aggregation/stages/lookup/performAnUncorrelatedSubqueryWithLookup", "status" : "OWNED", "stem" : null, - "title" : "Perform an Uncorrelated Subquery with ``$lookup``" + "title" : "Perform an Uncorrelated Subquery with $lookup" }, { - "blocks" : [ ], + "blocks" : [ { + "role" : "ACTION", + "sha256" : "ea6a4bd51f0bf6b368429b16ad4969761587d7b89a34300a7febf37132915a33", + "text" : "db.movies.aggregate( [\n {\n $match: {\n title: { $in: [\n \"I Don't Kiss\",\n \"Lucky Luke\",\n \"Mississippi Masala\"\n ] }\n }\n },\n {\n $lookup: {\n from: \"comments\",\n localField: \"_id\",\n foreignField: \"movie_id\",\n let: { movie_year: \"$year\" },\n pipeline: [\n {\n $match: {\n $expr: {\n $gt: [\n { $year: \"$date\" }, \"$$movie_year\"\n ]\n }\n }\n },\n { $project: { _id: 0, name: 1, date: 1 } }\n ],\n as: \"post_release_comments\"\n }\n },\n {\n $project: {\n _id: 0,\n title: 1,\n year: 1,\n post_release_comments: 1\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "468ad11a7a0750b8aa2359bca35d1251631bee7cac86eaaf4f285f9ff23bef35", + "text" : "[\n {\n title: \"I Don't Kiss\",\n year: 1991,\n post_release_comments: [\n {\n name: 'Brandon Hardy',\n date: ISODate('2016-09-18T11:11:34.000Z')\n }\n ]\n },\n {\n title: 'Lucky Luke',\n year: 1991,\n post_release_comments: [\n {\n name: 'Kelsey Smith',\n date: ISODate('2010-01-13T17:55:01.000Z')\n }\n ]\n },\n {\n title: 'Mississippi Masala',\n year: 1991,\n post_release_comments: [\n {\n name: 'Phillip Collins',\n date: ISODate('2010-05-13T08:04:22.000Z')\n }\n ]\n }\n]\n" + } ], "detail" : null, - "owner" : "aggregation/stages/lookup/performAConciseCorrelatedSubqueryWithLookup", - "status" : "OWNED", - "stem" : null, - "title" : "Perform a Concise Correlated Subquery with ``$lookup``" + "name" : "Correlate with Local and Foreign Fields", + "owner" : null, + "status" : "UNOWNED", + "stem" : "correlateWithLocalAndForeignFields", + "title" : "Perform a Concise Correlated Subquery with $lookup" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "52a9b7a58a3cd5157bcce4f87531b2779238a7a7cbc2f97b2fc7c2d48e42feda", + "text" : "db.movies.aggregate( [\n {\n $match: {\n title: { $in: [\n \"I Don't Kiss\",\n \"Lucky Luke\",\n \"Mississippi Masala\"\n ] }\n }\n },\n {\n $lookup: {\n from: \"comments\",\n let: { movie_id: \"$_id\", movie_year: \"$year\" },\n pipeline: [\n {\n $match: {\n $expr: {\n $and: [\n { $eq: [ \"$movie_id\", \"$$movie_id\" ] },\n { $gt: [\n { $year: \"$date\" }, \"$$movie_year\"\n ] }\n ]\n }\n }\n },\n { $project: { _id: 0, name: 1, date: 1 } }\n ],\n as: \"post_release_comments\"\n }\n },\n {\n $project: {\n _id: 0,\n title: 1,\n year: 1,\n post_release_comments: 1\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "468ad11a7a0750b8aa2359bca35d1251631bee7cac86eaaf4f285f9ff23bef35", + "text" : "[\n {\n title: \"I Don't Kiss\",\n year: 1991,\n post_release_comments: [\n {\n name: 'Brandon Hardy',\n date: ISODate('2016-09-18T11:11:34.000Z')\n }\n ]\n },\n {\n title: 'Lucky Luke',\n year: 1991,\n post_release_comments: [\n {\n name: 'Kelsey Smith',\n date: ISODate('2010-01-13T17:55:01.000Z')\n }\n ]\n },\n {\n title: 'Mississippi Masala',\n year: 1991,\n post_release_comments: [\n {\n name: 'Phillip Collins',\n date: ISODate('2010-05-13T08:04:22.000Z')\n }\n ]\n }\n]\n" + } ], + "detail" : null, + "name" : "Correlate with Variables Only", + "owner" : null, + "status" : "UNOWNED", + "stem" : "correlateWithVariablesOnly", + "title" : "Perform a Concise Correlated Subquery with $lookup" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "e12eb465c09beda30309ba255d25ea41a5c601b7", - "path" : "content/manual/manual/source/includes/lookup-from.rst" - }, { - "blob" : "5695ba5aa80be496158324259edd3d492a321349", - "path" : "content/manual/manual/source/includes/fact-let-variable-access-note.rst" - }, { - "blob" : "c36352611b9afbca6193ffd7b5a385dcc8f9459f", - "path" : "content/manual/manual/source/includes/expr-operators-and-indexes.rst" - }, { - "blob" : "fd70caec15ce236248000b806e1fdeb87f6cd487", - "path" : "content/manual/manual/source/includes/uncorrelated-subquery.rst" - }, { - "blob" : "8a430a89d3c2edbb9a1e0e5c8e49921ad0376919", - "path" : "content/manual/manual/source/includes/extracts-views.yaml" - }, { - "blob" : "493d52c8108913fe31d75d05519a877a29f4531c", - "path" : "content/manual/manual/source/includes/fact-sbe-lookup-overview.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "8448eae6a4fdbf4ebdd9853165b4990f8bf8e992", - "path" : "content/manual/manual/source/includes/subpipeline-namespaces.rst" + "blob" : "47f25f7c4aa4a18d0852b513e7fbdd8faa0f2eb6", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/array-lookup-output.sh" }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blob" : "26a9fbe540fb39bc218a544b8417e11aee76b814", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/array-lookup.snippet.array-lookup.js" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "e2ee36b63708358cd1d288d1a579bd377f8378ec", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/concise-correlated-subquery-output.sh" }, { - "blob" : "ed5e6e22a22282d3cf3a3edd76e95a46fbc66178", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/equality-join.snippet.equality-join.js" + "blob" : "31e547b944eb980648d5dfbf8c5bb54a98e7e74f", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/concise-correlated-subquery.snippet.concise-correlated-subquery.js" }, { "blob" : "6206f8dd2c2d9ce4933541ce2154991bbcfdb925", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/equality-join-output.sh" }, { - "blob" : "26a9fbe540fb39bc218a544b8417e11aee76b814", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/array-lookup.snippet.array-lookup.js" - }, { - "blob" : "47f25f7c4aa4a18d0852b513e7fbdd8faa0f2eb6", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/array-lookup-output.sh" - }, { - "blob" : "30a5fc23e3f09bc870d8cdf46fdc153b50f2a171", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/merge-objects.snippet.merge-objects.js" + "blob" : "ed5e6e22a22282d3cf3a3edd76e95a46fbc66178", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/equality-join.snippet.equality-join.js" }, { "blob" : "3b825308667d10e9668308ec99ab74ffa1ae7720", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/merge-objects-output.sh" }, { - "blob" : "d93791e69a10ed0486149cce67f4c96168f55b8d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/multiple-join-conditions.snippet.multiple-join-conditions.js" + "blob" : "30a5fc23e3f09bc870d8cdf46fdc153b50f2a171", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/merge-objects.snippet.merge-objects.js" }, { "blob" : "dab73cce571ffe9b24b95e74179b9cb3d681d7e4", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/multiple-join-conditions-output.sh" }, { - "blob" : "b9cce19c2b461ab7815fd4e22786065e01caaef3", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/uncorrelated-subquery.snippet.uncorrelated-subquery.js" + "blob" : "d93791e69a10ed0486149cce67f4c96168f55b8d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/multiple-join-conditions.snippet.multiple-join-conditions.js" }, { "blob" : "d8a22cfb2ccfdccfc8dcb347b9e31c3911d75c20", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/uncorrelated-subquery-output.sh" }, { - "blob" : "31e547b944eb980648d5dfbf8c5bb54a98e7e74f", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/concise-correlated-subquery.snippet.concise-correlated-subquery.js" + "blob" : "b9cce19c2b461ab7815fd4e22786065e01caaef3", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/uncorrelated-subquery.snippet.uncorrelated-subquery.js" }, { "blob" : "e2ee36b63708358cd1d288d1a579bd377f8378ec", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/concise-correlated-subquery-output.sh" + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/verbose-correlated-subquery-output.sh" }, { "blob" : "0dcb4423f0a2c831b3b545626af36ad900d40f78", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/verbose-correlated-subquery.snippet.verbose-correlated-subquery.js" }, { - "blob" : "e2ee36b63708358cd1d288d1a579bd377f8378ec", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/lookup/verbose-correlated-subquery-output.sh" + "blob" : "014bf59ce7b5e14587504f2bc7c452dfe6af6d14", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Lookup.snippet.comment-class.cs" + }, { + "blob" : "5be5e35f600566282e9b4f0465aedfe8382065d9", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Lookup.snippet.lookup-result-class.cs" + }, { + "blob" : "c86d0454a9d7d64f77e829adb9ea63c90ef1755e", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Lookup.snippet.lookup.cs" + }, { + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" + }, { + "blob" : "9770a03321f20bdbe2f8e14d2853148b03f1a018", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/LookupOutput.txt" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "lookup", "pageBlob" : "f8c2e0be29dc8e0908b09e4a5136b8dc63171c43", @@ -8693,64 +8110,46 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "ce280c78296606c7aacb1d313cf43674ce8a35a212825477f88c286188f09a47", - "text" : "db.aggregate( [\n {\n $documents: [\n { student_id: 1, scores: [ 0.75, 0.65, 0.73 ] },\n { student_id: 2, scores: [ 0.9, 0.88, 0.98 ] },\n { student_id: 3, scores: [ 0.9, 0.84, 0.93 ] }\n ]\n }, {\n $match: {\n scores: { $elemMatch: { $gte: 0.9 } }\n }\n }\n] )" + "sha256" : "d8ff9bd12d17d809d4e0a7a1087f7021638e2b42e2716f959429995f7796dc19", + "text" : "db.aggregate( [\n {\n $documents: [\n { student_id: 1, scores: [ 0.75, 0.65, 0.73 ] },\n { student_id: 2, scores: [ 0.9, 0.88, 0.98 ] },\n { student_id: 3, scores: [ 0.9, 0.84, 0.93 ] }\n ]\n }, {\n $match: {\n scores: { $elemMatch: { $gte: 0.9 } }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "abab672974a88d198bd880eae902757668e1b5249f64dda2b36ea9a2225678cd", - "text" : "[\n { student_id: 2, scores: [ 0.9, 0.88, 0.98 ] },\n { student_id: 3, scores: [ 0.9, 0.84, 0.93 ] }\n]" + "sha256" : "f0dec00ff61ed5135f1b0a7b21aeb8ecd0311cb03a8d21a71ff8416f3b45913f", + "text" : "[\n { student_id: 2, scores: [ 0.9, 0.88, 0.98 ] },\n { student_id: 3, scores: [ 0.9, 0.84, 0.93 ] }\n]\n" } ], - "detail" : null, + "detail" : "COLLECTION_REQUIRED", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "matchArrayElements", "title" : "Match Array Elements" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "8a430a89d3c2edbb9a1e0e5c8e49921ad0376919", - "path" : "content/manual/manual/source/includes/extracts-views.yaml" - }, { - "blob" : "a6b6e20a100cc7a045ae2d382c5cbe38f0904500", - "path" : "content/manual/manual/source/includes/text-search-legacy-atlas-section.rst" - }, { - "blob" : "4f64cb03e66bdd5969e83c3ddf2d7fa635107d09", - "path" : "content/manual/manual/source/includes/text-search-legacy-atlas-section-main.rst" + "blob" : "f9a768a313ebe6703bbbf8a0cf6fbb695a58d02d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/match/count-output.sh" }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "e3e15bd109821121d53b2b2bf6d3fe7c2b7cfcfb", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/match/count.snippet.count.js" }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blob" : "94dc1409429dd993362000a6e7473939db4b7bb2", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/match/elem-match-output.sh" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "34df92e3b8090b6c852300e8f4ac3dcf839daaca", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/match/elem-match.snippet.elem-match.js" }, { "blob" : "90826a19abcff7244e8cab9b7fda9220baa8e7de", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/match/equality-match.snippet.equality-match.js" }, { - "blob" : "e3e15bd109821121d53b2b2bf6d3fe7c2b7cfcfb", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/match/count.snippet.count.js" + "blob" : "7eb7fe5fce64afe1418fd460d331aa49108f4248", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Match.snippet.match.cs" }, { - "blob" : "f9a768a313ebe6703bbbf8a0cf6fbb695a58d02d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/match/count-output.sh" + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" }, { - "blob" : "34df92e3b8090b6c852300e8f4ac3dcf839daaca", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/match/elem-match.snippet.elem-match.js" + "blob" : "40ed323f26ea91209f8d743f366b69979f36db83", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/MatchOutput.txt" }, { - "blob" : "94dc1409429dd993362000a6e7473939db4b7bb2", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/match/elem-match-output.sh" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "match", "pageBlob" : "969a7d0dac3a9bb7880a549f0dace9a1fec9f31a", @@ -8764,71 +8163,219 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "0b8c38bc0cb8bfa1dd7d46446a1a31898fb3e717d9b0525158fe3eabd7657b61", - "text" : "db.movies.aggregate( [\n { $match: { metacritic: 100, rated: { $ne: null },\n year: { $lte: 1972 } } },\n { $group: { _id: { year: \"$year\", rated: \"$rated\" },\n count: { $sum: 1 } } },\n { $merge : { into: \"movieRatingSummary\", on: \"_id\",\n whenMatched: \"replace\", whenNotMatched: \"insert\" } }\n] )" - }, { - "role" : "EXPECTED", - "sha256" : "226b294bd763b0a9aa5e5cb2c0c743e34efb3462b6eefaf2bde11a424ff9778f", - "text" : "[\n { _id: { year: 1939, rated: 'PASSED' }, count: 1 },\n { _id: { year: 1962, rated: 'PG' }, count: 1 },\n { _id: { year: 1963, rated: 'PG' }, count: 1 },\n { _id: { year: 1970, rated: 'R' }, count: 1 },\n { _id: { year: 1972, rated: 'R' }, count: 1 }\n]" + "sha256" : "3e1b19c5bba77b08ea6a2736e8d91b31e58aa4ac5fea7a9fd981133791c93752", + "text" : "db.movies.aggregate( [\n { $match: { metacritic: 100, rated: { $ne: null },\n year: { $lte: 1972 } } },\n { $group: { _id: { year: \"$year\", rated: \"$rated\" },\n count: { $sum: 1 } } },\n { $merge : { into: \"movieRatingSummary\", on: \"_id\",\n whenMatched: \"replace\", whenNotMatched: \"insert\" } }\n] )\n" } ], "detail" : null, "name" : "Summarize Ratings into Another Collection", "owner" : null, "status" : "UNOWNED", "stem" : "summarizeRatingsIntoAnotherCollection", - "title" : "main" - } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" + "title" : "On-Demand Materialized View: Initial Creation" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "47ab092aeefcc156ab9ace5329c7c4961d1737909dcd41025c9e781720f3a91f", + "text" : "db.movieRatingSummary.find().sort(\n { _id: 1 } )\n" + }, { + "role" : "EXPECTED", + "sha256" : "f3b220cfc7ab8849badbfc2caf62650639cab6bb5c7b0d9e8772392f49e7912d", + "text" : "[\n { _id: { year: 1939, rated: 'PASSED' }, count: 1 },\n { _id: { year: 1962, rated: 'PG' }, count: 1 },\n { _id: { year: 1963, rated: 'PG' }, count: 1 },\n { _id: { year: 1970, rated: 'R' }, count: 1 },\n { _id: { year: 1972, rated: 'R' }, count: 1 }\n]\n" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "onDemandMaterializedViewInitialCreation", + "title" : "On-Demand Materialized View: Initial Creation" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "facc7ecfbdaa80252905a3ae66c0813ca3e1f85e525c41bb756e96f122e1c449", + "text" : "db.movies.aggregate( [\n { $match: { metacritic: 100, rated: { $ne: null },\n year: { $gte: 1963 } } },\n { $group: { _id: { year: \"$year\", rated: \"$rated\" },\n count: { $sum: 1 } } },\n { $merge : { into: \"movieRatingSummary\", on: \"_id\",\n whenMatched: \"replace\", whenNotMatched: \"insert\" } }\n] )\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "onDemandMaterializedViewUpdateReplaceData", + "title" : "On-Demand Materialized View: Update/Replace Data" }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "47ab092aeefcc156ab9ace5329c7c4961d1737909dcd41025c9e781720f3a91f", + "text" : "db.movieRatingSummary.find().sort(\n { _id: 1 } )\n" + }, { + "role" : "EXPECTED", + "sha256" : "84a4c1f0d92c84c82af7d6d803790d539bc1e53613d8b6efd7be540115465cc4", + "text" : "[\n { _id: { year: 1939, rated: 'PASSED' }, count: 1 },\n { _id: { year: 1962, rated: 'PG' }, count: 1 },\n { _id: { year: 1963, rated: 'PG' }, count: 1 },\n { _id: { year: 1970, rated: 'R' }, count: 1 },\n { _id: { year: 1972, rated: 'R' }, count: 1 },\n { _id: { year: 1982, rated: 'R' }, count: 1 },\n { _id: { year: 2014, rated: 'R' }, count: 1 }\n]\n" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "onDemandMaterializedViewUpdateReplaceData", + "title" : "On-Demand Materialized View: Update/Replace Data" }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" + "blocks" : [ { + "role" : "INDEX", + "sha256" : "cbc237acc82857325576e651599f0fbde0b0bff1fec4407a3a30d0b79c794c73", + "text" : "db.movieArchive.createIndex(\n { year: 1 }, { unique: true } )\n" + }, { + "role" : "ACTION", + "sha256" : "4c11eda17f4092073548b12a98823fb90d965b63fff743b895565dbbe1b574c7", + "text" : "db.movies.aggregate( [\n { $match: { metacritic: 100, rated: { $ne: null },\n year: { $gte: 1963 } } },\n { $group: { _id: \"$year\",\n titles: { $push: \"$title\" } } },\n { $project: { _id: 0, year: \"$_id\", titles: 1 } },\n { $merge : { into: \"movieArchive\", on: \"year\",\n whenMatched: \"fail\" } }\n] )\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "onlyInsertNewData", + "title" : "Only Insert New Data" }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "c1340aae31ddfda0474e5ad95aebac468c415f59959d9893a8cc23b67ccca715", + "text" : "db.movies.aggregate( [\n { $match: { metacritic: 100, rated: { $ne: null },\n year: { $gte: 1970, $lte: 1972 } } },\n { $group: { _id: \"$year\", movieCount: { $sum: 1 } } },\n { $merge : { into: \"yearlyStats\", on: \"_id\",\n whenMatched: \"merge\", whenNotMatched: \"insert\" } }\n])\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "mergeResultsFromMultipleCollections", + "title" : "Merge Results from Multiple Collections" }, { - "blob" : "657021f727d19233ff6c0114a67e9d73d4dcadd5", - "path" : "content/manual/manual/source/includes/merge-stage-variables.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "2f5d3a96ac6ad96f53765aef767cf7f978955e62abd6b00542b8139488b86fef", + "text" : "db.yearlyStats.find().sort( { _id: 1 } )\n" + }, { + "role" : "EXPECTED", + "sha256" : "1b642279507416bfc099eb7aa4970fba5b00107e259140c60ca471d8a54581de", + "text" : "[\n { _id: 1970, movieCount: 1 },\n { _id: 1972, movieCount: 1 }\n]\n" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "mergeResultsFromMultipleCollections", + "title" : "Merge Results from Multiple Collections" }, { - "blob" : "ccd941fd68c00331ab137da2b86fd8a05411ee81", - "path" : "content/manual/manual/source/includes/fact-merge-same-collection-warning.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "096b5ac5b751f44a9bcd8237a102eb02ab4d1ed493bd990592f9f9f9422f2221", + "text" : "db.comments.aggregate( [\n { $match: { date: { $gte: new Date(\"1970-01-01\"),\n $lt: new Date(\"1973-01-01\") } } },\n { $group: { _id: { $year: \"$date\" },\n commentCount: { $sum: 1 } } },\n { $merge : { into: \"yearlyStats\", on: \"_id\",\n whenMatched: \"merge\", whenNotMatched: \"insert\" } }\n])\n" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "mergeResultsFromMultipleCollections", + "title" : "Merge Results from Multiple Collections" }, { - "blob" : "dc1e96a90ddebf88b42ea1b6e6e607e631f6d41c", - "path" : "content/manual/manual/source/includes/fact-merge-same-collection-behavior.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "2f5d3a96ac6ad96f53765aef767cf7f978955e62abd6b00542b8139488b86fef", + "text" : "db.yearlyStats.find().sort( { _id: 1 } )\n" + }, { + "role" : "EXPECTED", + "sha256" : "021234461674cb1c2535b16abdcaf337f2cad266476823f17731258453b9ab82", + "text" : "[\n { _id: 1970, movieCount: 1, commentCount: 889 },\n { _id: 1971, commentCount: 825 },\n { _id: 1972, movieCount: 1, commentCount: 863 }\n]\n" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "mergeResultsFromMultipleCollections", + "title" : "Merge Results from Multiple Collections" }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "633643224f2d0b3e3d1d92dabf39742903db933372f4703f40be929871a69505", + "text" : "db.comments.aggregate([\n { $match: { date: { $gte: new Date(\"1970-01-15\"),\n $lt: new Date(\"1970-01-16\") } } },\n { $group: { _id: { $dateToString: { format: \"%Y-%m\",\n date: \"$date\" } }, count: { $sum: 1 } } },\n { $merge: {\n into: \"monthlyCommentTotals\",\n on: \"_id\",\n whenMatched: [\n { $addFields: {\n count: { $add: [ \"$count\", \"$$new.count\" ] }\n } }\n ],\n whenNotMatched: \"insert\"\n } }\n])\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "useThePipelineToCustomizeTheMerge", + "title" : "Use the Pipeline to Customize the Merge" }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "8f9a466027791a0ef9e8d7339956ffdaac76019ff21bda623f45e1f308ef1106", + "text" : "db.monthlyCommentTotals.find()\n" + }, { + "role" : "EXPECTED", + "sha256" : "8e8576f2440a05fd0744443a297605e27be3e8f99d0dbf6f529f252e688d2338", + "text" : "[ { _id: '1970-01', count: 71 } ]\n" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "useThePipelineToCustomizeTheMerge", + "title" : "Use the Pipeline to Customize the Merge" }, { - "blob" : "f950a8177303de2db810a1ab7250ada0c9b9fb5d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/initial-creation.snippet.initial-creation.js" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "0b4e2ac776b235f4ab498449a81b10dd432d0e71a1ef7b90d8621f96ed652e10", + "text" : "db.movies.aggregate( [\n { $match: { title: \"The Godfather\" } },\n { $limit: 1 },\n { $project: { title: 1 } },\n { $merge: { into: \"movieDetails\", whenNotMatched: \"insert\" } }\n] )\n\ndb.runCommand( {\n aggregate: db.movieDetails.getName(),\n pipeline: [ {\n $merge: {\n into: db.movieDetails.getName(),\n let : { year: \"2023\" },\n whenMatched: [ {\n $addFields: { \"addedYear\": \"$$year\" }\n } ]\n }\n } ],\n cursor: {}\n} )\n\ndb.movieDetails.find()\n" + }, { + "role" : "EXPECTED", + "sha256" : "8e8de356fa27040659281781244ca1539f48ecd39bb1388cec82b4ae447b00ad", + "text" : "[ { _id: ..., title: 'The Godfather', addedYear: '2023' } ]\n" + } ], + "detail" : "COLLECTION_REQUIRED", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "useVariablesDefinedInTheMergeStage", + "title" : "Use Variables Defined in the Merge Stage" }, { - "blob" : "47035a1cb807370e4020d5fe9bd558602ff436a8", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/initial-creation-find.snippet.initial-creation-find.js" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "4175cf600fe92a814766361699bddee21fd41fd75ab20c3518133c3f3ccc8efc", + "text" : "db.movies.aggregate( [\n { $match: { title: \"The Godfather\" } },\n { $limit: 1 },\n { $project: { title: 1 } },\n { $merge: { into: \"movieDetails\", whenNotMatched: \"insert\" } }\n] )\n\ndb.runCommand( {\n aggregate: db.movieDetails.getName(),\n pipeline: [ {\n $merge: {\n into: db.movieDetails.getName(),\n whenMatched: [ {\n $addFields: { \"addedYear\": \"$$year\" }\n } ]\n }\n } ],\n cursor: {},\n let : { year: \"2023\" }\n} )\n\ndb.movieDetails.find()\n" + }, { + "role" : "EXPECTED", + "sha256" : "8e8de356fa27040659281781244ca1539f48ecd39bb1388cec82b4ae447b00ad", + "text" : "[ { _id: ..., title: 'The Godfather', addedYear: '2023' } ]\n" + } ], + "detail" : "COLLECTION_REQUIRED", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "useVariablesDefinedInTheAggregateCommand", + "title" : "Use Variables Defined in the Aggregate Command" }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "af672e2f6a254cc6b8aaafedb92f47a97b840af631e0bb411744b65b8e18426f", + "text" : "db.movies.aggregate( [\n { $match: { title: \"The Godfather\" } },\n { $limit: 1 },\n { $project: { title: 1 } },\n { $merge: { into: \"movieDetails\", whenNotMatched: \"insert\" } }\n] )\n\ndb.runCommand( {\n aggregate: db.movieDetails.getName(),\n pipeline: [ {\n $merge: {\n into: db.movieDetails.getName(),\n let : { year: \"2023\" },\n whenMatched: [ {\n $addFields: { \"addedYear\": \"$$year\" }\n } ]\n }\n } ],\n cursor: {},\n let : { year: \"2019\" }\n} )\n\ndb.movieDetails.find()\n" + }, { + "role" : "EXPECTED", + "sha256" : "8e8de356fa27040659281781244ca1539f48ecd39bb1388cec82b4ae447b00ad", + "text" : "[ { _id: ..., title: 'The Godfather', addedYear: '2023' } ]\n" + } ], + "detail" : "COLLECTION_REQUIRED", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "useVariablesDefinedInTheMergeStageAndAggregateCommand", + "title" : "Use Variables Defined in the Merge Stage and Aggregate Command" + } ], + "includes" : [ { "blob" : "d8816fcfec96acf2e599557cf74a36c97cbd6730", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/initial-creation-find-output.sh" - }, { - "blob" : "576fc8f76deb25ba7af30c76894cf384cc7562f1", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/update-replace.snippet.update-replace.js" }, { "blob" : "47035a1cb807370e4020d5fe9bd558602ff436a8", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/update-replace-find.snippet.update-replace-find.js" + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/initial-creation-find.snippet.initial-creation-find.js" }, { - "blob" : "71c7bfa8f9cc6a2c36a0e43bd452ceeb31ce1d93", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/update-replace-find-output.sh" + "blob" : "f950a8177303de2db810a1ab7250ada0c9b9fb5d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/initial-creation.snippet.initial-creation.js" }, { "blob" : "b315e89b83794116abdaf375a294bc74403e2406", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/insert-only-archive-index.snippet.insert-only-archive-index.js" }, { "blob" : "5c0d41b04475af24a0334699689a56343772b278", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/insert-only.snippet.insert-only.js" + }, { + "blob" : "bdd436a14b1ab31faa90a0bc296370f11896dce3", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/merge-combined-find-output.sh" + }, { + "blob" : "cf65cfe3ec82ba116609ddc38bc0e301b442b358", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/merge-comments.snippet.merge-comments.js" + }, { + "blob" : "cee1075d184a342803278516131912192680a929", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/merge-movies-find-output.sh" }, { "blob" : "ba898e674e513b7ab0fa1b77b0d4c9552d90004a", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/merge-movies.snippet.merge-movies.js" @@ -8836,41 +8383,53 @@ "blob" : "a4e78eb793303d1857843ad7fb675fa626084404", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/merge-yearly-stats-find.snippet.merge-yearly-stats-find.js" }, { - "blob" : "cee1075d184a342803278516131912192680a929", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/merge-movies-find-output.sh" - }, { - "blob" : "cf65cfe3ec82ba116609ddc38bc0e301b442b358", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/merge-comments.snippet.merge-comments.js" + "blob" : "d089c3c1c35039f24c1a1b8c3cec35558da7c787", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/pipeline-customize-find-output.sh" }, { - "blob" : "bdd436a14b1ab31faa90a0bc296370f11896dce3", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/merge-combined-find-output.sh" + "blob" : "a1bce5f6546d53a2b773ed1f23cf502e5c2b563e", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/pipeline-customize-find.snippet.pipeline-customize-find.js" }, { "blob" : "7832d5d2fd2176d42d3c6fd4cfdc0fb6f80b5d40", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/pipeline-customize.snippet.pipeline-customize.js" }, { - "blob" : "a1bce5f6546d53a2b773ed1f23cf502e5c2b563e", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/pipeline-customize-find.snippet.pipeline-customize-find.js" + "blob" : "71c7bfa8f9cc6a2c36a0e43bd452ceeb31ce1d93", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/update-replace-find-output.sh" }, { - "blob" : "d089c3c1c35039f24c1a1b8c3cec35558da7c787", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/pipeline-customize-find-output.sh" + "blob" : "47035a1cb807370e4020d5fe9bd558602ff436a8", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/update-replace-find.snippet.update-replace-find.js" }, { - "blob" : "487335f2f600c7dd226ff2b2cb055948fbfdc236", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/variables-merge-stage.snippet.variables-merge-stage.js" + "blob" : "576fc8f76deb25ba7af30c76894cf384cc7562f1", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/update-replace.snippet.update-replace.js" }, { "blob" : "f82df69829b09273b3be485f0c86e18854014906", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/variables-merge-stage-output.sh" + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/variables-aggregate-command-output.sh" }, { "blob" : "e2d976f0b9a96799410ac9d5f04132fd5014a669", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/variables-aggregate-command.snippet.variables-aggregate-command.js" }, { "blob" : "f82df69829b09273b3be485f0c86e18854014906", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/variables-aggregate-command-output.sh" + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/variables-merge-and-aggregate-output.sh" }, { "blob" : "3d554f6ee5dd80dbddcc6b9256372f4f1e3a9207", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/variables-merge-and-aggregate.snippet.variables-merge-and-aggregate.js" }, { "blob" : "f82df69829b09273b3be485f0c86e18854014906", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/variables-merge-and-aggregate-output.sh" + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/variables-merge-stage-output.sh" + }, { + "blob" : "487335f2f600c7dd226ff2b2cb055948fbfdc236", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/merge/variables-merge-stage.snippet.variables-merge-stage.js" + }, { + "blob" : "57e453ad1477438186f5ec9ec3d401ad4168de32", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Merge.snippet.merge.cs" + }, { + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" + }, { + "blob" : "35f8fbb6251ea1edf1e281b98e487b0dd2a3a6bf", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/MergeOutput.txt" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "merge", "pageBlob" : "6154426511a893c23664d8eb81e5ccca03331a2c", @@ -8884,12 +8443,8 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "dc6446d4c5c1d9b3f0a149e0e45cdd07a95ad82c4ef1bd7a746b5fdd0d405877", - "text" : "db.movies.aggregate( [\n { $match : { runtime : { $gt : 1000 } } },\n { $group : { _id : \"$year\", movies: { $push: \"$title\" } } },\n { $out : \"movies_by_year\" }\n] )" - }, { - "role" : "EXPECTED", - "sha256" : "7945d46ec8e1b91e7298068c329a1d0756c6532315d17d12ecb0326a176d28ee", - "text" : "[\n { _id: 1978, movies: [ 'Centennial' ] },\n { _id: 1994, movies: [ 'Baseball' ] }\n]" + "sha256" : "ea3f05e954589b040a8b1f4ca2c77b4ddeb3d72a8ce50c374ec895deb2eb6f06", + "text" : "db.movies.aggregate( [\n { $match : { runtime : { $gt : 1000 } } },\n { $group : { _id : \"$year\", movies: { $push: \"$title\" } } },\n { $out : \"movies_by_year\" }\n] )\n" } ], "detail" : null, "owner" : null, @@ -8899,61 +8454,75 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "8a3b8d7d13690755817f5dcf2e74eddccb563883a6aac2ff6ee67beb5515c88b", - "text" : "db.movies.aggregate( [\n { $match : { runtime : { $gt : 1000 } } },\n { $group : { _id : \"$year\", movies: { $push: \"$title\" } } },\n { $out : { db: \"reporting\", coll: \"movies_by_year\" } }\n] )" + "sha256" : "7a644059d2d56e403ffd6832aa28cbee59ad576f68cf6d6b0b968b9984f7082f", + "text" : "db.movies_by_year.find().sort( { _id: 1 } )\n" }, { "role" : "EXPECTED", - "sha256" : "7945d46ec8e1b91e7298068c329a1d0756c6532315d17d12ecb0326a176d28ee", - "text" : "[\n { _id: 1978, movies: [ 'Centennial' ] },\n { _id: 1994, movies: [ 'Baseball' ] }\n]" + "sha256" : "cd9a71a57747a83d1c4272d2b67caf8e4dd9bd7739d314489dcfa4ac9ce4b216", + "text" : "[\n { _id: 1978, movies: [ 'Centennial' ] },\n { _id: 1994, movies: [ 'Baseball' ] }\n]\n" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "outputToSameDatabase", + "title" : "Output to Same Database" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "7b40fedff6bfd426a57c2d68ce525df638a354d5549b724976765ee8e0e3c7dd", + "text" : "db.movies.aggregate( [\n { $match : { runtime : { $gt : 1000 } } },\n { $group : { _id : \"$year\", movies: { $push: \"$title\" } } },\n { $out : { db: \"reporting\", coll: \"movies_by_year\" } }\n] )\n" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", "stem" : "outputToADifferentDatabase", "title" : "Output to a Different Database" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "7a644059d2d56e403ffd6832aa28cbee59ad576f68cf6d6b0b968b9984f7082f", + "text" : "db.movies_by_year.find().sort( { _id: 1 } )\n" + }, { + "role" : "EXPECTED", + "sha256" : "cd9a71a57747a83d1c4272d2b67caf8e4dd9bd7739d314489dcfa4ac9ce4b216", + "text" : "[\n { _id: 1978, movies: [ 'Centennial' ] },\n { _id: 1994, movies: [ 'Baseball' ] }\n]\n" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "outputToADifferentDatabase", + "title" : "Output to a Different Database" } ], "includes" : [ { - "blob" : "936fa3f6b03e3c0b4bf9308cb33572f71637657f", - "path" : "content/manual/manual/source/includes/time-series/fact-meta-field-description.rst" - }, { - "blob" : "fff173afd813fe724920312eb09523e8b727013f", - "path" : "content/manual/manual/source/includes/time-series/fact-granularity-field-description.rst" - }, { - "blob" : "9c945ddb1539b96eaa83f4d2c2c0d0fb5b437eec", - "path" : "content/manual/manual/source/includes/time-series/fact-bucketmaxspanseconds-field-description.rst" - }, { - "blob" : "32dd8ed424e7a6745f39671f93ab7f5af0c9db5b", - "path" : "content/manual/manual/source/includes/time-series/fact-bucketroundingseconds-field-description.rst" + "blob" : "01d306ee0e35f5940f352d389637c81a05282d97", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/out/out-different-db-find-output.sh" }, { - "blob" : "2dc814233b0493cb3e4f569d98e74401da0ac1ce", - "path" : "content/manual/manual/source/includes/fact-aggregate-readConcern.rst" + "blob" : "2d6566c33d10a0eaa683fd3b76d12b028a3fffe3", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/out/out-different-db-find.snippet.out-different-db-find.js" }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "046044e59d84db2c3d69e937e7d374923539f9dc", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/out/out-different-db.snippet.out-different-db.js" }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blob" : "01d306ee0e35f5940f352d389637c81a05282d97", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/out/out-same-db-find-output.sh" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "2d6566c33d10a0eaa683fd3b76d12b028a3fffe3", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/out/out-same-db-find.snippet.out-same-db-find.js" }, { "blob" : "6e3da60157a47c06f31d3d222d3c596a00e477f1", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/out/out-same-db.snippet.out-same-db.js" }, { - "blob" : "2d6566c33d10a0eaa683fd3b76d12b028a3fffe3", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/out/out-same-db-find.snippet.out-same-db-find.js" - }, { - "blob" : "01d306ee0e35f5940f352d389637c81a05282d97", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/out/out-same-db-find-output.sh" + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" }, { - "blob" : "046044e59d84db2c3d69e937e7d374923539f9dc", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/out/out-different-db.snippet.out-different-db.js" + "blob" : "9916e94374ec00df1fbec4cfde83acb5b3261540", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Out.snippet.out.cs" }, { - "blob" : "2d6566c33d10a0eaa683fd3b76d12b028a3fffe3", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/out/out-different-db-find.snippet.out-different-db-find.js" + "blob" : "48a8182a30062255c9d2795f1f20bd258bd72c69", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/OutOutput.txt" }, { - "blob" : "01d306ee0e35f5940f352d389637c81a05282d97", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/out/out-different-db-find-output.sh" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "out", "pageBlob" : "cd34cd6cbc4c117defea107a7acf2af6002b525c", @@ -8965,34 +8534,21 @@ }, { "context" : "aggregation/stages", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "765ee31913796b69459dc41e9283d927ced627ebb30433792b28a79a25507816", - "text" : "db.orders.find( { item: \"abc\", price: { $gte: Decimal128(\"10\") } } )\ndb.orders.find( { item: \"abc\", price: { $gte: Decimal128(\"5\") } } )\ndb.orders.find( { quantity: { $gte: 20 } } )\ndb.orders.find( { quantity: { $gte: 5 }, type: \"apparel\" } )" - }, { - "role" : "DATA", - "sha256" : "b3d6e7b032a3c21453fb20e7eaff7a3eadc87ad5e4527b3ec4fa8c3934ac96e4", - "text" : "db.orders.insertMany( [\n { \"_id\" : 1, \"item\" : \"abc\", \"price\" : Decimal128(\"12\"), \"quantity\" : 2, \"type\": \"apparel\" },\n { \"_id\" : 2, \"item\" : \"jkl\", \"price\" : Decimal128(\"20\"), \"quantity\" : 1, \"type\": \"electronics\" },\n { \"_id\" : 3, \"item\" : \"abc\", \"price\" : Decimal128(\"10\"), \"quantity\" : 5, \"type\": \"apparel\" },\n { \"_id\" : 4, \"item\" : \"abc\", \"price\" : Decimal128(\"8\"), \"quantity\" : 10, \"type\": \"apparel\" },\n { \"_id\" : 5, \"item\" : \"jkl\", \"price\" : Decimal128(\"15\"), \"quantity\" : 15, \"type\": \"electronics\" }\n] )" - } ], - "detail" : null, - "name" : "Populate the Plan Cache", + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", - "stem" : "populateThePlanCache", + "status" : "UNSUPPORTED", + "stem" : null, "title" : "main" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "7f5d9d441145aefd8e06a2d42867dd51e9a9560e7cff78874805ac80da65193d", - "text" : "db.orders.aggregate( [ \n { $planCacheStats: { } }\n] )" - }, { "role" : "DATA", "sha256" : "b3d6e7b032a3c21453fb20e7eaff7a3eadc87ad5e4527b3ec4fa8c3934ac96e4", "text" : "db.orders.insertMany( [\n { \"_id\" : 1, \"item\" : \"abc\", \"price\" : Decimal128(\"12\"), \"quantity\" : 2, \"type\": \"apparel\" },\n { \"_id\" : 2, \"item\" : \"jkl\", \"price\" : Decimal128(\"20\"), \"quantity\" : 1, \"type\": \"electronics\" },\n { \"_id\" : 3, \"item\" : \"abc\", \"price\" : Decimal128(\"10\"), \"quantity\" : 5, \"type\": \"apparel\" },\n { \"_id\" : 4, \"item\" : \"abc\", \"price\" : Decimal128(\"8\"), \"quantity\" : 10, \"type\": \"apparel\" },\n { \"_id\" : 5, \"item\" : \"jkl\", \"price\" : Decimal128(\"15\"), \"quantity\" : 15, \"type\": \"electronics\" }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "f8cd248570c0baa2d988a29243d719766009b6b8d29ab5039f21841ebb3dfeee", - "text" : "[\n { // Plan Cache Entry 1\n version: '2',\n planCacheShapeHash: '478AD696',\n planCacheKey: '21AE23AD',\n isActive: true,\n works: Long(\"7\"),\n timeOfCreation: ISODate(\"2023-05-22T20:33:49.031Z\"),\n cachedPlan: {\n ...\n },\n indexFilterSet: false,\n isPinned: false,\n estimatedSizeBytes: Long(\"8194\"),\n host: 'mongodb1.example.net:27018'\n },\n { // Plan Cache Entry 2\n version: '2',\n planCacheShapeHash: '3D8AFDC6',\n planCacheKey: '1C2C4360',\n isActive: true,\n works: Long(\"6\"),\n timeOfCreation: ISODate(\"2023-05-22T20:33:50.584Z\"),\n cachedPlan: {\n ...\n },\n indexFilterSet: false,\n isPinned: false,\n estimatedSizeBytes: Long(\"11547\"),\n host: 'mongodb1.example.net:27018'\n },\n { // Plan Cache Entry 3\n version: '2',\n planCacheShapeHash: '27285F9B',\n planCacheKey: '20BB9404',\n isActive: true,\n works: Long(\"1\"),\n timeOfCreation: ISODate(\"2023-05-22T20:33:49.051Z\"),\n cachedPlan: {\n ...\n },\n indexFilterSet: false,\n isPinned: false,\n estimatedSizeBytes: Long(\"7406\"),\n host: 'mongodb1.example.net:27018'\n },\n { // Plan Cache Entry 4\n version: '2',\n planCacheShapeHash: '478AD696',\n planCacheKey: 'B1435201',\n isActive: true,\n works: Long(\"5\"),\n timeOfCreation: ISODate(\"2023-05-22T20:33:49.009Z\"),\n cachedPlan: {\n ...\n },\n indexFilterSet: false,\n isPinned: false,\n estimatedSizeBytes: Long(\"7415\"),\n host: 'mongodb1.example.net:27018'\n }\n ]," + "role" : "ACTION", + "sha256" : "89b5e2674ac3b3c45793136dad844890e1b53360ebf6cb15ecd32ed2fc9dbc9f", + "text" : "db.orders.aggregate( [\n { $planCacheStats: { } }\n] )" } ], "detail" : null, "owner" : null, @@ -9001,17 +8557,13 @@ "title" : "Return Information for All Entries in the Query Cache" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "41f810575e2a2f27f90e5db0ca0f282d533759c52329575ed1c53c37f3582475", - "text" : "db.orders.aggregate( [\n { $planCacheStats: { } },\n { $match: { planCacheKey: \"B1435201\"} }\n] )" - }, { "role" : "DATA", "sha256" : "b3d6e7b032a3c21453fb20e7eaff7a3eadc87ad5e4527b3ec4fa8c3934ac96e4", "text" : "db.orders.insertMany( [\n { \"_id\" : 1, \"item\" : \"abc\", \"price\" : Decimal128(\"12\"), \"quantity\" : 2, \"type\": \"apparel\" },\n { \"_id\" : 2, \"item\" : \"jkl\", \"price\" : Decimal128(\"20\"), \"quantity\" : 1, \"type\": \"electronics\" },\n { \"_id\" : 3, \"item\" : \"abc\", \"price\" : Decimal128(\"10\"), \"quantity\" : 5, \"type\": \"apparel\" },\n { \"_id\" : 4, \"item\" : \"abc\", \"price\" : Decimal128(\"8\"), \"quantity\" : 10, \"type\": \"apparel\" },\n { \"_id\" : 5, \"item\" : \"jkl\", \"price\" : Decimal128(\"15\"), \"quantity\" : 15, \"type\": \"electronics\" }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "5c3e32c35b5ea9744cd8ce798095e39540c776bf1e10ad2dc6503afd621a2e52", - "text" : "[\n {\n version: '2',\n planCacheShapeHash: '478AD696',\n planCacheKey: 'B1435201',\n isActive: true,\n works: Long(\"5\"),\n timeOfCreation: ISODate(\"2023-05-22T20:33:49.009Z\"),\n cachedPlan: {\n slots: '$$RESULT=s11 env: { s3 = 1684787629009 (NOW), s6 = Nothing, s5 = Nothing, s1 = TimeZoneDatabase(Asia/Kuwait...Etc/UCT) (timeZoneDB), s10 = {\"item\" : 1, \"price\" : 1}, s2 = Nothing (SEARCH_META) }',\n stages: '[2] nlj inner [] [s4, s7, s8, s9, s10] \\n' +\n ' left \\n' +\n ' [1] cfilter {(exists(s5) && exists(s6))} \\n' +\n ' [1] ixseek s5 s6 s9 s4 s7 s8 [] @\"358822b7-c129-47b7-ad7f-40017a51b03c\" @\"item_1_price_1\" true \\n' +\n ' right \\n' +\n ' [2] limit 1 \\n' +\n ' [2] seek s4 s11 s12 s7 s8 s9 s10 none none [] @\"358822b7-c129-47b7-ad7f-40017a51b03c\" true false \\n'\n },\n indexFilterSet: false,\n isPinned: false,\n estimatedSizeBytes: Long(\"7415\"),\n host: 'mongodb1.example.net:27018'\n }\n]" + "role" : "ACTION", + "sha256" : "41f810575e2a2f27f90e5db0ca0f282d533759c52329575ed1c53c37f3582475", + "text" : "db.orders.aggregate( [\n { $planCacheStats: { } },\n { $match: { planCacheKey: \"B1435201\"} }\n] )" } ], "detail" : null, "owner" : null, @@ -9020,41 +8572,8 @@ "title" : "Find Cache Entry Details for a Query Hash" } ], "includes" : [ { - "blob" : "70e3e943c18446a512a24b2712ce859ad2772527", - "path" : "content/manual/manual/source/includes/planCacheStats/version.rst" - }, { - "blob" : "dc6f3eedb0b701b87eaff2981b86503845434abd", - "path" : "content/manual/manual/source/includes/planCacheStats/queryHash.rst" - }, { - "blob" : "19520cfdec40cebb5132b069bed9bfc65edd4cea", - "path" : "content/manual/manual/source/includes/plan-cache-rename.rst" - }, { - "blob" : "617bd3d9ef4e05afe1c06f89ee1969979092f0ff", - "path" : "content/manual/manual/source/includes/planCacheStats/planCacheKey.rst" - }, { - "blob" : "681faca7067091f4aa52160b47abbe0b990027b0", - "path" : "content/manual/manual/source/includes/planCacheStats/cachedPlan.rst" - }, { - "blob" : "743bc4ce8b9a70bef68f7743e1fa6813e0bc0e59", - "path" : "content/manual/manual/source/includes/planCacheStats-querySettings.rst" - }, { - "blob" : "35ecee56f23c42e350371ae43c9f84dc9658f501", - "path" : "content/manual/manual/source/includes/planCacheStats/host.rst" - }, { - "blob" : "359025bdf7ded79c5a453aa12eecdbec668089c4", - "path" : "content/manual/manual/source/includes/planCacheStats/isActive.rst" - }, { - "blob" : "38ceb08d49c0d28e7c8ae2e028c854938894bf08", - "path" : "content/manual/manual/source/includes/planCacheStats/works.rst" - }, { - "blob" : "1c25a3b7e3de6af12555861208b4396527f08be5", - "path" : "content/manual/manual/source/includes/planCacheStats/indexFilterSet.rst" - }, { - "blob" : "bda59c9e47986f7b01ea5eb03365ccf993a1398e", - "path" : "content/manual/manual/source/includes/planCacheStats/estimatedSizeBytes.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "planCacheStats", "pageBlob" : "ba70d2f0a94a12546a83b861dc17e04191a74998", @@ -9082,8 +8601,8 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "59e627323058a2882a3e643f9d89b44aa4bd5c17d185dbec6f9bfe594ea76e9e", - "text" : "db.movies.aggregate( [\n { $match: { title: \"The Great Train Robbery\" } },\n { $project : { \"rated\": 0 } },\n { $limit: 1 }\n] )" + "sha256" : "36dbf359f9b806fbffdea7bb83f3bfc5e8354d78d101b5a48bd08ba1c8d01f55", + "text" : "db.movies.aggregate( [\n { $match: { title: \"The Great Train Robbery\" } },\n { $project : { \"rated\": 0 } },\n { $limit: 1 }\n] )\n" } ], "detail" : null, "owner" : null, @@ -9093,17 +8612,34 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "872ff735f0e1eeda994119753540ae2f5c565c97f8f203190983518573b70787", - "text" : "db.movies.aggregate( [\n { $match: { title: \"The Great Train Robbery\" } },\n { $project: { \"imdb.id\": 0, \"type\": 0 } },\n { $limit: 1 }\n] )" + "sha256" : "bc9e5846612ed185f1e844e17bf3b7b56bd9765ec58c0b2c340ddc5402f37d7e", + "text" : "db.movies.aggregate( [\n { $match: { title: \"The Great Train Robbery\" } },\n { $project: { \"imdb.id\": 0, \"type\": 0 } },\n { $limit: 1 }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "965ff9dadbb574e766ffec53960958b223b012b3f4faa73fedd501b6836f1b93", + "text" : "[\n {\n _id: ObjectId('573a1390f29313caabcd42e8'),\n plot: 'A group of bandits stage a brazen train hold-up, only to find a determined posse hot on their heels.',\n genres: [ 'Short', 'Western' ],\n runtime: 11,\n cast: [\n 'A.C. Abadie',\n \"Gilbert M. 'Broncho Billy' Anderson\",\n 'George Barnes',\n 'Justus D. Barnes'\n ],\n poster: 'https://m.media-amazon.com/images/M/MV5BMTU3NjE5NzYtYTYyNS00MDVmLWIwYjgtMmYwYWIxZDYyNzU2XkEyXkFqcGdeQXVyNzQzNzQxNzI@._V1_SY1000_SX677_AL_.jpg',\n title: 'The Great Train Robbery',\n fullplot: \"Among the earliest existing films in American cinema - notable as the first film that presented a narrative story to tell - it depicts a group of cowboy outlaws who hold up a train and rob the passengers. They are then pursued by a Sheriff's posse. Several scenes have color included - all hand tinted.\",\n languages: [ 'English' ],\n released: ISODate('1903-12-01T00:00:00.000Z'),\n directors: [ 'Edwin S. Porter' ],\n rated: 'TV-G',\n awards: { wins: 1, nominations: 0, text: '1 win.' },\n lastupdated: '2015-08-13 00:27:59.177000000',\n year: 1903,\n imdb: { rating: 7.4, votes: 9847 },\n countries: [ 'USA' ],\n tomatoes: {\n viewer: { rating: 3.7, numReviews: 2559, meter: 75 },\n fresh: 6,\n critic: { rating: 7.6, numReviews: 6, meter: 100 },\n rotten: 0,\n lastUpdated: ISODate('2015-08-08T19:16:10.000Z')\n },\n num_mflix_comments: 0\n }\n]\n" + } ], + "detail" : null, + "name" : "Exclude an Embedded Field with Dot Notation", + "owner" : null, + "status" : "UNOWNED", + "stem" : "excludeAnEmbeddedFieldWithDotNotation", + "title" : "Exclude Fields from Embedded Documents" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "ffa88523b3f7a9f1cdd3bf100024fd67c73c882ddd76643cd809df5719138deb", + "text" : "db.movies.aggregate( [\n { $match: { title: \"The Great Train Robbery\" } },\n { $project: { \"imdb\": { \"id\": 0 }, \"type\" : 0 } },\n { $limit: 1 }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "c7ed6b3f89f8c231c0ec60e09c885195e85ce0d04eb0aa2fe323faaafee0578c", - "text" : "[\n {\n _id: ObjectId('573a1390f29313caabcd42e8'),\n plot: 'A group of bandits stage a brazen train hold-up, only to find a determined posse hot on their heels.',\n genres: [ 'Short', 'Western' ],\n runtime: 11,\n cast: [\n 'A.C. Abadie',\n \"Gilbert M. 'Broncho Billy' Anderson\",\n 'George Barnes',\n 'Justus D. Barnes'\n ],\n poster: 'https://m.media-amazon.com/images/M/MV5BMTU3NjE5NzYtYTYyNS00MDVmLWIwYjgtMmYwYWIxZDYyNzU2XkEyXkFqcGdeQXVyNzQzNzQxNzI@._V1_SY1000_SX677_AL_.jpg',\n title: 'The Great Train Robbery',\n fullplot: \"Among the earliest existing films in American cinema - notable as the first film that presented a narrative story to tell - it depicts a group of cowboy outlaws who hold up a train and rob the passengers. They are then pursued by a Sheriff's posse. Several scenes have color included - all hand tinted.\",\n languages: [ 'English' ],\n released: ISODate('1903-12-01T00:00:00.000Z'),\n directors: [ 'Edwin S. Porter' ],\n rated: 'TV-G',\n awards: { wins: 1, nominations: 0, text: '1 win.' },\n lastupdated: '2015-08-13 00:27:59.177000000',\n year: 1903,\n imdb: { rating: 7.4, votes: 9847 },\n countries: [ 'USA' ],\n tomatoes: {\n viewer: { rating: 3.7, numReviews: 2559, meter: 75 },\n fresh: 6,\n critic: { rating: 7.6, numReviews: 6, meter: 100 },\n rotten: 0,\n lastUpdated: ISODate('2015-08-08T19:16:10.000Z')\n },\n num_mflix_comments: 0\n }\n]" + "sha256" : "965ff9dadbb574e766ffec53960958b223b012b3f4faa73fedd501b6836f1b93", + "text" : "[\n {\n _id: ObjectId('573a1390f29313caabcd42e8'),\n plot: 'A group of bandits stage a brazen train hold-up, only to find a determined posse hot on their heels.',\n genres: [ 'Short', 'Western' ],\n runtime: 11,\n cast: [\n 'A.C. Abadie',\n \"Gilbert M. 'Broncho Billy' Anderson\",\n 'George Barnes',\n 'Justus D. Barnes'\n ],\n poster: 'https://m.media-amazon.com/images/M/MV5BMTU3NjE5NzYtYTYyNS00MDVmLWIwYjgtMmYwYWIxZDYyNzU2XkEyXkFqcGdeQXVyNzQzNzQxNzI@._V1_SY1000_SX677_AL_.jpg',\n title: 'The Great Train Robbery',\n fullplot: \"Among the earliest existing films in American cinema - notable as the first film that presented a narrative story to tell - it depicts a group of cowboy outlaws who hold up a train and rob the passengers. They are then pursued by a Sheriff's posse. Several scenes have color included - all hand tinted.\",\n languages: [ 'English' ],\n released: ISODate('1903-12-01T00:00:00.000Z'),\n directors: [ 'Edwin S. Porter' ],\n rated: 'TV-G',\n awards: { wins: 1, nominations: 0, text: '1 win.' },\n lastupdated: '2015-08-13 00:27:59.177000000',\n year: 1903,\n imdb: { rating: 7.4, votes: 9847 },\n countries: [ 'USA' ],\n tomatoes: {\n viewer: { rating: 3.7, numReviews: 2559, meter: 75 },\n fresh: 6,\n critic: { rating: 7.6, numReviews: 6, meter: 100 },\n rotten: 0,\n lastUpdated: ISODate('2015-08-08T19:16:10.000Z')\n },\n num_mflix_comments: 0\n }\n]\n" } ], "detail" : null, + "name" : "Exclude an Embedded Field with a Nested Document", "owner" : null, "status" : "UNOWNED", - "stem" : "excludeFieldsFromEmbeddedDocuments", + "stem" : "excludeAnEmbeddedFieldWithANestedDocument", "title" : "Exclude Fields from Embedded Documents" }, { "blocks" : [ ], @@ -9113,21 +8649,46 @@ "stem" : null, "title" : "Conditionally Exclude Fields" }, { - "blocks" : [ ], - "detail" : "reviewed owner: the AsStage fixture tests the same example built as a stage", - "owner" : "aggregation/stages/project/includeSpecificFieldsFromEmbeddedDocuments", - "status" : "OWNED", - "stem" : null, + "blocks" : [ { + "role" : "ACTION", + "sha256" : "9c35dfd848afeb3ec171c245311bc786d7927a67e8ad276d557faa52d15f4b0c", + "text" : "db.movies.aggregate( [\n { $match: { title: \"The Great Train Robbery\" } },\n { $project: { \"imdb.rating\": 1 } },\n { $limit: 1 }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "013d54bb1df0688ab590dc5f753badc72eca4afe3755950154139e1e0107c971", + "text" : "[\n {\n _id: ObjectId('573a1390f29313caabcd42e8'),\n imdb: { rating: 7.4 }\n }\n]\n" + } ], + "detail" : null, + "name" : "Include an Embedded Field with Dot Notation", + "owner" : null, + "status" : "UNOWNED", + "stem" : "includeAnEmbeddedFieldWithDotNotation", + "title" : "Include Specific Fields from Embedded Documents" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "e47aeb3bb067f2c7ec12485123b4181d97b1972439d92492693b5c44db88dfed", + "text" : "db.movies.aggregate( [\n { $match: { title: \"The Great Train Robbery\" } },\n { $project: { imdb: { rating: 1 } } },\n { $limit: 1 }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "013d54bb1df0688ab590dc5f753badc72eca4afe3755950154139e1e0107c971", + "text" : "[\n {\n _id: ObjectId('573a1390f29313caabcd42e8'),\n imdb: { rating: 7.4 }\n }\n]\n" + } ], + "detail" : null, + "name" : "Include an Embedded Field with a Nested Document", + "owner" : null, + "status" : "UNOWNED", + "stem" : "includeAnEmbeddedFieldWithANestedDocument", "title" : "Include Specific Fields from Embedded Documents" }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "2493829ec3b5bf7c8779c031bc7db003afc8333671b4a278d464e7d0cb49996b", - "text" : "db.movies.aggregate( [\n { $match: { title: \"The Great Train Robbery\" } },\n {\n $project: {\n title: 1,\n leadActor: { $arrayElemAt: [ \"$cast\", 0 ] },\n releaseYear: \"$year\"\n }\n },\n { $limit: 1 }\n] )" + "sha256" : "a60cebb162fa01994d2ab8a22d3c226ff741a7efc0ea712e16dfa9238ec5a106", + "text" : "db.movies.aggregate( [\n { $match: { title: \"The Great Train Robbery\" } },\n {\n $project: {\n title: 1,\n leadActor: { $arrayElemAt: [ \"$cast\", 0 ] },\n releaseYear: \"$year\"\n }\n },\n { $limit: 1 }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "92adbca936d701fcedc0e66b75346c091e3610e3899e36c26be2aebdcad1ef5a", - "text" : "[\n {\n _id: ObjectId('573a1390f29313caabcd42e8'),\n title: 'The Great Train Robbery',\n leadActor: 'A.C. Abadie',\n releaseYear: 1903\n }\n]" + "sha256" : "c84accbfdc3f974af327733681846147e62293467b1cef5eb27e1e3c666aa461", + "text" : "[\n {\n _id: ObjectId('573a1390f29313caabcd42e8'),\n title: 'The Great Train Robbery',\n leadActor: 'A.C. Abadie',\n releaseYear: 1903\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -9137,103 +8698,147 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "d813e08386d7bcfbcaf77560fdd895398f0483f603fc3c8625873c63a73e704e", - "text" : "db.movies.aggregate( [\n { $match: { title: \"The Great Train Robbery\" } },\n { $project: { myArray: [ \"$year\", \"$runtime\" ] } },\n { $limit: 1 }\n] )" + "sha256" : "645c17272ec42fa05029805ee61247e40a8272b2bb4b9321f32c7a9f9120a0eb", + "text" : "db.movies.aggregate( [\n { $match: { title: \"The Great Train Robbery\" } },\n { $project: { myArray: [ \"$year\", \"$runtime\" ] } },\n { $limit: 1 }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "df5d7de02d0027cb12cbf8c8c6b8697e249e4c549a8d1d7a4b977b739836ca80", + "text" : "[\n {\n _id: ObjectId('573a1390f29313caabcd42e8'),\n myArray: [ 1903, 11 ]\n }\n]\n" + } ], + "detail" : null, + "name" : "Project an Array of Fields", + "owner" : null, + "status" : "UNOWNED", + "stem" : "projectAnArrayOfFields", + "title" : "Project New Array Fields" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "b35cf2bed3d12a030f02661715b377c64960b89b179a918ce60965b55abb45fe", + "text" : "db.movies.aggregate( [\n { $match: { title: \"The Great Train Robbery\" } },\n { $project: { myArray: [ \"$year\", \"$runtime\", \"$someField\" ] } },\n { $limit: 1 }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "3a769a00eb6da0bd5e0b80f88555b362a2fa65afa7698559368c169a58d5d41f", - "text" : "[\n {\n _id: ObjectId('573a1390f29313caabcd42e8'),\n myArray: [ 1903, 11 ]\n }\n]" + "sha256" : "e76050c2203d9c82232e42a0a37a4414328b496f482daf3a4e6cf6761b910699", + "text" : "[\n {\n _id: ObjectId('573a1390f29313caabcd42e8'),\n myArray: [ 1903, 11, null ]\n }\n]\n" } ], "detail" : null, + "name" : "Project an Array with a Missing Field", "owner" : null, "status" : "UNOWNED", - "stem" : "projectNewArrayFields", + "stem" : "projectAnArrayWithAMissingField", "title" : "Project New Array Fields" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" + "blob" : "b42a892410ffdd2126655531cc3e2d565f203f58", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/computed-fields-output.sh" + }, { + "blob" : "38c54eaa8494b63deacfef62bb76c1fd7fd4bfc4", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/computed-fields.snippet.computed-fields.js" + }, { + "blob" : "5c6d3c0c6fc12280c2748530651bab581bba20eb", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/conditional-exclude-fields-output.sh" }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" + "blob" : "1176ae77a2aea48a896d9f878fe87aec97afbe60", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/conditional-exclude-fields.snippet.conditional-exclude-fields.js" + }, { + "blob" : "6e14acd7df4dfa6879ebb02674410908116fde86", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/exclude-embedded-fields-nested.snippet.exclude-embedded-fields-nested.js" }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" + "blob" : "f0b6a2e282a9992827c20431c83d1f81cd8d2292", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/exclude-embedded-fields-output.sh" }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" + "blob" : "bb5b525abec3189445389c77d698ffbc8044a06a", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/exclude-embedded-fields.snippet.exclude-embedded-fields.js" }, { - "blob" : "9292cd30b050f8fe7d3d81211819a02b393fb32c", - "path" : "content/manual/manual/source/includes/project-stage-and-array-index.rst" + "blob" : "f2b80bca3c9cb1d7d9d49e9cc32d36fa3f55d8c1", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/exclude-fields.snippet.exclude-fields.js" }, { - "blob" : "f85c68679566e409b13555faf3d1c6a140d082b9", - "path" : "content/manual/manual/source/includes/aggregation/fact-project-stage-placement.rst" + "blob" : "0f206d62d143bdb62ae5f3013b8c2b5a2995372b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/include-embedded-fields-nested.snippet.include-embedded-fields-nested.js" }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "f10b6ac18cd8ee813ae48a0e7570c174c75a77fa", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/include-embedded-fields-output.sh" }, { - "blob" : "679847ce034910ed9e898f4806cc83a7e1f6da59", - "path" : "content/manual/manual/source/includes/aggregation/agg-project-remove-fields-compare.rst" + "blob" : "847388a9c537707249e547121b6be346a35a18ae", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/include-embedded-fields.snippet.include-embedded-fields.js" }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blob" : "022737979328570f93b5a53e6b43275b6819e373", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/include-fields-output.sh" }, { "blob" : "0bcb6a4b7764cedd3f7c65ea006fd8d7ecbe684f", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/include-fields.snippet.include-fields.js" }, { - "blob" : "022737979328570f93b5a53e6b43275b6819e373", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/include-fields-output.sh" + "blob" : "83357c2a031134edd5ed7d4ca6bd0586cf3da82f", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/new-array-fields-null-output.sh" }, { - "blob" : "e0453f42f1188dd7cec300c3ab99b278e040cea5", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/suppress-id.snippet.suppress-id.js" + "blob" : "962a1ba619d31e0bc941f7727ad5e1d70d2abd4d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/new-array-fields-null.snippet.new-array-fields-null.js" + }, { + "blob" : "f1480e41dca6eff8e99a6144d8dc3247f4238634", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/new-array-fields-output.sh" + }, { + "blob" : "f093c765bda78f4cc15a070cc4825119b24260e8", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/new-array-fields.snippet.new-array-fields.js" }, { "blob" : "8f58f78de04c7606a3f956eff577b93b99fe6a56", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/suppress-id-output.sh" }, { - "blob" : "f2b80bca3c9cb1d7d9d49e9cc32d36fa3f55d8c1", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/exclude-fields.snippet.exclude-fields.js" + "blob" : "e0453f42f1188dd7cec300c3ab99b278e040cea5", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/suppress-id.snippet.suppress-id.js" }, { - "blob" : "bb5b525abec3189445389c77d698ffbc8044a06a", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/exclude-embedded-fields.snippet.exclude-embedded-fields.js" + "blob" : "5c2168af1a9bb00018cccda91f072d516a443d3b", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/ExcludeFieldsConditionalOutput.txt" }, { - "blob" : "f0b6a2e282a9992827c20431c83d1f81cd8d2292", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/exclude-embedded-fields-output.sh" + "blob" : "5f284c7f7933d361336f9934a744b0966cf5846b", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/ExcludeFieldsEmbeddedOutput.txt" }, { - "blob" : "6e14acd7df4dfa6879ebb02674410908116fde86", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/exclude-embedded-fields-nested.snippet.exclude-embedded-fields-nested.js" + "blob" : "5f284c7f7933d361336f9934a744b0966cf5846b", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/ExcludeFieldsOutput.txt" }, { - "blob" : "1176ae77a2aea48a896d9f878fe87aec97afbe60", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/conditional-exclude-fields.snippet.conditional-exclude-fields.js" + "blob" : "2eb3721deda002c6bdbb567ae77bf999bf64a230", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/ExcludeIdOutput.txt" }, { - "blob" : "5c6d3c0c6fc12280c2748530651bab581bba20eb", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/conditional-exclude-fields-output.sh" + "blob" : "8d48356777fe30ad1f189d086942cc9ef9488188", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/IncludeFieldsComputedOutput.txt" }, { - "blob" : "847388a9c537707249e547121b6be346a35a18ae", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/include-embedded-fields.snippet.include-embedded-fields.js" + "blob" : "367d19c2aa95a4e91bad2295a55a14f9002e07c6", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/IncludeOutput.txt" }, { - "blob" : "f10b6ac18cd8ee813ae48a0e7570c174c75a77fa", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/include-embedded-fields-output.sh" + "blob" : "5915745323f913a3f1b5d26a0de4e10130ec1395", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/NewArrayFieldsOutput.txt" }, { - "blob" : "0f206d62d143bdb62ae5f3013b8c2b5a2995372b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/include-embedded-fields-nested.snippet.include-embedded-fields-nested.js" + "blob" : "1ca9a18596377b663b46186d608cc8205717ac6f", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/NonExistentNewArrayFieldsOutput.txt" }, { - "blob" : "38c54eaa8494b63deacfef62bb76c1fd7fd4bfc4", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/computed-fields.snippet.computed-fields.js" + "blob" : "4095085ca4763bdaec98328737dc505bd9adb82e", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Project.snippet.exclude-fields-conditional.cs" }, { - "blob" : "b42a892410ffdd2126655531cc3e2d565f203f58", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/computed-fields-output.sh" + "blob" : "747dfd684791931f85e257c754ec45db96d830fa", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Project.snippet.exclude-fields-embedded.cs" }, { - "blob" : "f093c765bda78f4cc15a070cc4825119b24260e8", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/new-array-fields.snippet.new-array-fields.js" + "blob" : "f8176401ed9f9121be7f10c5668947aed84846c2", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Project.snippet.exclude-fields.cs" }, { - "blob" : "f1480e41dca6eff8e99a6144d8dc3247f4238634", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/new-array-fields-output.sh" + "blob" : "789356333cbceef8f5841576ce2f9552704368c3", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Project.snippet.exclude-id.cs" }, { - "blob" : "962a1ba619d31e0bc941f7727ad5e1d70d2abd4d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/new-array-fields-null.snippet.new-array-fields-null.js" + "blob" : "a87eacf36360ac5e880e576200ccd8f1b44b1081", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Project.snippet.include-fields-computed.cs" }, { - "blob" : "83357c2a031134edd5ed7d4ca6bd0586cf3da82f", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/project/new-array-fields-null-output.sh" + "blob" : "1380f9564720f5afc98f7caf53cc609a7f5a452e", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Project.snippet.include.cs" + }, { + "blob" : "41ffe0be2c4640945314369212cf9640fe0e37e5", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Project.snippet.new-array-fields.cs" + }, { + "blob" : "ca0e757cd054190037a07507e00591d15f93fa00", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Project.snippet.non-existent-new-array-fields.cs" + }, { + "blob" : "0bf3bd95ad6a1aeacd96d7fba7a32c4cc7a23498", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Project.snippet.projected-movie-class.cs" + }, { + "blob" : "05338312cbadcc9a3c9ea60af356e3322625bd4b", + "path" : "content/manual/manual/source/includes/driver-examples/node/projection/projectionExamples.js" } ], "operator" : "project", "pageBlob" : "a875b2e46f16cdd3d1c06306668fecd025e754b6", @@ -9245,45 +8850,30 @@ }, { "context" : "aggregation/stages", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "415e2de99a5204c0b349852f37c78b452b6017228665df712c7c4f28b639bce9", - "text" : "db.aggregate( [ {\n $querySettings: { showDebugQueryShape: true }\n} ] )" - }, { - "role" : "DATA", - "sha256" : "d1d341339865a6f1be8b3a261a14d2b16a589ea18ae65d33936704447676d1e7", - "text" : "db.adminCommand( {\n setQuerySettings: {\n find: \"pizzaOrders\",\n filter: {\n orderDate: { $gt: ISODate( \"2024-01-20T00:00:00Z\" ) }\n },\n sort: {\n totalNumber: 1\n },\n $db: \"test\"\n },\n settings: {\n indexHints: {\n ns: { db: \"test\", coll: \"pizzaOrders\" },\n allowedIndexes: [ \"orderDate_1\" ]\n },\n queryFramework: \"classic\",\n comment: \"Index hint for orderDate_1 index to improve query performance\"\n }\n} )" - }, { - "role" : "EXPECTED", - "sha256" : "e718e97b1c750b6d0236e0e8d8646bd0e22818505ceb229a9ced1771e4f793cf", - "text" : "[\n {\n queryShapeHash: 'AB8ECADEE8F0EB0F447A30744EB4813AE7E0BFEF523B0870CA10FCBC87F5D8F1',\n settings: {\n indexHints: [\n {\n ns: { db: 'test', coll: 'pizzaOrders' },\n allowedIndexes: [ 'orderDate_1' ]\n }\n ],\n queryFramework: 'classic',\n comment: 'Index hint for orderDate_1 index to improve query performance'\n },\n representativeQuery: {\n find: 'pizzaOrders',\n filter: { orderDate: { '$gt': ISODate('2023-01-20T00:00:00.000Z') } },\n sort: { totalNumber: 1 },\n '$db': 'test'\n },\n debugQueryShape: {\n cmdNs: { db: 'test', coll: 'pizzaOrders' },\n command: 'find',\n filter: { orderDate: { '$gt': '?date' } },\n sort: { totalNumber: 1 }\n }\n }\n]" - }, { - "role" : "INDEX", - "sha256" : "d435a4dccc7b8b18fdafc74f92b095ed1d92f7c92bfef6f6e360b516c7e161fb", - "text" : "// Create pizzaOrders collection\ndb.pizzaOrders.insertMany( [\n { _id: 0, type: \"pepperoni\", totalNumber: 5,\n orderDate: new Date( \"2024-01-15T12:00:00Z\" ) },\n { _id: 1, type: \"cheese\", totalNumber: 15,\n orderDate: new Date( \"2024-01-23T11:12:32Z\" ) },\n { _id: 2, type: \"vegan\", totalNumber: 20,\n orderDate: new Date( \"2024-03-20T10:01:12Z\" ) }\n] )\n\n// Create ascending index on orderDate field\ndb.pizzaOrders.createIndex( { orderDate: 1 } )\n\n// Create ascending index on totalNumber field\ndb.pizzaOrders.createIndex( { totalNumber: 1 } )" - } ], - "detail" : null, - "name" : "Show the Debug Query Shape", + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", - "stem" : "showTheDebugQueryShape", - "title" : "main" - } ], - "includes" : [ { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" + "status" : "UNSUPPORTED", + "stem" : "createTheExampleCollectionAndIndexes", + "title" : "Create the example collection and indexes" }, { - "blob" : "925652fe0366e3bfab6e2c9d1dcd59db475c088f", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-support-no-free.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "addTheQuerySettings", + "title" : "Add the query settings" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "returnTheQuerySettings", + "title" : "Return the query settings" + } ], + "includes" : [ { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "querySettings", "pageBlob" : "48dc22a019e30ec9e15de1e7976956ac2789df93", @@ -9295,72 +8885,30 @@ }, { "context" : "aggregation/stages", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "288929e2472bc93b5617f57e3401f5ce3a9b8579aba823372f815ba922f01cdc", - "text" : "db.products.find( { item: \"card\" } )\n\ndb.products.aggregate( [\n {\n $match: { qty: { $gt: 20 } }\n }\n] )" - }, { - "role" : "DATA", - "sha256" : "27920a8bd7fdb91f3762fd9560792ec18c1ecf5771df88adb52a13ecabc8f626", - "text" : "db.products.insertMany(\n [\n { item: \"card\", qty: 15 },\n { item: \"envelope\", qty: 20 },\n { item: \"stamps\" , qty: 30 }\n ]\n)" - } ], - "detail" : null, - "name" : "Return Query Statistics", + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", - "stem" : "returnQueryStatistics", + "status" : "UNSUPPORTED", + "stem" : null, "title" : "main" }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "82bca73e376807814bc618cea5c02587b85b0141c1048b25fdb011b426ff516f", - "text" : "db.getSiblingDB(\"admin\").aggregate( [\n { \n $queryStats: { }\n }\n] )" - }, { - "role" : "DATA", - "sha256" : "27920a8bd7fdb91f3762fd9560792ec18c1ecf5771df88adb52a13ecabc8f626", - "text" : "db.products.insertMany(\n [\n { item: \"card\", qty: 15 },\n { item: \"envelope\", qty: 20 },\n { item: \"stamps\" , qty: 30 }\n ]\n)" - }, { - "role" : "EXPECTED", - "sha256" : "8d0813e077881678863c3b7707c6561f8904bd0d83bd81a4f6ae5f99c653a96a", - "text" : "[\n {\n key: {\n queryShape: {\n cmdNs: { db: 'test', coll: 'products' },\n command: 'find',\n filter: { item: { '$eq': '?string' } }\n },\n client: {\n driver: { name: 'nodejs|mongosh', version: '5.1.0' },\n os: {\n type: 'Darwin',\n name: 'darwin',\n architecture: 'arm64',\n version: '22.6.0'\n },\n platform: 'Node.js v16.19.1, LE (unified)',\n version: '5.1.0|1.8.0',\n application: { name: 'mongosh 1.8.0' }\n },\n collectionType: 'collection'\n },\n keyHash: 'dsoJ+LHAru0z6MJ1/IygJnnLTrlpVYYmPnlmNZbZrLI=',\n queryShapeHash: \"uxMLCvpiJ5N/IRqt4c28/0A8F01C8AA16CA805FF5C1A5737535F97E40C2A90CE91A82CCB7A74C7CCB9C48\",\n metrics: {\n lastExecutionMicros: Long(\"4254\"),\n execCount: Long(\"1\"),\n totalExecMicros: {\n sum: Long(\"4254\"),\n max: Long(\"4254\"),\n min: Long(\"4254\"),\n sumOfSquares: Decimal128(\"18096516\")\n },\n firstResponseExecMicros: {\n sum: Long(\"4254\"),\n max: Long(\"4254\"),\n min: Long(\"4254\"),\n sumOfSquares: Decimal128(\"18096516\")\n },\n docsReturned: {\n sum: Long(\"1\"),\n max: Long(\"1\"),\n min: Long(\"1\"),\n sumOfSquares: Decimal128(\"1\")\n },\n planningTimeMicros: {\n sum: Long(\"2150\"),\n max: Long(\"2150\"),\n min: Long(\"2150\"),\n sumOfSquares: Decimal128(\"4622500\")\n },\n costBasedRanker: {\n cardinalityEstimationMethods: {\n Histogram: Long(\"0\"),\n Sampling: Long(\"0\"),\n Heuristics: Long(\"0\"),\n Mixed: Long(\"0\"),\n Metadata: Long(\"0\"),\n Code: Long(\"0\")\n },\n nDocsSampled: {\n sum: Long(\"0\"),\n max: Long(\"0\"),\n min: Long(\"0\"),\n sumOfSquares: Decimal128(\"0\")\n }\n },\n firstSeenTimestamp: ISODate(\"2023-09-14T12:30:27.989Z\"),\n latestSeenTimestamp: ISODate(\"2023-09-14T12:30:27.989Z\")\n },\n asOf: Timestamp({ t: 1694695007, i: 0 })\n },\n {\n key: {\n queryShape: {\n cmdNs: { db: 'test', coll: 'products' },\n command: 'aggregate',\n pipeline: [\n { '$match': { qty: { '$gt': '?number' } } }\n ]\n },\n apiVersion: '1',\n client: {\n driver: { name: 'nodejs|mongosh', version: '5.1.0' },\n os: {\n type: 'Darwin',\n name: 'darwin',\n architecture: 'arm64',\n version: '22.6.0'\n },\n platform: 'Node.js v16.19.1, LE (unified)',\n version: '5.1.0|1.8.0',\n application: { name: 'mongosh 1.8.0' }\n },\n collectionType: 'collection',\n cursor: { batchSize: '?number' }\n },\n keyHash: '2QLBfL0m1lliStdN4XvBjqVBtZQ6ffaB2L1pJ99twT8=',\n queryShapeHash: \"uxMLCvpiJ5N/IRqt4c28/0A8F01C8AA16CA805FF5C1A5737535F97E40C2A90CE91A82CCB7A74C7CCB9C48\",\n metrics: {\n lastExecutionMicros: Long(\"350\"),\n execCount: Long(\"3\"),\n totalExecMicros: {\n sum: Long(\"3084\"),\n max: Long(\"2499\"),\n min: Long(\"235\"),\n sumOfSquares: Decimal128(\"6422726\")\n },\n firstResponseExecMicros: {\n sum: Long(\"3084\"),\n max: Long(\"2499\"),\n min: Long(\"235\"),\n sumOfSquares: Decimal128(\"6422726\")\n },\n docsReturned: {\n sum: Long(\"3\"),\n max: Long(\"1\"),\n min: Long(\"1\"),\n sumOfSquares: Decimal128(\"3\")\n },\n planningTimeMicros: {\n sum: Long(\"1850\"),\n max: Long(\"850\"),\n min: Long(\"420\"),\n sumOfSquares: Decimal128(\"1252500\")\n },\n costBasedRanker: {\n cardinalityEstimationMethods: {\n Histogram: Long(\"0\"),\n Sampling: Long(\"0\"),\n Heuristics: Long(\"0\"),\n Mixed: Long(\"0\"),\n Metadata: Long(\"0\"),\n Code: Long(\"0\")\n },\n nDocsSampled: {\n sum: Long(\"0\"),\n max: Long(\"0\"),\n min: Long(\"0\"),\n sumOfSquares: Decimal128(\"0\")\n }\n },\n firstSeenTimestamp: ISODate(\"2023-11-29T21:16:17.796Z\"),\n latestSeenTimestamp: ISODate(\"2023-11-29T21:17:12.385Z\")\n },\n asOf: Timestamp({ t: 1701292827, i: 0 })\n }\n]" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "untransformedExample", "title" : "Untransformed Example" }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "9a5ceab1461b7dfa3966fe88ff84d7d6851c494a14b2601fb6d2a65ed0f2570c", - "text" : "db.getSiblingDB(\"admin\").aggregate( [\n {\n $queryStats: {\n transformIdentifiers: {\n algorithm: \"hmac-sha-256\" ,\n hmacKey: BinData(8, \"87c4082f169d3fef0eef34dc8e23458cbb457c3sf3n2\")\n }\n }\n }\n ] )" - }, { - "role" : "DATA", - "sha256" : "27920a8bd7fdb91f3762fd9560792ec18c1ecf5771df88adb52a13ecabc8f626", - "text" : "db.products.insertMany(\n [\n { item: \"card\", qty: 15 },\n { item: \"envelope\", qty: 20 },\n { item: \"stamps\" , qty: 30 }\n ]\n)" - }, { - "role" : "EXPECTED", - "sha256" : "071939768b651ecd788a7dcb5641b34335e132e17c02058b82118a01cc693940", - "text" : "[\n {\n key: {\n queryShape: {\n cmdNs: {\n db: 'Mtrt3iG7dsX5c5uCSIhSVlcu5qD3u3xx2EQnS1dJLxM=',\n coll: '3oJE6AyOuf8h5NqWiXETxulFlPm3QUXbMnMjL2EqAU4='\n },\n command: 'find',\n filter: {\n 'VWVRow7Ure92ajRPfrpWiU8OtDeWcLePFIq0+tooBng=': { '$eq': '?string' }\n }\n },\n client: {\n driver: { name: 'nodejs|mongosh', version: '5.1.0' },\n os: {\n type: 'Darwin',\n name: 'darwin',\n architecture: 'arm64',\n version: '22.6.0'\n },\n platform: 'Node.js v16.19.1, LE (unified)',\n version: '5.1.0|1.8.0',\n application: { name: 'mongosh 1.8.0' }\n },\n collectionType: 'collection'\n },\n keyHash: 'q4vxam+wbk8tTrl8D0MDFH1LQAbI8fWspfkGKhEUROk=',\n queryShapeHash: \"uxMLCvpiJ5N/IRqt4c28/0A8F01C8AA16CA805FF5C1A5737535F97E40C2A90CE91A82CCB7A74C7CCB9C48\",\n metrics: {\n lastExecutionMicros: Long(\"4254\"),\n execCount: Long(\"1\"),\n keysExamined: { \n sum: Int(\"5\"),\n max: Long(\"5\"),\n min: Long(\"5\"),\n sumOfSquares: Decimal128(\"25\") \n },\n docsExamined: {\n sum: Long(\"1\"),\n max: Long(\"1\"),\n min: Long(\"1\"),\n sumOfSquares: Decimal128(\"1\")\n },\n hasSortStage: {true: Long(\"0\"), false: Long(\"1\")},\n usedDisk: {true: Long(\"0\"), false: Long(\"1\")},\n fromMultiPlanner: {true: Long(\"0\"), false: Long(\"1\")},\n fromPlanCache: {true: Long(\"1\"), false: Long(\"0\")},\n totalExecMicros: {\n sum: Long(\"4254\"),\n max: Long(\"4254\"),\n min: Long(\"4254\"),\n sumOfSquares: Decimal128(\"18096516\")\n },\n firstResponseExecMicros: {\n sum: Long(\"4254\"),\n max: Long(\"4254\"),\n min: Long(\"4254\"),\n sumOfSquares: Decimal128(\"18096516\")\n },\n docsReturned: {\n sum: Long(\"1\"),\n max: Long(\"1\"),\n min: Long(\"1\"),\n sumOfSquares: Decimal128(\"1\")\n },\n planningTimeMicros: {\n sum: Long(\"2150\"),\n max: Long(\"2150\"),\n min: Long(\"2150\"),\n sumOfSquares: Decimal128(\"4622500\")\n },\n costBasedRanker: {\n cardinalityEstimationMethods: {\n Histogram: Long(\"0\"),\n Sampling: Long(\"0\"),\n Heuristics: Long(\"0\"),\n Mixed: Long(\"0\"),\n Metadata: Long(\"0\"),\n Code: Long(\"0\")\n },\n nDocsSampled: {\n sum: Long(\"0\"),\n max: Long(\"0\"),\n min: Long(\"0\"),\n sumOfSquares: Decimal128(\"0\")\n }\n },\n firstSeenTimestamp: ISODate(\"2023-09-14T12:30:27.989Z\"),\n latestSeenTimestamp: ISODate(\"2023-09-14T12:30:27.989Z\")\n },\n asOf: Timestamp({ t: 1694695712, i: 0 })\n },\n {\n key: {\n queryShape: {\n cmdNs: {\n db: 'Mtrt3iG7dsX5c5uCSIhSVlcu5qD3u3xx2EQnS1dJLxM=',\n coll: '3oJE6AyOuf8h5NqWiXETxulFlPm3QUXbMnMjL2EqAU4='\n },\n command: 'aggregate',\n pipeline: [\n {\n '$match': {\n 'RVqrwNEPotzdKnma/T7s4YcgNvpqO29BMDoni2N4IMI=': { '$gt': '?number' }\n }\n }\n ]\n },\n apiVersion: '1',\n client: {\n driver: { name: 'nodejs|mongosh', version: '5.1.0' },\n os: {\n type: 'Darwin',\n name: 'darwin',\n architecture: 'arm64',\n version: '22.6.0'\n },\n platform: 'Node.js v16.19.1, LE (unified)',\n version: '5.1.0|1.8.0',\n application: { name: 'mongosh 1.8.0' }\n },\n collectionType: 'collection',\n cursor: { batchSize: '?number' }\n },\n keyHash: 'HEhpQTYB+/wVoHLkOkMd+EC2jguQlMJ1N/vTE7+b8Js=',\n queryShapeHash: \"uxMLCvpiJ5N/IRqt4c28/0A8F01C8AA16CA805FF5C1A5737535F97E40C2A90CE91A82CCB7A74C7CCB9C48\",\n metrics: {\n lastExecutionMicros: Long(\"350\"),\n execCount: Long(\"3\"),\n keysExamined: { \n sum: Int(\"5\"),\n max: Long(\"5\"),\n min: Long(\"5\"),\n sumOfSquares: Decimal128(\"25\") \n },\n docsExamined: {\n sum: Long(\"1\"),\n max: Long(\"1\"),\n min: Long(\"1\"),\n sumOfSquares: Decimal128(\"1\")\n },\n hasSortStage: {true: Long(\"0\"), false: Long(\"1\")},\n usedDisk: {true: Long(\"0\"), false: Long(\"1\")},\n fromMultiPlanner: {true: Long(\"0\"), false: Long(\"1\")},\n fromPlanCache: {true: Long(\"1\"), false: Long(\"0\")}, \n totalExecMicros: {\n sum: Long(\"3084\"),\n max: Long(\"2499\"),\n min: Long(\"235\"),\n sumOfSquares: Decimal128(\"6422726\")\n },\n firstResponseExecMicros: {\n sum: Long(\"3084\"),\n max: Long(\"2499\"),\n min: Long(\"235\"),\n sumOfSquares: Decimal128(\"6422726\")\n },\n docsReturned: {\n sum: Long(\"3\"),\n max: Long(\"1\"),\n min: Long(\"1\"),\n sumOfSquares: Decimal128(\"3\")\n },\n planningTimeMicros: {\n sum: Long(\"1850\"),\n max: Long(\"850\"),\n min: Long(\"420\"),\n sumOfSquares: Decimal128(\"1252500\")\n },\n costBasedRanker: {\n cardinalityEstimationMethods: {\n Histogram: Long(\"0\"),\n Sampling: Long(\"0\"),\n Heuristics: Long(\"0\"),\n Mixed: Long(\"0\"),\n Metadata: Long(\"0\"),\n Code: Long(\"0\")\n },\n nDocsSampled: {\n sum: Long(\"0\"),\n max: Long(\"0\"),\n min: Long(\"0\"),\n sumOfSquares: Decimal128(\"0\")\n }\n },\n firstSeenTimestamp: ISODate(\"2023-11-29T21:16:17.796Z\"),\n latestSeenTimestamp: ISODate(\"2023-11-29T21:17:12.385Z\")\n },\n asOf: Timestamp({ t: 1701293302, i: 0 })\n },\n]" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "transformedExample", "title" : "Transformed Example" } ], "includes" : [ { - "blob" : "d1afbdc1cca431535df9e195a172e48dd6e3826e", - "path" : "content/manual/manual/source/includes/aggregation/queryStats/unsupported-warning.rst" - }, { - "blob" : "360c7e0157a243cf66db0b6ee9f44c1b22282ca7", - "path" : "content/manual/manual/source/includes/aggregation/queryStats/description.rst" - }, { - "blob" : "d1fced650e4b3734d802f5de5ec2f02ed9bff041", - "path" : "content/manual/manual/source/includes/aggregation/queryStats/logging-intro.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "queryStats", "pageBlob" : "172c635f4593c1c4f01fb513b986b5af124fdf1b", @@ -9371,45 +8919,19 @@ } }, { "context" : "aggregation/stages", - "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "c4871e0499a25d9f92545f72679122a16ef1d2a2cd514d387b5a72018b4a611e", - "text" : "db.embedded_movies.aggregate( [\n {\n $rankFusion: {\n input: {\n pipelines: {\n searchOne: [\n {\n \"$vectorSearch\": {\n \"index\": \"\",\n \"path\": \"\",\n \"queryVector\": ,\n \"numCandidates\": 500,\n \"limit\": 20\n }\n }\n ],\n searchTwo: [\n {\n \"$search\": {\n \"index\": \"\",\n \"text\": {\n \"query\": \"\",\n \"path\": \"\"\n }\n }\n },\n { \"$limit\": 20 }\n ],\n }\n }\n }\n },\n { $limit: 20 }\n] )" - }, { - "role" : "DATA", - "sha256" : "e51e99f828124bb7eedc52e11cec3a625b5462ba55fa2e5b88f8a75d2280a349", - "text" : "db.embedded_movies.createSearchIndex(\n \"search_index\",\n {\n mappings: { dynamic: true }\n }\n)" - }, { - "role" : "DATA", - "sha256" : "054c7747654f26dab710536e6dfe273da83876c9f3bc9e57fdba8be10de2f88f", - "text" : "db.embedded_movies.createSearchIndex(\n \"vector_index\", \n \"vectorSearch\", \n {\n \"fields\": [\n {\n \"type\": \"vector\",\n \"path\": \"\",\n \"numDimensions\": ,\n \"similarity\": \"dotProduct\"\n }\n ]\n }\n);" - } ], - "detail" : null, - "name" : "Combine Vector and Text Search Ranks", - "owner" : null, - "status" : "UNOWNED", - "stem" : "combineVectorAndTextSearchRanks", - "title" : "main" - } ], + "examples" : [ ], "includes" : [ { - "blob" : "e60cb5714253b467d495d0abf265074a4cad375c", - "path" : "content/manual/manual/source/includes/fact-scoreDetails-output-format.rst" - }, { - "blob" : "97bd14c5e162b994ded2808d0570b178588b5731", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/sample-data-movie.rst" - }, { - "blob" : "f7c6ec562b7d84d7572cf9bb0653430d55c5fca8", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/convention-pack-note.rst" + "blob" : "9e6c8a3a732eecb8a8d14075cb745f28bdb478dc", + "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/Movie.cs" }, { - "blob" : "ee647c08862815d574922531a022424144e6fdd4", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/method-intro.rst" + "blob" : "fddfe347ec0273f25c7881614d10615e301f0304", + "path" : "content/manual/manual/source/images/rrf-score.png" }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blob" : "129e06800d3e819b8d58d9e4264d09382ea7c1b0", + "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/BuildersExamples.cs" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "rankFusion", "pageBlob" : "bf2c2ea4ac751753616ca5643bed3a60b65b5efe", @@ -9436,14 +8958,11 @@ "title" : "Exclude All Fields at a Given Level" } ], "includes" : [ { - "blob" : "d2d1b17bb85ebcccffbe3f650b9a33bd6a994bf9", - "path" : "content/manual/manual/source/images/redact-security-architecture.rst" + "blob" : "5127e4f152a834a66261f13f1c4f533c3ce1b326", + "path" : "content/manual/manual/source/images/redact-security-architecture.bakedsvg.svg" }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "redact", "pageBlob" : "090e1f9674ba6ca28d7ff54ba4718338e9ff5fe6", @@ -9456,99 +8975,108 @@ "context" : "aggregation/stages", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/stages/replaceRoot/replaceRootWithAnEmbeddedDocumentField", "status" : "OWNED", "stem" : null, - "title" : "``$replaceRoot`` with an Embedded Document Field" + "title" : "$replaceRoot with an Embedded Document Field" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/stages/replaceRoot/replaceRootWithADocumentNestedInAnArray", "status" : "OWNED", "stem" : null, - "title" : "``$replaceRoot`` with a Document Nested in an Array" + "title" : "$replaceRoot with a Document Nested in an Array" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/stages/replaceRoot/replaceRootWithANewlyCreatedDocument", "status" : "OWNED", "stem" : null, - "title" : "``$replaceRoot`` with a newly created document" + "title" : "$replaceRoot with a newly created document" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/stages/replaceRoot/replaceRootWithANewDocumentCreatedFromRootAndADefaultDocument", "status" : "OWNED", "stem" : null, - "title" : "``$replaceRoot`` with a New Document Created from ``$$ROOT`` and a Default Document" + "title" : "$replaceRoot with a New Document Created from $$ROOT and a Default Document" } ], "includes" : [ { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blob" : "a44457ef1ce5b7025e87117f9f318d85bc2cf4d0", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-error.snippet.replace-root-error-missing-name.js" + }, { + "blob" : "fdd7fc5775421a8b44e5593b15f28d9b9de1da28", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-ifnull-output.sh" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "794436f47fdc77cfad61e42374981ab5545c926b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-ifnull.snippet.replace-root-ifnull-name.js" }, { "blob" : "62e99916d5f72ed1f28b666740f7689320f41a93", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-insert.snippet.insert-collection.js" }, { - "blob" : "a44457ef1ce5b7025e87117f9f318d85bc2cf4d0", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-error.snippet.replace-root-error-missing-name.js" + "blob" : "20aceabe90511d0af574d252d8ef05cedfd99194", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-match-output.sh" }, { - "blob" : "49123375b0351e536ce4d9a2759eeb2b373aed4c", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-merge-objects.snippet.replace-root-merge-name.js" + "blob" : "34484a395a4c142c6278077a232e011978b3af3a", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-match.snippet.replace-root-match-name.js" }, { "blob" : "49c9037d47c3bb3606e7aeef6897695bb170196b", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-merge-objects-output.sh" }, { - "blob" : "34484a395a4c142c6278077a232e011978b3af3a", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-match.snippet.replace-root-match-name.js" + "blob" : "49123375b0351e536ce4d9a2759eeb2b373aed4c", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-merge-objects.snippet.replace-root-merge-name.js" }, { - "blob" : "20aceabe90511d0af574d252d8ef05cedfd99194", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-match-output.sh" + "blob" : "8b43f04e4185a92f7a1da7ef1dc0a519593a865b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/contacts-defaults-output.sh" }, { - "blob" : "794436f47fdc77cfad61e42374981ab5545c926b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-ifnull.snippet.replace-root-ifnull-name.js" + "blob" : "c3e1db9a3ca87b0c4a07a11155b6aa979c278f56", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/contacts-defaults.snippet.replace-root-defaults.js" }, { - "blob" : "fdd7fc5775421a8b44e5593b15f28d9b9de1da28", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/behavior-ifnull-output.sh" + "blob" : "b0fd2f4d56952dbba97cf9038164966051b06e9b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/contacts-full-name-insert.snippet.insert-contacts-full-name.js" + }, { + "blob" : "9c2f886c4e0da48d0e1bb97d6d020f2a8d0c52cd", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/contacts-full-name-output.sh" + }, { + "blob" : "7f2219775f0244ac5ec5097505901f92b6ced489", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/contacts-full-name.snippet.replace-root-full-name.js" + }, { + "blob" : "5ff89f013265e2d7edec5b24ced7d38a015f26b4", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/contacts-insert.snippet.insert-contacts.js" }, { "blob" : "fe52c55df17654731cd34017dd29fa6dd3f11eef", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/people-insert.snippet.insert-people.js" - }, { - "blob" : "b15d96511e28c9129b37b9ca07efb2b8abe727a2", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/people-merge-pets.snippet.replace-root-merge-pets.js" }, { "blob" : "302a50a63f905604cbae1eb1ed269c703f9ea361", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/people-merge-pets-output.sh" + }, { + "blob" : "b15d96511e28c9129b37b9ca07efb2b8abe727a2", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/people-merge-pets.snippet.replace-root-merge-pets.js" }, { "blob" : "56f46320a9c2cdad8aafdb8415ffe96c64facfa3", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/students-insert.snippet.insert-students.js" - }, { - "blob" : "0b7da50fdb6a505532e489bff52e64f70f55ff91", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/students-promote-grades.snippet.replace-root-promote-grades.js" }, { "blob" : "e16914ce03e5777aadd65ae8a1b3abbda44ca413", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/students-promote-grades-output.sh" }, { - "blob" : "b0fd2f4d56952dbba97cf9038164966051b06e9b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/contacts-full-name-insert.snippet.insert-contacts-full-name.js" + "blob" : "0b7da50fdb6a505532e489bff52e64f70f55ff91", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/students-promote-grades.snippet.replace-root-promote-grades.js" }, { - "blob" : "7f2219775f0244ac5ec5097505901f92b6ced489", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/contacts-full-name.snippet.replace-root-full-name.js" + "blob" : "dc1656d8175d9d254d587985cdd88a265578f8ae", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.imdb-data-class.cs" }, { - "blob" : "9c2f886c4e0da48d0e1bb97d6d020f2a8d0c52cd", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/contacts-full-name-output.sh" + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" }, { - "blob" : "5ff89f013265e2d7edec5b24ced7d38a015f26b4", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/contacts-insert.snippet.insert-contacts.js" + "blob" : "7ad3c222ad146472e332578d1434d2f11f366fc7", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/ReplaceRootOutput.txt" }, { - "blob" : "c3e1db9a3ca87b0c4a07a11155b6aa979c278f56", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/contacts-defaults.snippet.replace-root-defaults.js" + "blob" : "f922f7961a49d8867880a5ea2baf3b9c07ecd59b", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/ReplaceRoot.snippet.replace-root.cs" }, { - "blob" : "8b43f04e4185a92f7a1da7ef1dc0a519593a865b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-root/contacts-defaults-output.sh" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "replaceRoot", "pageBlob" : "248a6e0cb5bde175c2269a85ba7861c998d224f8", @@ -9561,96 +9089,125 @@ "context" : "aggregation/stages", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/stages/replaceWith/replaceWithAnEmbeddedDocumentField", "status" : "OWNED", "stem" : null, - "title" : "``$replaceWith`` an Embedded Document Field" + "title" : "$replaceWith an Embedded Document Field" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/stages/replaceWith/replaceWithADocumentNestedInAnArray", "status" : "OWNED", "stem" : null, - "title" : "``$replaceWith`` a Document Nested in an Array" + "title" : "$replaceWith a Document Nested in an Array" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "aggregation/stages/replaceWith/replaceWithANewlyCreatedDocument", "status" : "OWNED", "stem" : null, - "title" : "``$replaceWith`` a Newly Created Document" + "title" : "main" }, { - "blocks" : [ ], + "blocks" : [ { + "role" : "DATA", + "sha256" : "16f0d165ad350c65992af8618d3256b3110f94e808b7548e817b1807d1c3c8bb", + "text" : "db.reportedsales.insertMany( [\n { _id: 1, quarter: \"2019Q1\", region: \"A\", qty: 400 },\n { _id: 2, quarter: \"2019Q1\", region: \"B\", qty: 550 },\n { _id: 3, quarter: \"2019Q1\", region: \"C\", qty: 1000 },\n { _id: 4, quarter: \"2019Q2\", region: \"A\", qty: 660 },\n { _id: 5, quarter: \"2019Q2\", region: \"B\", qty: 500 },\n { _id: 6, quarter: \"2019Q2\", region: \"C\", qty: 1200 }\n] )\n" + }, { + "role" : "ACTION", + "sha256" : "bcb7cb77b65de38c219114b6a2748f3e91d440a108fc44ba4166b29cb19dbad7", + "text" : "db.reportedsales.aggregate( [\n { $addFields: { obj: { k: \"$region\", v: \"$qty\" } } },\n { $group: { _id: \"$quarter\", items: { $push: \"$obj\" } } },\n { $project: { items2: { $concatArrays: [ [ { \"k\": \"_id\", \"v\": \"$_id\" } ], \"$items\" ] } } },\n { $replaceWith: { $arrayToObject: \"$items2\" } }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "cb24045e5fd8e1929564a96d6f054bf27b177e4beae78cd17483ac029b640b71", + "text" : "{ \"_id\" : 1, \"quarter\" : \"2019Q1\", \"region\" : \"A\", \"qty\" : 400, \"obj\" : { \"k\" : \"A\", \"v\" : 400 } }" + } ], "detail" : null, + "name" : "Pivot Sales by Quarter", + "owner" : null, + "status" : "UNOWNED", + "stem" : "pivotSalesByQuarter", + "title" : "main" + }, { + "blocks" : [ ], + "detail" : "matched by action text", "owner" : "aggregation/stages/replaceWith/replaceWithANewDocumentCreatedFromRootAndADefaultDocument", "status" : "OWNED", "stem" : null, - "title" : "``$replaceWith`` a New Document Created from ``$$ROOT`` and a Default Document" + "title" : "$replaceWith a New Document Created from $$ROOT and a Default Document" } ], "includes" : [ { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "3e7bd33f3011f3a95e12d35e729bf7d750f1d4e1", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/behavior-ifnull.snippet.replace-with-ifnull-name.js" }, { "blob" : "62e99916d5f72ed1f28b666740f7689320f41a93", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/behavior-insert.snippet.insert-collection.js" + }, { + "blob" : "06f0eea267c974d589620defa837b61a00c0bce7", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/behavior-match.snippet.replace-with-match-name.js" }, { "blob" : "968ee884068003c61a551b5749badd1c8fcf817e", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/behavior-merge-objects.snippet.replace-with-merge-name.js" }, { - "blob" : "06f0eea267c974d589620defa837b61a00c0bce7", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/behavior-match.snippet.replace-with-match-name.js" + "blob" : "e8141c6f42a37686bc85fdb12828114e7b3de4d5", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/contacts-defaults-output.sh" }, { - "blob" : "3e7bd33f3011f3a95e12d35e729bf7d750f1d4e1", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/behavior-ifnull.snippet.replace-with-ifnull-name.js" + "blob" : "3ff2d7460f1effe23d7f51cce010129e51a3a419", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/contacts-defaults.snippet.replace-with-defaults.js" + }, { + "blob" : "85b026fe6787100b29a9c1c2f7f56ec26aee61ca", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/contacts-insert.snippet.insert-contacts.js" }, { "blob" : "fe52c55df17654731cd34017dd29fa6dd3f11eef", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/people-insert.snippet.insert-people.js" - }, { - "blob" : "10fd1881941f769191299e3c7d0410f1f94d3236", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/people-merge-pets.snippet.replace-with-merge-pets.js" }, { "blob" : "302a50a63f905604cbae1eb1ed269c703f9ea361", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/people-merge-pets-output.sh" }, { - "blob" : "56f46320a9c2cdad8aafdb8415ffe96c64facfa3", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/students-insert.snippet.insert-students.js" + "blob" : "10fd1881941f769191299e3c7d0410f1f94d3236", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/people-merge-pets.snippet.replace-with-merge-pets.js" }, { - "blob" : "89730ea57d38e3f3da71563a3235fc45a8a92008", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/students-promote-grades.snippet.replace-with-promote-grades.js" + "blob" : "65a007d1aef326590a6e620796ce9a5010d84b3a", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/reportedsales-group-by-quarter-output.sh" }, { - "blob" : "e16914ce03e5777aadd65ae8a1b3abbda44ca413", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/students-promote-grades-output.sh" + "blob" : "53c797ff3c71cf0901101bfcb41b03b8766d4342", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/reportedsales-group-by-quarter.snippet.replace-with-group-by-quarter.js" + }, { + "blob" : "b8167982af9a1a78d822e75663f2a7f9e044f8d1", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/reportedsales-insert.snippet.insert-reportedsales.js" }, { "blob" : "5dc9837365d02c051367dd0a3266470cf820d6fb", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/sales-insert.snippet.insert-sales.js" + }, { + "blob" : "b7b73538abb01bbe78c6eca382fa49aed17d1dee", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/sales-new-documents-output.sh" }, { "blob" : "be522287c1274d406060bb761220096867d6efe5", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/sales-new-documents.snippet.replace-with-new-documents.js" }, { - "blob" : "b7b73538abb01bbe78c6eca382fa49aed17d1dee", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/sales-new-documents-output.sh" + "blob" : "56f46320a9c2cdad8aafdb8415ffe96c64facfa3", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/students-insert.snippet.insert-students.js" }, { - "blob" : "b8167982af9a1a78d822e75663f2a7f9e044f8d1", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/reportedsales-insert.snippet.insert-reportedsales.js" + "blob" : "e16914ce03e5777aadd65ae8a1b3abbda44ca413", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/students-promote-grades-output.sh" }, { - "blob" : "53c797ff3c71cf0901101bfcb41b03b8766d4342", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/reportedsales-group-by-quarter.snippet.replace-with-group-by-quarter.js" + "blob" : "89730ea57d38e3f3da71563a3235fc45a8a92008", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/students-promote-grades.snippet.replace-with-promote-grades.js" }, { - "blob" : "65a007d1aef326590a6e620796ce9a5010d84b3a", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/reportedsales-group-by-quarter-output.sh" + "blob" : "dc1656d8175d9d254d587985cdd88a265578f8ae", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.imdb-data-class.cs" }, { - "blob" : "85b026fe6787100b29a9c1c2f7f56ec26aee61ca", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/contacts-insert.snippet.insert-contacts.js" + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" }, { - "blob" : "3ff2d7460f1effe23d7f51cce010129e51a3a419", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/contacts-defaults.snippet.replace-with-defaults.js" + "blob" : "ccc631b10b5a96d835174c01240965c648aa641f", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/ReplaceWithOutput.txt" }, { - "blob" : "e8141c6f42a37686bc85fdb12828114e7b3de4d5", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/replace-with/contacts-defaults-output.sh" + "blob" : "78727f95ce0d7368213247a3ca913c980538cf85", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/ReplaceWith.snippet.replace-with.cs" + }, { + "blob" : "e9abe326ad2f8273043db90a0065b2ee43bf526f", + "path" : "content/code-examples/tested/javascript/driver/aggregation/stages/replace-with/replace-with.snippet.replace-with.js" } ], "operator" : "replaceWith", "pageBlob" : "6869f0a523742960a467fd3c59b8aa7bbb1d4322", @@ -9670,14 +9227,14 @@ "title" : "main" } ], "includes" : [ { - "blob" : "229b18c565a0524bcb3687d5661fa8650a3c93a5", - "path" : "content/manual/manual/source/includes/sample-data-usage-singular.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" - }, { "blob" : "6cb5f4db4038565bb85bf1006cc961e55d720d92", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sample/sample-movies.snippet.sample-movies.js" + }, { + "blob" : "aa1a8994b6b334748a9f4c18d80ad4cb5275fcac", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Sample.snippet.sample.cs" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "sample", "pageBlob" : "0b84ada63b5366544a5c479eb901f3e5c8ce8034", @@ -9689,44 +9246,7 @@ }, { "context" : "aggregation/stages", "examples" : [ ], - "includes" : [ { - "blob" : "e60cb5714253b467d495d0abf265074a4cad375c", - "path" : "content/manual/manual/source/includes/fact-scoreDetails-output-format.rst" - } ], - "operator" : "score", - "pageBlob" : "eaa9663cd2cef9280b7a5b06fcef2aa05b273020", - "source" : { - "commit" : "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", - "path" : "content/manual/manual/source/reference/operator/aggregation/score.txt", - "relation" : "AT_ORIGIN" - } - }, { - "context" : "aggregation/stages", - "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "2d6d65f7de803401276c55fbb86f847215ae51a080176a56dcaab7302d331433", - "text" : "db.embedded_movies.aggregate( [\n {\n $scoreFusion: {\n input: {\n pipelines: {\n searchOne: [\n {\n \"$vectorSearch\": {\n \"index\": \"\",\n \"path\": \"\",\n \"queryVector\": ,\n \"numCandidates\": ,\n \"limit\": \n }\n }\n ],\n searchTwo: [\n {\n \"$search\": {\n \"index\": \"\",\n \"text\": {\n \"query\": \"\",\n \"path\": \"\"\n }\n }\n },\n ]\n },\n normalization: \"sigmoid\"\n },\n combination: {\n method: \"expression\",\n expression: {\n $sum: [\n {$multiply: [ \"$$searchOne\", 10]}, \"$$searchTwo\"\n ]\n }\n },\n \"scoreDetails\": true\n }\n },\n {\n \"$project\": {\n _id: 1,\n title: 1,\n plot: 1,\n scoreDetails: {\"$meta\": \"scoreDetails\"}\n }\n },\n { $limit: 20 }\n] )" - }, { - "role" : "DATA", - "sha256" : "16823bdc93ea95243cf9dfa1b03189d712e27a36bdd90c60456379026de98ff9", - "text" : "db.embedded_movies.createSearchIndex(\n \"\",\n {\n mappings: { dynamic: true }\n }\n)" - }, { - "role" : "DATA", - "sha256" : "19537f318a97d327480703fc1671764fdaa47e5dc2a754698f3a019858a083f8", - "text" : "db.embedded_movies.createSearchIndex(\n \"\", \n \"vectorSearch\", \n {\n \"fields\": [\n {\n \"type\": \"vector\",\n \"path\": \"\",\n \"numDimensions\": ,\n \"similarity\": \"dotProduct\"\n }\n ]\n }\n);" - } ], - "detail" : null, - "name" : "Combine Vector and Text Search Scores", - "owner" : null, - "status" : "UNOWNED", - "stem" : "combineVectorAndTextSearchScores", - "title" : "main" - } ], - "includes" : [ { - "blob" : "e60cb5714253b467d495d0abf265074a4cad375c", - "path" : "content/manual/manual/source/includes/fact-scoreDetails-output-format.rst" - } ], + "includes" : [ ], "operator" : "scoreFusion", "pageBlob" : "547597fc21f23ed8ef37a26bbf60f09f8fb7a976", "source" : { @@ -9738,11 +9258,11 @@ "context" : "aggregation/stages", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by name", "owner" : "aggregation/stages/set/usingTwoSetStages", "status" : "OWNED", "stem" : null, - "title" : "Using Two ``$set`` Stages" + "title" : "Using Two $set Stages" }, { "blocks" : [ ], "detail" : null, @@ -9753,16 +9273,31 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "3b807cf2d4c9b9770f5340a630371b891ac255770c1a963ce3ca51ba36867cd2", - "text" : "db.movies.aggregate( [\n { $match: { title: \"Baseball\" } },\n { $set: { rated: \"UNRATED\" } }\n] )" + "sha256" : "ffddecb23c7932269af3123afdf3e49be017872d2348b1da41ab36e25484bd27", + "text" : "db.movies.aggregate( [\n { $match: { title: \"Baseball\" } },\n { $set: { rated: \"UNRATED\" } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "38ac7d3b077d70fc4407b44cea604a7ad530877aadf8aadb269858501d853f8a", - "text" : "[\n { _id: ..., title: 'Baseball', rated: 'UNRATED' }\n]\n..." + "sha256" : "a1d38e11590b974caa1f17a872cedaad4cd5636df1e15abe9d95863b30882f5e", + "text" : "[\n { _id: ..., title: 'Baseball', rated: 'UNRATED' }\n]\n...\n" } ], - "detail" : null, + "detail" : "DOCUMENT_STREAM_SYNTAX", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", + "stem" : "overwritingAnExistingField", + "title" : "Overwriting an Existing Field" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "88e75851c233d5cfc21126a6949bd40d41b37bcf12df14268b185b6c33dff8c7", + "text" : "db.movies.aggregate( [\n { $match: { runtime: { $gt: 1000 } } },\n { $set: { _id: \"$title\", title: \"movie\" } }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "ab4bfb7faf6389e25a3989be0a80a68131cbebb8513f432d10574d363fc1db90", + "text" : "[\n { _id: 'Baseball', title: 'movie' },\n { _id: 'Centennial', title: 'movie' }\n]\n...\n" + } ], + "detail" : "DOCUMENT_STREAM_SYNTAX", + "owner" : null, + "status" : "UNSUPPORTED", "stem" : "overwritingAnExistingField", "title" : "Overwriting an Existing Field" }, { @@ -9781,62 +9316,53 @@ "title" : "Creating a New Field with Existing Fields" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" + "blob" : "8e55293b0ad6a277946b23305be2c0317e71e2fe", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/add-to-array-output.sh" }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" + "blob" : "51be9251b2a708d82a799428fa2581b005bf73e4", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/add-to-array.snippet.set-add-to-array.js" }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" + "blob" : "7db452b5adf31c3163ed672a6d3f099f28166e3e", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/embedded-doc-output.sh" }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" + "blob" : "eb627f415b8608082b9388fae1f3d168026d4ff0", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/embedded-doc.snippet.set-embedded-doc.js" }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "dbbed65cbb1cdd1713212bf6d82784a7b7070ce4", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/field-substitution-output.sh" }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blob" : "71044dfbb6d5436c5a2cc39dfb2a0646094f3606", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/field-substitution.snippet.set-field-substitution.js" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "67abbb18c52018971a1a1971406e2bbe71101ceb", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/new-field-output.sh" }, { - "blob" : "98287dd9627f7eab0a04b20c568fc3bd534e095c", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/two-stages.snippet.set-two-stages.js" + "blob" : "9062d04aad45469bdad41ac9c739b79800049902", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/new-field.snippet.set-new-field.js" }, { - "blob" : "18c5724b9567280816c8b393d3903ea205555622", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/two-stages-output.sh" - }, { - "blob" : "eb627f415b8608082b9388fae1f3d168026d4ff0", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/embedded-doc.snippet.set-embedded-doc.js" - }, { - "blob" : "7db452b5adf31c3163ed672a6d3f099f28166e3e", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/embedded-doc-output.sh" + "blob" : "11d62deb95a7f0c4c4e96594b535b5752f5e6e47", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/overwrite-field-output.sh" }, { "blob" : "01fff03adbb21a6dfad85dd56305d538ad61d140", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/overwrite-field.snippet.set-overwrite-field.js" }, { - "blob" : "11d62deb95a7f0c4c4e96594b535b5752f5e6e47", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/overwrite-field-output.sh" - }, { - "blob" : "71044dfbb6d5436c5a2cc39dfb2a0646094f3606", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/field-substitution.snippet.set-field-substitution.js" + "blob" : "18c5724b9567280816c8b393d3903ea205555622", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/two-stages-output.sh" }, { - "blob" : "dbbed65cbb1cdd1713212bf6d82784a7b7070ce4", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/field-substitution-output.sh" + "blob" : "98287dd9627f7eab0a04b20c568fc3bd534e095c", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/two-stages.snippet.set-two-stages.js" }, { - "blob" : "51be9251b2a708d82a799428fa2581b005bf73e4", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/add-to-array.snippet.set-add-to-array.js" + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" }, { - "blob" : "8e55293b0ad6a277946b23305be2c0317e71e2fe", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/add-to-array-output.sh" + "blob" : "da9a101699e8931189583ebb5e51973fc57b2cc4", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/SetOutput.txt" }, { - "blob" : "9062d04aad45469bdad41ac9c739b79800049902", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/new-field.snippet.set-new-field.js" + "blob" : "f3897c2368c7dfbd63fef6f6bedf66cd0b72ca81", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Set.snippet.set.cs" }, { - "blob" : "67abbb18c52018971a1a1971406e2bbe71101ceb", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/set/new-field-output.sh" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "set", "pageBlob" : "c97296ac5092bd365d48882e95cdf34823b1f3d2", @@ -9848,12 +9374,65 @@ }, { "context" : "aggregation/stages", "examples" : [ { - "blocks" : [ ], + "blocks" : [ { + "role" : "ACTION", + "sha256" : "991d2802a3e79c35884439820d66e65dc1484a8073b74f54533286ae1cc347df", + "text" : "db.movies.aggregate( [\n { $match: { metacritic: { $gt: 85 }, year: { $gte: 1993, $lte: 1995 } } },\n { $project: { _id: 0, title: 1, rated: 1, released: 1, runtime: 1 } },\n {\n $setWindowFields: {\n partitionBy: \"$rated\",\n sortBy: { released: 1 },\n output: {\n cumulativeRuntimeForRating: {\n $sum: \"$runtime\",\n window: {\n documents: [ \"unbounded\", \"current\" ]\n }\n }\n }\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "2dc69ab7e137db1b4e00882462bc89a0e794600591273c2133807b4df13c2044", + "text" : "[\n {\n rated: 'G',\n title: 'Toy Story',\n released: ISODate('1995-11-22T00:00:00.000Z'),\n runtime: 81,\n cumulativeRuntimeForRating: 81\n },\n {\n rated: 'PG',\n title: 'Little Women',\n released: ISODate('1994-12-25T00:00:00.000Z'),\n runtime: 115,\n cumulativeRuntimeForRating: 115\n },\n {\n rated: 'PG-13',\n title: 'The Fugitive',\n released: ISODate('1993-08-06T00:00:00.000Z'),\n runtime: 130,\n cumulativeRuntimeForRating: 130\n },\n {\n rated: 'PG-13',\n title: 'King of the Hill',\n released: ISODate('1993-08-20T00:00:00.000Z'),\n runtime: 103,\n cumulativeRuntimeForRating: 233\n },\n {\n runtime: 133,\n rated: 'PG-13',\n title: 'Quiz Show',\n released: ISODate('1994-10-07T00:00:00.000Z'),\n cumulativeRuntimeForRating: 366\n },\n {\n rated: 'PG-13',\n title: 'Hoop Dreams',\n released: ISODate('1994-10-14T00:00:00.000Z'),\n runtime: 170,\n cumulativeRuntimeForRating: 536\n },\n {\n runtime: 195,\n rated: 'R',\n title: \"Schindler's List\",\n released: ISODate('1994-02-04T00:00:00.000Z'),\n cumulativeRuntimeForRating: 195\n },\n {\n runtime: 121,\n rated: 'R',\n title: 'The Piano',\n released: ISODate('1994-02-11T00:00:00.000Z'),\n cumulativeRuntimeForRating: 316\n },\n {\n rated: 'R',\n title: 'Pulp Fiction',\n released: ISODate('1994-10-14T00:00:00.000Z'),\n runtime: 154,\n cumulativeRuntimeForRating: 470\n },\n {\n runtime: 119,\n title: 'Crumb',\n released: ISODate('1995-04-28T00:00:00.000Z'),\n rated: 'R',\n cumulativeRuntimeForRating: 589\n },\n {\n rated: 'R',\n title: 'To Die For',\n released: ISODate('1995-10-06T00:00:00.000Z'),\n runtime: 106,\n cumulativeRuntimeForRating: 695\n }\n]\n" + } ], "detail" : null, - "owner" : "aggregation/stages/setWindowFields/documentsWindowExamples", - "status" : "OWNED", - "stem" : null, - "title" : "Documents Window Examples" + "owner" : null, + "status" : "UNOWNED", + "stem" : "useDocumentsWindowToObtainCumulativeRuntimeForEachRating", + "title" : "Use Documents Window to Obtain Cumulative Runtime for Each Rating" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "6953e279cf8a3e66b3e1d4aa5312d9aec5b7816e27a2da2cf8e23b049f825bba", + "text" : "db.movies.aggregate( [\n { $match: { metacritic: { $gt: 85 }, year: { $gte: 1993, $lte: 1995 } } },\n { $project: { _id: 0, title: 1, released: 1, runtime: 1 } },\n {\n $setWindowFields: {\n partitionBy: { $year: \"$released\" },\n sortBy: { released: 1 },\n output: {\n cumulativeRuntimeForYear: {\n $sum: \"$runtime\",\n window: {\n documents: [ \"unbounded\", \"current\" ]\n }\n }\n }\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "09a3bf23619c4d36ccb7ed680ef3351c08a7cfce8b289485798789d62c8eac7b", + "text" : "[\n {\n title: 'The Fugitive',\n released: ISODate('1993-08-06T00:00:00.000Z'),\n runtime: 130,\n cumulativeRuntimeForYear: 130\n },\n {\n title: 'King of the Hill',\n released: ISODate('1993-08-20T00:00:00.000Z'),\n runtime: 103,\n cumulativeRuntimeForYear: 233\n },\n {\n runtime: 195,\n title: \"Schindler's List\",\n released: ISODate('1994-02-04T00:00:00.000Z'),\n cumulativeRuntimeForYear: 195\n },\n {\n runtime: 121,\n title: 'The Piano',\n released: ISODate('1994-02-11T00:00:00.000Z'),\n cumulativeRuntimeForYear: 316\n },\n {\n runtime: 133,\n title: 'Quiz Show',\n released: ISODate('1994-10-07T00:00:00.000Z'),\n cumulativeRuntimeForYear: 449\n },\n {\n title: 'Hoop Dreams',\n released: ISODate('1994-10-14T00:00:00.000Z'),\n runtime: 170,\n cumulativeRuntimeForYear: 619\n },\n {\n title: 'Pulp Fiction',\n released: ISODate('1994-10-14T00:00:00.000Z'),\n runtime: 154,\n cumulativeRuntimeForYear: 773\n },\n {\n title: 'Little Women',\n released: ISODate('1994-12-25T00:00:00.000Z'),\n runtime: 115,\n cumulativeRuntimeForYear: 888\n },\n {\n runtime: 119,\n title: 'Crumb',\n released: ISODate('1995-04-28T00:00:00.000Z'),\n cumulativeRuntimeForYear: 119\n },\n {\n title: 'To Die For',\n released: ISODate('1995-10-06T00:00:00.000Z'),\n runtime: 106,\n cumulativeRuntimeForYear: 225\n },\n {\n title: 'Toy Story',\n released: ISODate('1995-11-22T00:00:00.000Z'),\n runtime: 81,\n cumulativeRuntimeForYear: 306\n }\n]\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "useDocumentsWindowToObtainCumulativeRuntimeForEachYear", + "title" : "Use Documents Window to Obtain Cumulative Runtime for Each Year" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "85376bf78069a27fd69b8b486a4d24be6a9ff17b21279a6d39b495f2c326d64f", + "text" : "db.movies.aggregate( [\n { $match: { metacritic: { $gt: 85 }, year: { $gte: 1993, $lte: 1995 } } },\n { $project: { _id: 0, title: 1, released: 1, runtime: 1 } },\n {\n $setWindowFields: {\n partitionBy: { $year: \"$released\" },\n sortBy: { released: 1 },\n output: {\n averageRuntime: {\n $avg: \"$runtime\",\n window: {\n documents: [ -1, 0 ]\n }\n }\n }\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "6a468dd47821d86de44f183242ab4b04d3c49da34409abb89d41f7990f3da0a0", + "text" : "[\n {\n title: 'The Fugitive',\n released: ISODate('1993-08-06T00:00:00.000Z'),\n runtime: 130,\n averageRuntime: 130\n },\n {\n title: 'King of the Hill',\n released: ISODate('1993-08-20T00:00:00.000Z'),\n runtime: 103,\n averageRuntime: 116.5\n },\n {\n runtime: 195,\n title: \"Schindler's List\",\n released: ISODate('1994-02-04T00:00:00.000Z'),\n averageRuntime: 195\n },\n {\n runtime: 121,\n title: 'The Piano',\n released: ISODate('1994-02-11T00:00:00.000Z'),\n averageRuntime: 158\n },\n {\n runtime: 133,\n title: 'Quiz Show',\n released: ISODate('1994-10-07T00:00:00.000Z'),\n averageRuntime: 127\n },\n {\n title: 'Hoop Dreams',\n released: ISODate('1994-10-14T00:00:00.000Z'),\n runtime: 170,\n averageRuntime: 151.5\n },\n {\n title: 'Pulp Fiction',\n released: ISODate('1994-10-14T00:00:00.000Z'),\n runtime: 154,\n averageRuntime: 162\n },\n {\n title: 'Little Women',\n released: ISODate('1994-12-25T00:00:00.000Z'),\n runtime: 115,\n averageRuntime: 134.5\n },\n {\n runtime: 119,\n title: 'Crumb',\n released: ISODate('1995-04-28T00:00:00.000Z'),\n averageRuntime: 119\n },\n {\n title: 'To Die For',\n released: ISODate('1995-10-06T00:00:00.000Z'),\n runtime: 106,\n averageRuntime: 112.5\n },\n {\n title: 'Toy Story',\n released: ISODate('1995-11-22T00:00:00.000Z'),\n runtime: 81,\n averageRuntime: 93.5\n }\n]\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "useDocumentsWindowToObtainMovingAverageRuntimeForEachYear", + "title" : "Use Documents Window to Obtain Moving Average Runtime for Each Year" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "865d8229cfa1f44e312f0c85a13525ded43aeb6d96685f5cc180e7cea9531d42", + "text" : "db.movies.aggregate( [\n { $match: { metacritic: { $gt: 85 }, year: { $gte: 1993, $lte: 1995 } } },\n { $project: { _id: 0, title: 1, released: 1, runtime: 1 } },\n {\n $setWindowFields: {\n partitionBy: { $year: \"$released\" },\n sortBy: { released: 1 },\n output: {\n cumulativeRuntimeForYear: {\n $sum: \"$runtime\",\n window: {\n documents: [ \"unbounded\", \"current\" ]\n }\n },\n maximumRuntimeForYear: {\n $max: \"$runtime\",\n window: {\n documents: [ \"unbounded\", \"unbounded\" ]\n }\n }\n }\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "64511fe0c8768969fa4a48dfaedcc1d64d1ea74488f9c28065c3ca7d34c78491", + "text" : "[\n {\n title: 'The Fugitive',\n released: ISODate('1993-08-06T00:00:00.000Z'),\n runtime: 130,\n cumulativeRuntimeForYear: 130,\n maximumRuntimeForYear: 130\n },\n {\n title: 'King of the Hill',\n released: ISODate('1993-08-20T00:00:00.000Z'),\n runtime: 103,\n cumulativeRuntimeForYear: 233,\n maximumRuntimeForYear: 130\n },\n {\n runtime: 195,\n title: \"Schindler's List\",\n released: ISODate('1994-02-04T00:00:00.000Z'),\n cumulativeRuntimeForYear: 195,\n maximumRuntimeForYear: 195\n },\n {\n runtime: 121,\n title: 'The Piano',\n released: ISODate('1994-02-11T00:00:00.000Z'),\n cumulativeRuntimeForYear: 316,\n maximumRuntimeForYear: 195\n },\n {\n runtime: 133,\n title: 'Quiz Show',\n released: ISODate('1994-10-07T00:00:00.000Z'),\n cumulativeRuntimeForYear: 449,\n maximumRuntimeForYear: 195\n },\n {\n title: 'Hoop Dreams',\n released: ISODate('1994-10-14T00:00:00.000Z'),\n runtime: 170,\n cumulativeRuntimeForYear: 619,\n maximumRuntimeForYear: 195\n },\n {\n title: 'Pulp Fiction',\n released: ISODate('1994-10-14T00:00:00.000Z'),\n runtime: 154,\n cumulativeRuntimeForYear: 773,\n maximumRuntimeForYear: 195\n },\n {\n title: 'Little Women',\n released: ISODate('1994-12-25T00:00:00.000Z'),\n runtime: 115,\n cumulativeRuntimeForYear: 888,\n maximumRuntimeForYear: 195\n },\n {\n runtime: 119,\n title: 'Crumb',\n released: ISODate('1995-04-28T00:00:00.000Z'),\n cumulativeRuntimeForYear: 119,\n maximumRuntimeForYear: 119\n },\n {\n title: 'To Die For',\n released: ISODate('1995-10-06T00:00:00.000Z'),\n runtime: 106,\n cumulativeRuntimeForYear: 225,\n maximumRuntimeForYear: 119\n },\n {\n title: 'Toy Story',\n released: ISODate('1995-11-22T00:00:00.000Z'),\n runtime: 81,\n cumulativeRuntimeForYear: 306,\n maximumRuntimeForYear: 119\n }\n]\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "useDocumentsWindowToObtainCumulativeAndMaximumRuntimeForEachYear", + "title" : "Use Documents Window to Obtain Cumulative and Maximum Runtime for Each Year" }, { "blocks" : [ ], "detail" : null, @@ -9862,12 +9441,35 @@ "stem" : null, "title" : "Range Window Example" }, { - "blocks" : [ ], + "blocks" : [ { + "role" : "ACTION", + "sha256" : "248119a21f85a2e85acc086453c3f822339596085fa151b0ebb814bfbb12fe0b", + "text" : "db.movies.aggregate( [\n { $match: { metacritic: { $gt: 85 }, year: { $gte: 1993, $lte: 1995 } } },\n { $project: { _id: 0, title: 1, rated: 1, released: 1 } },\n {\n $setWindowFields: {\n partitionBy: \"$rated\",\n sortBy: { released: 1 },\n output: {\n recentReleases: {\n $push: \"$released\",\n window: {\n range: [ \"unbounded\", 10 ],\n unit: \"month\"\n }\n }\n }\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "23b4c9f1de89d6ba774bdb8f74007340bc76a7cc4cc77859af7d702666535f41", + "text" : "[\n {\n rated: 'G',\n title: 'Toy Story',\n released: ISODate('1995-11-22T00:00:00.000Z'),\n recentReleases: [\n ISODate('1995-11-22T00:00:00.000Z')\n ]\n },\n {\n rated: 'PG',\n title: 'Little Women',\n released: ISODate('1994-12-25T00:00:00.000Z'),\n recentReleases: [\n ISODate('1994-12-25T00:00:00.000Z')\n ]\n },\n {\n rated: 'PG-13',\n title: 'The Fugitive',\n released: ISODate('1993-08-06T00:00:00.000Z'),\n recentReleases: [\n ISODate('1993-08-06T00:00:00.000Z'),\n ISODate('1993-08-20T00:00:00.000Z')\n ]\n },\n {\n rated: 'PG-13',\n title: 'King of the Hill',\n released: ISODate('1993-08-20T00:00:00.000Z'),\n recentReleases: [\n ISODate('1993-08-06T00:00:00.000Z'),\n ISODate('1993-08-20T00:00:00.000Z')\n ]\n },\n {\n rated: 'PG-13',\n title: 'Quiz Show',\n released: ISODate('1994-10-07T00:00:00.000Z'),\n recentReleases: [\n ISODate('1993-08-06T00:00:00.000Z'),\n ISODate('1993-08-20T00:00:00.000Z'),\n ISODate('1994-10-07T00:00:00.000Z'),\n ISODate('1994-10-14T00:00:00.000Z')\n ]\n },\n {\n rated: 'PG-13',\n title: 'Hoop Dreams',\n released: ISODate('1994-10-14T00:00:00.000Z'),\n recentReleases: [\n ISODate('1993-08-06T00:00:00.000Z'),\n ISODate('1993-08-20T00:00:00.000Z'),\n ISODate('1994-10-07T00:00:00.000Z'),\n ISODate('1994-10-14T00:00:00.000Z')\n ]\n },\n {\n rated: 'R',\n title: \"Schindler's List\",\n released: ISODate('1994-02-04T00:00:00.000Z'),\n recentReleases: [\n ISODate('1994-02-04T00:00:00.000Z'),\n ISODate('1994-02-11T00:00:00.000Z'),\n ISODate('1994-10-14T00:00:00.000Z')\n ]\n },\n {\n rated: 'R',\n title: 'The Piano',\n released: ISODate('1994-02-11T00:00:00.000Z'),\n recentReleases: [\n ISODate('1994-02-04T00:00:00.000Z'),\n ISODate('1994-02-11T00:00:00.000Z'),\n ISODate('1994-10-14T00:00:00.000Z')\n ]\n },\n {\n rated: 'R',\n title: 'Pulp Fiction',\n released: ISODate('1994-10-14T00:00:00.000Z'),\n recentReleases: [\n ISODate('1994-02-04T00:00:00.000Z'),\n ISODate('1994-02-11T00:00:00.000Z'),\n ISODate('1994-10-14T00:00:00.000Z'),\n ISODate('1995-04-28T00:00:00.000Z')\n ]\n },\n {\n title: 'Crumb',\n released: ISODate('1995-04-28T00:00:00.000Z'),\n rated: 'R',\n recentReleases: [\n ISODate('1994-02-04T00:00:00.000Z'),\n ISODate('1994-02-11T00:00:00.000Z'),\n ISODate('1994-10-14T00:00:00.000Z'),\n ISODate('1995-04-28T00:00:00.000Z'),\n ISODate('1995-10-06T00:00:00.000Z')\n ]\n },\n {\n rated: 'R',\n title: 'To Die For',\n released: ISODate('1995-10-06T00:00:00.000Z'),\n recentReleases: [\n ISODate('1994-02-04T00:00:00.000Z'),\n ISODate('1994-02-11T00:00:00.000Z'),\n ISODate('1994-10-14T00:00:00.000Z'),\n ISODate('1995-04-28T00:00:00.000Z'),\n ISODate('1995-10-06T00:00:00.000Z')\n ]\n }\n]\n" + } ], "detail" : null, - "owner" : "aggregation/stages/setWindowFields/timeRangeWindowExamples", - "status" : "OWNED", - "stem" : null, - "title" : "Time Range Window Examples" + "owner" : null, + "status" : "UNOWNED", + "stem" : "useATimeRangeWindowWithAPositiveUpperBound", + "title" : "Use a Time Range Window with a Positive Upper Bound" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "3b6f0b14c50b8533d7d33c219fd8ae11901d66369f01525ac2c34f987ec82e52", + "text" : "db.movies.aggregate( [\n { $match: { metacritic: { $gt: 85 }, year: { $gte: 1993, $lte: 1995 } } },\n { $project: { _id: 0, title: 1, rated: 1, released: 1 } },\n {\n $setWindowFields: {\n partitionBy: \"$rated\",\n sortBy: { released: 1 },\n output: {\n recentReleases: {\n $push: \"$released\",\n window: {\n range: [ \"unbounded\", -10 ],\n unit: \"month\"\n }\n }\n }\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "6a59e7b47c5ae57dd0acf3a6be753b01a8a38c20120d2c1dcb9a7d456301aec7", + "text" : "[\n {\n rated: 'G',\n title: 'Toy Story',\n released: ISODate('1995-11-22T00:00:00.000Z'),\n recentReleases: []\n },\n {\n rated: 'PG',\n title: 'Little Women',\n released: ISODate('1994-12-25T00:00:00.000Z'),\n recentReleases: []\n },\n {\n rated: 'PG-13',\n title: 'The Fugitive',\n released: ISODate('1993-08-06T00:00:00.000Z'),\n recentReleases: []\n },\n {\n rated: 'PG-13',\n title: 'King of the Hill',\n released: ISODate('1993-08-20T00:00:00.000Z'),\n recentReleases: []\n },\n {\n rated: 'PG-13',\n title: 'Quiz Show',\n released: ISODate('1994-10-07T00:00:00.000Z'),\n recentReleases: [\n ISODate('1993-08-06T00:00:00.000Z'),\n ISODate('1993-08-20T00:00:00.000Z')\n ]\n },\n {\n rated: 'PG-13',\n title: 'Hoop Dreams',\n released: ISODate('1994-10-14T00:00:00.000Z'),\n recentReleases: [\n ISODate('1993-08-06T00:00:00.000Z'),\n ISODate('1993-08-20T00:00:00.000Z')\n ]\n },\n {\n rated: 'R',\n title: \"Schindler's List\",\n released: ISODate('1994-02-04T00:00:00.000Z'),\n recentReleases: []\n },\n {\n rated: 'R',\n title: 'The Piano',\n released: ISODate('1994-02-11T00:00:00.000Z'),\n recentReleases: []\n },\n {\n rated: 'R',\n title: 'Pulp Fiction',\n released: ISODate('1994-10-14T00:00:00.000Z'),\n recentReleases: []\n },\n {\n title: 'Crumb',\n released: ISODate('1995-04-28T00:00:00.000Z'),\n rated: 'R',\n recentReleases: [\n ISODate('1994-02-04T00:00:00.000Z'),\n ISODate('1994-02-11T00:00:00.000Z')\n ]\n },\n {\n rated: 'R',\n title: 'To Die For',\n released: ISODate('1995-10-06T00:00:00.000Z'),\n recentReleases: [\n ISODate('1994-02-04T00:00:00.000Z'),\n ISODate('1994-02-11T00:00:00.000Z'),\n ISODate('1994-10-14T00:00:00.000Z')\n ]\n }\n]\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "useATimeRangeWindowWithANegativeUpperBound", + "title" : "Use a Time Range Window with a Negative Upper Bound" }, { "blocks" : [ ], "detail" : null, @@ -9877,80 +9479,65 @@ "title" : "Comparison with Previous Values Example" } ], "includes" : [ { - "blob" : "746f3697da4fb3e58cf7ab15c07fc7998c9a19d8", - "path" : "content/manual/manual/source/includes/setWindowFields-introduction-examples.rst" - }, { - "blob" : "463129d2d4410fb58d9cfba068d0bd6761402a4f", - "path" : "content/manual/manual/source/includes/setWindowFields-and-transactions-snapshots.rst" - }, { - "blob" : "c527500e46e423f64b27f69cd078136d6263c91a", - "path" : "content/manual/manual/source/includes/setWindowFields-operators.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "f3dd75f032d2dd21906477149f501f4d9918b828", - "path" : "content/manual/manual/source/includes/setWindowFields-partition-sort-rating.rst" - }, { - "blob" : "61e2259f1260cc96e2d58e88133e0db062581a6b", - "path" : "content/manual/manual/source/includes/time-range-window-example-mflix.rst" - }, { - "blob" : "59db17f5133f42dc4783992cc265fd567cdcdc5e", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-weather.rst" + "blob" : "892d1a3671129dd8ff530a863f9445589b5c3570", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/compare-previous-runtime-output.sh" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "6b8cb5a9b60a4319c8634167cb29e6d7fc3cc3fa", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/compare-previous-runtime.snippet.compare-previous-runtime.js" }, { - "blob" : "1f627588938ff10e40926a1d115ca2b466887318", - "path" : "content/manual/manual/source/includes/fact-timeseries-example-aggregation-book.rst" + "blob" : "630862235fd2acb791687e4c8f7748e4ad87cfba", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cumulative-and-maximum-runtime-for-year-output.sh" }, { - "blob" : "16644166ad92fe5a2aecf42c72a174daa1da620b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cumulative-runtime-for-rating.snippet.cumulative-runtime-for-rating.js" + "blob" : "53f934b8f326e4a2946692eeae53c81b8c98f4e1", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cumulative-and-maximum-runtime-for-year.snippet.cumulative-and-maximum-runtime-for-year.js" }, { "blob" : "83bdbc0ca831f9cfb6ed5a22d234495200093d1b", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cumulative-runtime-for-rating-output.sh" }, { - "blob" : "3b48547280cb290a21329430625878b692cea860", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cumulative-runtime-for-year.snippet.cumulative-runtime-for-year.js" + "blob" : "16644166ad92fe5a2aecf42c72a174daa1da620b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cumulative-runtime-for-rating.snippet.cumulative-runtime-for-rating.js" }, { "blob" : "04e469fe430c3c4d2de373e3d24037f62742bf83", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cumulative-runtime-for-year-output.sh" }, { - "blob" : "c3bb6096cfb8cc856787928f4cd6bcf2e9de596d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/moving-average-runtime-for-year.snippet.moving-average-runtime-for-year.js" + "blob" : "3b48547280cb290a21329430625878b692cea860", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cumulative-runtime-for-year.snippet.cumulative-runtime-for-year.js" }, { "blob" : "b1a9017147880b6cc522a41547eb12cb36186e3c", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/moving-average-runtime-for-year-output.sh" }, { - "blob" : "53f934b8f326e4a2946692eeae53c81b8c98f4e1", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cumulative-and-maximum-runtime-for-year.snippet.cumulative-and-maximum-runtime-for-year.js" + "blob" : "c3bb6096cfb8cc856787928f4cd6bcf2e9de596d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/moving-average-runtime-for-year.snippet.moving-average-runtime-for-year.js" }, { - "blob" : "630862235fd2acb791687e4c8f7748e4ad87cfba", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/cumulative-and-maximum-runtime-for-year-output.sh" + "blob" : "ac96824a8bf92e2e5cfbed6a5fd88947ee9fac7b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/range-window-similar-runtime-output.sh" }, { "blob" : "677c83f988f5cd304e4a39401d8080fdefd834ed", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/range-window-similar-runtime.snippet.range-window-similar-runtime.js" }, { - "blob" : "ac96824a8bf92e2e5cfbed6a5fd88947ee9fac7b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/range-window-similar-runtime-output.sh" + "blob" : "76bcd4b058d067cd3243421dcb3088649b54c8ce", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/time-range-window-negative-releases-output.sh" }, { - "blob" : "7762d181c438e43fdcedc14fae79b1b27f6db298", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/time-range-window-positive-releases.snippet.time-range-window-positive-releases.js" + "blob" : "d1e5642fad9eaa74b04c525f29adb5bcb8de6ad8", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/time-range-window-negative-releases.snippet.time-range-window-negative-releases.js" }, { "blob" : "197d1e41c38fabd0e4a5d3ade5faa923dd8cd04d", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/time-range-window-positive-releases-output.sh" }, { - "blob" : "d1e5642fad9eaa74b04c525f29adb5bcb8de6ad8", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/time-range-window-negative-releases.snippet.time-range-window-negative-releases.js" + "blob" : "7762d181c438e43fdcedc14fae79b1b27f6db298", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/time-range-window-positive-releases.snippet.time-range-window-positive-releases.js" }, { - "blob" : "76bcd4b058d067cd3243421dcb3088649b54c8ce", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/time-range-window-negative-releases-output.sh" + "blob" : "dfaeb6d0e74fe5ed0855ccfe3976018e2b6d0032", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/SetWindowFieldsOutput.txt" }, { - "blob" : "6b8cb5a9b60a4319c8634167cb29e6d7fc3cc3fa", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/compare-previous-runtime.snippet.compare-previous-runtime.js" + "blob" : "23481207480282d3b388f1e478abeadac1cd019f", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/SetWindowFields.snippet.set-window-fields.cs" }, { - "blob" : "892d1a3671129dd8ff530a863f9445589b5c3570", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/setWindowFields/compare-previous-runtime-output.sh" + "blob" : "07002ebc29d07436eb8d0aef2ec42a10fde8ac4b", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/SetWindowFields.snippet.weather-measurement-class.cs" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "setWindowFields", "pageBlob" : "d7bca59440ed642470e6fcfedfa3fdcff583c458", @@ -9962,76 +9549,37 @@ }, { "context" : "aggregation/stages", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "0897032c08c538d1e6af66fc4de3af1ec40b8d3d704865d2f2e0652333bc200d", - "text" : "db.aggregate([\n { $shardedDataDistribution: { } }\n])" - }, { - "role" : "EXPECTED", - "sha256" : "c6457e766d7c6f628234aff5ce5b60e37b834062c794b2c73bcf52288d5ef6bb", - "text" : "[\n {\n \"ns\": \"test.names\",\n \"shards\": [\n {\n \"shardName\": \"shard-1\",\n \"numOrphanedDocs\": 0,\n \"numOwnedDocuments\": 6,\n \"ownedSizeBytes\": 366,\n \"orphanedSizeBytes\": 0\n },\n {\n \"shardName\": \"shard-2\",\n \"numOrphanedDocs\": 0,\n \"numOwnedDocuments\": 6,\n \"ownedSizeBytes\": 366,\n \"orphanedSizeBytes\": 0\n }\n ]\n }\n]" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "returnAllShardedDataDistibutionMetrics", "title" : "Return All Sharded Data Distibution Metrics" }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "9eaa103ee81f52b35c2211481d2dc90a0ca9c8a496c366035660648ff05fdfde", - "text" : "db.aggregate([ \n { $shardedDataDistribution: { } },\n { $match: { \"shards.shardName\": \"\" } }\n])" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "returnMetricsForASpecificShard", "title" : "Return Metrics for a Specific Shard" }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "2192ea3c0c7000e70e512741d93d3cbf4b1920ab7e517dd20d4e19bbfaec3068", - "text" : "db.aggregate([ \n { $shardedDataDistribution: { } }, \n { $match: { \"ns\": \".\" } }\n])" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "returnMetricsForANamespace", "title" : "Return Metrics for a Namespace" }, { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "80533b04f7df8d3fc5d05e2da2261852565b9ba5795c0748f1f80dbf65450809", - "text" : "db.aggregate([\n { $shardedDataDistribution: { } },\n { $match: { \"ns\": \".\" } }\n])" - }, { - "role" : "EXPECTED", - "sha256" : "c6457e766d7c6f628234aff5ce5b60e37b834062c794b2c73bcf52288d5ef6bb", - "text" : "[\n {\n \"ns\": \"test.names\",\n \"shards\": [\n {\n \"shardName\": \"shard-1\",\n \"numOrphanedDocs\": 0,\n \"numOwnedDocuments\": 6,\n \"ownedSizeBytes\": 366,\n \"orphanedSizeBytes\": 0\n },\n {\n \"shardName\": \"shard-2\",\n \"numOrphanedDocs\": 0,\n \"numOwnedDocuments\": 6,\n \"ownedSizeBytes\": 366,\n \"orphanedSizeBytes\": 0\n }\n ]\n }\n]" - } ], - "detail" : null, + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "confirmNoOrphanedDocumentsRemain", "title" : "Confirm No Orphaned Documents Remain" } ], "includes" : [ { - "blob" : "38d41c4c40d08942fc5f8073d428ac1b3c781b80", - "path" : "content/manual/manual/source/includes/sharding/shardedDataDistribution-output.rst" - }, { - "blob" : "9db737205160161654d97765815b28587cac7357", - "path" : "content/manual/manual/source/includes/sharding/shardedDataDistribution-output-limitation.rst" - }, { - "blob" : "a18bc0e88f2cab958244639a64288704527fc68a", - "path" : "content/manual/manual/source/includes/fact-unexpected-shutdown-accuracy.rst" - }, { - "blob" : "ba33bd2da41e2bee9285519fec4bc9ad14f58f9a", - "path" : "content/manual/manual/source/includes/shardedDataDistribution-output-example.rst" - }, { - "blob" : "c96329cab5c8102f0c9a4abcdbeb615058cda36f", - "path" : "content/manual/manual/source/includes/shardedDataDistribution-orphaned-docs.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "shardedDataDistribution", "pageBlob" : "94ca69ae30a1f9d90866bffc8d0cd9a46276399a", @@ -10051,8 +9599,17 @@ "title" : "main" } ], "includes" : [ { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" + }, { + "blob" : "6da8c1dd60a39e0db727e4687b292e4b1c609866", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/SkipOutput.txt" + }, { + "blob" : "1b0da6ca07a9e8c1bd0ac8e782153cab6b38fca5", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Skip.snippet.skip.cs" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "skip", "pageBlob" : "e00174c0f15f1f2f6c373c08c39ff72ccf05a49a", @@ -10066,8 +9623,8 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "e2f20f4014a724b2f195de48fdfd4859f2fbfb1939ec45b48ea44076f6a023b9", - "text" : "db.movies.aggregate(\n [\n { $sort: { year: -1, title: 1 } },\n { $limit: 5 }\n ]\n)" + "sha256" : "13a5931cd239a053825f1304ad6f29780ce754e179f499042a25e0415f8260e9", + "text" : "db.movies.aggregate(\n [\n { $sort: { year: -1, title: 1 } },\n { $limit: 5 }\n ]\n)\n" } ], "detail" : null, "owner" : null, @@ -10083,68 +9640,20 @@ "title" : "Text Score Metadata Sort" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "2cdafbda5059c106db3b9be9a0c5f2d66480dad6", - "path" : "content/manual/manual/source/includes/blocking-performance.rst" - }, { - "blob" : "2d412f034653872f2b732dbc1518d2fa7712e50e", - "path" : "content/manual/manual/source/includes/sort-limits.rst" - }, { - "blob" : "c2f513b34e5b054847c6d4b357baf347e6d8af47", - "path" : "content/manual/manual/source/includes/fact-sort-consistency.rst" - }, { - "blob" : "b33f9d720586d684627e6dcec483b08bcc815e05", - "path" : "content/manual/manual/source/includes/array-sort-example-setup.rst" - }, { - "blob" : "80e8185a81d27ce7d8f6101ac6b26edddff97190", - "path" : "content/manual/manual/source/includes/array-sort-example-explanation.rst" - }, { - "blob" : "8207a01baf8ec6f36af6563066c2214325a09bf4", - "path" : "content/manual/manual/source/includes/array-filter-and-sort-example-setup.rst" - }, { - "blob" : "e4b9434768b93822180ccbf55238fb14ab0de80b", - "path" : "content/manual/manual/source/includes/array-filter-and-sort-example-explanation.rst" - }, { - "blob" : "ad8da777c6a2df6b7d30cc3a4fa3aeaa2207ecb4", - "path" : "content/manual/manual/source/includes/fact-agg-sort-limit.rst" - }, { - "blob" : "e8f9db6f95e25179991eaaa8c1cd107b4234c806", - "path" : "content/manual/manual/source/includes/fact-optimizations-subject-to-change.rst" - }, { - "blob" : "bd936862eabb98a13d9bf238e41065aafc52fee4", - "path" : "content/manual/manual/source/includes/fact-allowDiskUseByDefault.rst" - }, { - "blob" : "89942e46afc25474408fe5ed8acbfb220183366a", - "path" : "content/manual/manual/source/includes/fact-atlas-enable-autoscaling.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "3a5110a2be0c422d63b3983188a36e0bd8fb6d3c", - "path" : "content/manual/manual/source/includes/fact-sort-order.rst" + "blob" : "1842feffddc234771260df5aac2556794c1d0754", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/array-filter-sort.snippet.array-filter-sort.js" }, { - "blob" : "a6b6e20a100cc7a045ae2d382c5cbe38f0904500", - "path" : "content/manual/manual/source/includes/text-search-legacy-atlas-section.rst" + "blob" : "e7ef822ac03d8918e55baf8fd6b8736c562b3c9f", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/array-sort-asc.snippet.array-sort-asc.js" }, { - "blob" : "4f64cb03e66bdd5969e83c3ddf2d7fa635107d09", - "path" : "content/manual/manual/source/includes/text-search-legacy-atlas-section-main.rst" + "blob" : "cf900b95e3392b4e816afe5d9a764246864be93a", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/array-sort-desc.snippet.array-sort-desc.js" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "b0f00f4fce04e5ff7ddd753d63e2656d45d4bc52", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/create-text-index.snippet.create-text-index.js" }, { - "blob" : "4f413dfc64237972d4859a0cbd521a421b744623", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/sort-by-year.snippet.sort-by-year.js" + "blob" : "5af3974dac1e5a32efa8732a4b4615583ae068f4", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/sort-by-year-and-id.snippet.sort-by-year-and-id.js" }, { "blob" : "ba149066f560e53564004b31cbcc5e1f62d11407", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/sort-by-year-ordering-1-output.sh" @@ -10152,26 +9661,26 @@ "blob" : "757dc1f88c4f71f18800db889d9bd557e7eb5cb0", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/sort-by-year-ordering-2-output.sh" }, { - "blob" : "5af3974dac1e5a32efa8732a4b4615583ae068f4", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/sort-by-year-and-id.snippet.sort-by-year-and-id.js" - }, { - "blob" : "e7ef822ac03d8918e55baf8fd6b8736c562b3c9f", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/array-sort-asc.snippet.array-sort-asc.js" - }, { - "blob" : "cf900b95e3392b4e816afe5d9a764246864be93a", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/array-sort-desc.snippet.array-sort-desc.js" - }, { - "blob" : "1842feffddc234771260df5aac2556794c1d0754", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/array-filter-sort.snippet.array-filter-sort.js" + "blob" : "4f413dfc64237972d4859a0cbd521a421b744623", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/sort-by-year.snippet.sort-by-year.js" }, { "blob" : "1fac7f7b93539b68b5ed3b70c08f7246c4eb35cb", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/sort-multi-field.snippet.sort-multi-field.js" - }, { - "blob" : "b0f00f4fce04e5ff7ddd753d63e2656d45d4bc52", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/create-text-index.snippet.create-text-index.js" }, { "blob" : "01a556053fb4720e7f36efc76c7965791a48e1a5", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/sort/text-score-sort.snippet.text-score-sort.js" + }, { + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" + }, { + "blob" : "f2deb940b4a3eca3f9a7312ee6ab484d9b6e529f", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/SortOutput.txt" + }, { + "blob" : "2780f4074703546c533fc1b189f8e9b297f55e55", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Sort.snippet.sort.cs" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "sort", "pageBlob" : "3448e7f1b4905e1d63ec48a6b455f288dab9ab2c", @@ -10191,17 +9700,17 @@ "title" : "main" } ], "includes" : [ { - "blob" : "bd936862eabb98a13d9bf238e41065aafc52fee4", - "path" : "content/manual/manual/source/includes/fact-allowDiskUseByDefault.rst" + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" }, { - "blob" : "89942e46afc25474408fe5ed8acbfb220183366a", - "path" : "content/manual/manual/source/includes/fact-atlas-enable-autoscaling.rst" + "blob" : "fab68e7675b9ce24c1723553b8908e9a48aaa26a", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/SortByCountOutput.txt" }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" + "blob" : "f9e14bbac0a7bf09eeccf85edbd1285b1ab78cc7", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/SortByCount.snippet.sort-by-count.cs" }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "sortByCount", "pageBlob" : "fba9329e6b003e75735caeb7e40d2747126a45d5", @@ -10215,12 +9724,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "8c75488833eaa4d3f3489108db6f0b0d4bdbfa52ff54c17cf59b8474aea8886a", - "text" : "db.movies.aggregate( [\n { $match: { year: { $lt: 1910 } } },\n { $set: { category: \"Early Cinema\" } },\n { $unionWith: { coll: \"movies\", pipeline: [\n { $match: { runtime: { $gt: 1000 } } },\n { $set: { category: \"Long Runtime\" } }\n ] } },\n { $project: { title: 1, year: 1, category: 1, _id: 0 } },\n { $sort: { category: 1, year: 1, title: 1 } }\n] )" + "sha256" : "edd1a35384b294715148b1f5a0568ef69324446c52c9f31873ffb68e1c0c7647", + "text" : "db.movies.aggregate( [\n { $match: { year: { $lt: 1910 } } },\n { $set: { category: \"Early Cinema\" } },\n { $unionWith: { coll: \"movies\", pipeline: [\n { $match: { runtime: { $gt: 1000 } } },\n { $set: { category: \"Long Runtime\" } }\n ] } },\n { $project: { title: 1, year: 1, category: 1, _id: 0 } },\n { $sort: { category: 1, year: 1, title: 1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "36607f65e66a539bb52638c0c2bf1f3193b9c6d10e77673a44e1c4401d260191", - "text" : "[\n { title: 'The Kiss', year: 1896, category: 'Early Cinema' },\n { title: 'The Kiss', year: 1896, category: 'Early Cinema' },\n { title: 'The Great Train Robbery', year: 1903, category: 'Early Cinema' },\n { title: 'A Corner in Wheat', year: 1909, category: 'Early Cinema' },\n { title: 'Centennial', year: 1978, category: 'Long Runtime' },\n { title: 'Baseball', year: 1994, category: 'Long Runtime' }\n]" + "sha256" : "b0ec50e44817961d5f76074e701172b376f06db673f3334806a8395cb2cb010c", + "text" : "[\n { title: 'The Kiss', year: 1896, category: 'Early Cinema' },\n { title: 'The Kiss', year: 1896, category: 'Early Cinema' },\n { title: 'The Great Train Robbery', year: 1903, category: 'Early Cinema' },\n { title: 'A Corner in Wheat', year: 1909, category: 'Early Cinema' },\n { title: 'Centennial', year: 1978, category: 'Long Runtime' },\n { title: 'Baseball', year: 1994, category: 'Long Runtime' }\n]\n" } ], "detail" : null, "owner" : null, @@ -10230,12 +9739,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "ffbe96be1339687b976a9fd4653b3772e50d337b28982ffc1528122d0f9297fd", - "text" : "db.movies.aggregate( [\n { $match: { year: { $lt: 1910 } } },\n { $unionWith: { coll: \"movies\", pipeline: [\n { $match: { runtime: { $gt: 1000 } } }\n ] } },\n { $group: { _id: \"$genres\", totalRuntime: { $sum: \"$runtime\" } } },\n { $sort: { totalRuntime: -1 } }\n] )" + "sha256" : "dd8912a7c22a2501bdb1f03bd568be88c59cb5c746b99356612ba96d43f460c7", + "text" : "db.movies.aggregate( [\n { $match: { year: { $lt: 1910 } } },\n { $unionWith: { coll: \"movies\", pipeline: [\n { $match: { runtime: { $gt: 1000 } } }\n ] } },\n { $group: { _id: \"$genres\", totalRuntime: { $sum: \"$runtime\" } } },\n { $sort: { totalRuntime: -1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "89bc1109a9bc57d9207150a9c1222e3595d63e2a4543de2f7e370d0a403c41a7", - "text" : "[\n { _id: [ 'Action', 'Adventure', 'Drama' ], totalRuntime: 1256 },\n { _id: [ 'Documentary', 'History', 'Sport' ], totalRuntime: 1140 },\n { _id: [ 'Short', 'Drama' ], totalRuntime: 14 },\n { _id: [ 'Short', 'Western' ], totalRuntime: 11 },\n { _id: [ 'Short', 'Romance' ], totalRuntime: 2 }\n]" + "sha256" : "73554c2dbfc2e40f674e3adb473e806f1adb6098e3ccf8a8fa62ca324ed285d7", + "text" : "[\n { _id: [ 'Action', 'Adventure', 'Drama' ], totalRuntime: 1256 },\n { _id: [ 'Documentary', 'History', 'Sport' ], totalRuntime: 1140 },\n { _id: [ 'Short', 'Drama' ], totalRuntime: 14 },\n { _id: [ 'Short', 'Western' ], totalRuntime: 11 },\n { _id: [ 'Short', 'Romance' ], totalRuntime: 2 }\n]\n" } ], "detail" : null, "owner" : null, @@ -10251,47 +9760,47 @@ "title" : "Create a Union with Specified Documents" } ], "includes" : [ { - "blob" : "8448eae6a4fdbf4ebdd9853165b4990f8bf8e992", - "path" : "content/manual/manual/source/includes/subpipeline-namespaces.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "8843d1352978918632a30c6ae8341f695fc0212d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/duplicates-output.sh" }, { "blob" : "505bef66e37bedfdd619d32e9ad1107d9f16bcc0", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/duplicates.snippet.union-with-duplicates.js" }, { - "blob" : "8843d1352978918632a30c6ae8341f695fc0212d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/duplicates-output.sh" + "blob" : "d475f11d8613020e3af04cf357795146d4a70e2d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/remove-duplicates-output.sh" }, { "blob" : "76ba765e37b48efb25a7aa69ba180d6a7ea92bb5", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/remove-duplicates.snippet.remove-duplicates.js" }, { - "blob" : "d475f11d8613020e3af04cf357795146d4a70e2d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/remove-duplicates-output.sh" + "blob" : "c213568053af5029acbf98b32c3fb2e6bb4e80fb", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/report-by-category-output.sh" }, { "blob" : "c5df103c13e14e4558b6a962f2e1e6ba6ade1b74", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/report-by-category.snippet.report-by-category.js" }, { - "blob" : "c213568053af5029acbf98b32c3fb2e6bb4e80fb", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/report-by-category-output.sh" + "blob" : "42b0eca545e16b5869d3f30f71cc62f6c8acd627", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/runtime-by-genre-output.sh" }, { "blob" : "639ebb9121d5132f7fb2a4fc1745c48479f6554a", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/runtime-by-genre.snippet.runtime-by-genre.js" }, { - "blob" : "42b0eca545e16b5869d3f30f71cc62f6c8acd627", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/runtime-by-genre-output.sh" + "blob" : "ab8d0288181edb703fb33983416082869bc852dd", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/specified-documents-output.sh" }, { "blob" : "080949ef06670bc5a891d1f86361324e9d9c3fdf", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/specified-documents.snippet.specified-documents.js" }, { - "blob" : "ab8d0288181edb703fb33983416082869bc852dd", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unionWith/specified-documents-output.sh" + "blob" : "37ed29f1a2b21570f82866250cf74ed6303207ed", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/Movie.snippet.movie-class.cs" + }, { + "blob" : "03f6364b2a0d9c4bc29d90a2ecb39ea135810374", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/OutputFiles/UnionWithOutput.txt" + }, { + "blob" : "46c7226ea73e9742691dcba887b2bf309651be55", + "path" : "content/code-examples/tested/csharp/driver/Aggregation/Builders/UnionWith.snippet.union-with.cs" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "unionWith", "pageBlob" : "df62ea1538e4db97d4a53249fa520b24eb54c63e", @@ -10304,18 +9813,45 @@ "context" : "aggregation/stages", "examples" : [ { "blocks" : [ ], - "detail" : null, - "owner" : "aggregation/stages/unset/removeASingleField", - "status" : "OWNED", + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", "stem" : null, - "title" : "Remove a Single Field" + "title" : "main" }, { "blocks" : [ ], - "detail" : null, - "owner" : "aggregation/stages/unset/removeTopLevelFields", + "detail" : "matched by action text", + "owner" : "aggregation/stages/unset/removeASingleField", "status" : "OWNED", "stem" : null, - "title" : "Remove Top-Level Fields" + "title" : "Remove a Single Field" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "f7cc28f6383f97c7fb18ac2719800a80c721ae960daf5d21a4467a3c9d732d32", + "text" : "db.books.insertMany([\n { \"_id\" : 1, title: \"Antelope Antics\", isbn: \"0001122223334\", author: { last:\"An\", first: \"Auntie\" }, copies: [ { warehouse: \"A\", qty: 5 }, { warehouse: \"B\", qty: 15 } ] },\n { \"_id\" : 2, title: \"Bees Babble\", isbn: \"999999999333\", author: { last:\"Bumble\", first: \"Bee\" }, copies: [ { warehouse: \"A\", qty: 2 }, { warehouse: \"B\", qty: 5 } ] }\n])" + }, { + "role" : "ACTION", + "sha256" : "ece2a983c98fad3ac7eb876b2c7aaa0af140051a35199fe2bb04dc065d310903", + "text" : "db.books.aggregate([ { $unset: [ \"copies\" ] } ])" + }, { + "role" : "EXPECTED", + "sha256" : "013e6b17c8c4274395a49ed8ae7e2da0f9dd1819afcc37b3e4d93567a3b3af50", + "text" : "{ \"_id\" : 1, \"title\" : \"Antelope Antics\", \"isbn\" : \"0001122223334\", \"author\" : { \"last\" : \"An\", \"first\" : \"Auntie\" } }\n{ \"_id\" : 2, \"title\" : \"Bees Babble\", \"isbn\" : \"999999999333\", \"author\" : { \"last\" : \"Bumble\", \"first\" : \"Bee\" } }" + } ], + "detail" : null, + "name" : "Remove a Field Listed in an Array", + "owner" : null, + "status" : "UNOWNED", + "stem" : "removeAFieldListedInAnArray", + "title" : "Remove a Single Field" + }, { + "blocks" : [ ], + "detail" : null, + "owner" : "aggregation/stages/unset/removeTopLevelFields", + "status" : "OWNED", + "stem" : null, + "title" : "Remove Top-Level Fields" }, { "blocks" : [ ], "detail" : null, @@ -10325,11 +9861,8 @@ "title" : "Remove Embedded Fields" } ], "includes" : [ { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "unset", "pageBlob" : "6bac9a1afafa9bb673c14959c1daa170d7a87402", @@ -10355,21 +9888,44 @@ "stem" : null, "title" : "Missing or Non-array Values" }, { - "blocks" : [ ], - "detail" : "matched by name", - "owner" : "aggregation/stages/unwind/preserveNullAndEmptyArraysAndIncludeArrayIndex", - "status" : "OWNED", - "stem" : null, - "title" : "preserveNullAndEmptyArrays and includeArrayIndex" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "5436669d60c09e1b6211f28f43affb4c027b2e21705ba9251e43c754bc66dfe5", + "text" : "db.movies.aggregate( [\n {\n $match: {\n title: {\n $in: [\n \"Inception\",\n \"Brave\",\n \"La porta del cielo\",\n \"Neecha Nagar\"\n ]\n }\n }\n },\n { $project: { _id: 0, title: 1, genres: 1 } },\n {\n $unwind: {\n path: \"$genres\",\n preserveNullAndEmptyArrays: true\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "da961b7ec1cc7848f4d9316407be75760c717c51dc1db7b8a127f582b8f33319", + "text" : "[\n {\n title: 'La porta del cielo'\n },\n {\n title: 'Neecha Nagar'\n },\n {\n genres: 'Animation',\n title: 'Brave'\n },\n {\n genres: 'Adventure',\n title: 'Brave'\n },\n {\n genres: 'Comedy',\n title: 'Brave'\n },\n {\n genres: 'Action',\n title: 'Inception'\n },\n {\n genres: 'Mystery',\n title: 'Inception'\n },\n {\n genres: 'Sci-Fi',\n title: 'Inception'\n }\n]\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "preserveNullAndEmptyArrays", + "title" : "preserveNullAndEmptyArrays" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "b26f3a4f2a49f6db24a3a40ccf8aad5178100373a85a46c6a819eb793100095a", + "text" : "db.movies.aggregate( [\n { $match: { title: \"Inception\" } },\n { $project: { _id: 0, title: 1, genres: 1 } },\n {\n $unwind: {\n path: \"$genres\",\n includeArrayIndex: \"genreIndex\"\n }\n }\n] )\n" + }, { + "role" : "EXPECTED", + "sha256" : "dc9af090ab08889629c7bdce6f658d7aec52307ed9b404a7a1f3a068f7554e10", + "text" : "[\n {\n genres: 'Action',\n title: 'Inception',\n genreIndex: Long('0')\n },\n {\n genres: 'Mystery',\n title: 'Inception',\n genreIndex: Long('1')\n },\n {\n genres: 'Sci-Fi',\n title: 'Inception',\n genreIndex: Long('2')\n }\n]\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "includeArrayIndex", + "title" : "includeArrayIndex" }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "d3fa78405bda163790db0dd0b05ddd837195e41607d0adcecdbe6517bca1ff4e", - "text" : "db.movies.aggregate( [\n // First Stage\n {\n $match: {\n title: {\n $in: [\n \"The Dark Knight\",\n \"Inception\",\n \"Interstellar\",\n \"Brave\"\n ]\n }\n }\n },\n // Second Stage\n { $project: { _id: 0, title: 1, genres: 1 } },\n // Third Stage\n { $unwind: \"$genres\" },\n // Fourth Stage\n {\n $group: {\n _id: \"$genres\",\n movieCount: { $sum: 1 }\n }\n },\n // Fifth Stage\n { $sort: { movieCount: -1 } }\n] )" + "sha256" : "19c514a1868bd87cffc1c2fee760baeac09491992523d92ea44f8c233d148c06", + "text" : "db.movies.aggregate( [\n // First Stage\n {\n $match: {\n title: {\n $in: [\n \"The Dark Knight\",\n \"Inception\",\n \"Interstellar\",\n \"Brave\"\n ]\n }\n }\n },\n // Second Stage\n { $project: { _id: 0, title: 1, genres: 1 } },\n // Third Stage\n { $unwind: \"$genres\" },\n // Fourth Stage\n {\n $group: {\n _id: \"$genres\",\n movieCount: { $sum: 1 }\n }\n },\n // Fifth Stage\n { $sort: { movieCount: -1 } }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "3fc69735e301c7f3946a15a26d2d08fa28e9d9d1bb5a058810f3d6273e39cefb", - "text" : "[\n {\n _id: 'Adventure',\n movieCount: 2\n },\n {\n _id: 'Action',\n movieCount: 2\n },\n {\n _id: 'Drama',\n movieCount: 2\n },\n {\n _id: 'Sci-Fi',\n movieCount: 2\n },\n {\n _id: 'Crime',\n movieCount: 1\n },\n {\n _id: 'Animation',\n movieCount: 1\n },\n {\n _id: 'Comedy',\n movieCount: 1\n },\n {\n _id: 'Mystery',\n movieCount: 1\n }\n]" + "sha256" : "e00f76e17739308fdafcb1cb12b4957c11e6d354097e3dc1c2e03c18f3c3998a", + "text" : "[\n {\n _id: 'Adventure',\n movieCount: 2\n },\n {\n _id: 'Action',\n movieCount: 2\n },\n {\n _id: 'Drama',\n movieCount: 2\n },\n {\n _id: 'Sci-Fi',\n movieCount: 2\n },\n {\n _id: 'Crime',\n movieCount: 1\n },\n {\n _id: 'Animation',\n movieCount: 1\n },\n {\n _id: 'Comedy',\n movieCount: 1\n },\n {\n _id: 'Mystery',\n movieCount: 1\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -10379,12 +9935,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "3e7703140527dd2e7b8198da9a7845f9ea3a8032fc5da0bdfa091b15dbc11f1f", - "text" : "db.movies.aggregate( [\n // First Stage\n {\n $match: {\n title: {\n $in: [ \"Inception\", \"The Dark Knight\", \"Interstellar\" ]\n }\n }\n },\n // Second Stage\n { $project: { _id: 0, title: 1, genres: 1, cast: 1 } },\n // Third Stage\n { $unwind: \"$genres\" },\n // Fourth Stage\n { $unwind: \"$cast\" },\n // Fifth Stage\n {\n $group: {\n _id: \"$genres\",\n castAppearances: { $sum: 1 }\n }\n }\n] )" + "sha256" : "daaf821b4632d7bfa6e41a7ee510735baf8a102f1b18fef2bfb145a2ef627302", + "text" : "db.movies.aggregate( [\n // First Stage\n {\n $match: {\n title: {\n $in: [ \"Inception\", \"The Dark Knight\", \"Interstellar\" ]\n }\n }\n },\n // Second Stage\n { $project: { _id: 0, title: 1, genres: 1, cast: 1 } },\n // Third Stage\n { $unwind: \"$genres\" },\n // Fourth Stage\n { $unwind: \"$cast\" },\n // Fifth Stage\n {\n $group: {\n _id: \"$genres\",\n castAppearances: { $sum: 1 }\n }\n }\n] )\n" }, { "role" : "EXPECTED", - "sha256" : "f8b6caed7ee694c7397091099b6ca5bd93e6598b27b830cc9e874e53e8ab0f5e", - "text" : "[\n {\n _id: 'Adventure',\n castAppearances: 4\n },\n {\n _id: 'Crime',\n castAppearances: 4\n },\n {\n _id: 'Action',\n castAppearances: 8\n },\n {\n _id: 'Drama',\n castAppearances: 8\n },\n {\n _id: 'Mystery',\n castAppearances: 4\n },\n {\n _id: 'Sci-Fi',\n castAppearances: 8\n }\n]" + "sha256" : "6bd31e582b99bf8b9760ecafc89041d36d716bb279700a50827e5de1b47aca39", + "text" : "[\n {\n _id: 'Adventure',\n castAppearances: 4\n },\n {\n _id: 'Crime',\n castAppearances: 4\n },\n {\n _id: 'Action',\n castAppearances: 8\n },\n {\n _id: 'Drama',\n castAppearances: 8\n },\n {\n _id: 'Mystery',\n castAppearances: 4\n },\n {\n _id: 'Sci-Fi',\n castAppearances: 8\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -10393,71 +9949,50 @@ "title" : "Unwind Multiple Array Fields" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "97bd14c5e162b994ded2808d0570b178588b5731", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/sample-data-movie.rst" - }, { - "blob" : "f7c6ec562b7d84d7572cf9bb0653430d55c5fca8", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/convention-pack-note.rst" + "blob" : "9e6c8a3a732eecb8a8d14075cb745f28bdb478dc", + "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/Movie.cs" }, { - "blob" : "ee647c08862815d574922531a022424144e6fdd4", - "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/method-intro.rst" - }, { - "blob" : "0cddf475a176062e830da309cba006943c376330", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/sample-mflix.rst" - }, { - "blob" : "90d81cb156703df5a762055cb3ac5d132284f556", - "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/stage-intro.rst" + "blob" : "b23d624919053e101a71f473f731c42af51415ff", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/group-by-unwound-output.sh" }, { - "blob" : "c08ea3b8c80a839bef0362219ca69c764b5f0839", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/unwind-array.snippet.unwind-array.js" + "blob" : "c9c0c1531dc9d86439a485e1eb9575ed78b7d57d", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/group-by-unwound.snippet.group-by-unwound.js" }, { - "blob" : "46546e2207ec2a619aa4dfc23d4c50b2059e256b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/unwind-array-output.sh" + "blob" : "128e558f6d6719b9e9e8df577801c608c6889f2c", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/include-array-index-output.sh" }, { - "blob" : "ef126e2650d0aafd53ce530b80f84937caf92769", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/missing-values.snippet.missing-values.js" + "blob" : "48f47bbdff7aef9ef51ce91d77fbca56d047c2ab", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/include-array-index.snippet.include-array-index.js" }, { "blob" : "7b3757a9e188149dbdc3f15319ae0988be8ecbd5", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/missing-values-output.sh" }, { - "blob" : "7034d61424036a5377068c7c453c1bf623a2d0a3", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/preserve-null.snippet.preserve-null.js" + "blob" : "ef126e2650d0aafd53ce530b80f84937caf92769", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/missing-values.snippet.missing-values.js" }, { "blob" : "5b448cfc23013d81949a285fc2b067c56c4090c1", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/preserve-null-output.sh" }, { - "blob" : "48f47bbdff7aef9ef51ce91d77fbca56d047c2ab", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/include-array-index.snippet.include-array-index.js" + "blob" : "7034d61424036a5377068c7c453c1bf623a2d0a3", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/preserve-null.snippet.preserve-null.js" }, { - "blob" : "128e558f6d6719b9e9e8df577801c608c6889f2c", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/include-array-index-output.sh" + "blob" : "46546e2207ec2a619aa4dfc23d4c50b2059e256b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/unwind-array-output.sh" }, { - "blob" : "c9c0c1531dc9d86439a485e1eb9575ed78b7d57d", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/group-by-unwound.snippet.group-by-unwound.js" + "blob" : "c08ea3b8c80a839bef0362219ca69c764b5f0839", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/unwind-array.snippet.unwind-array.js" }, { - "blob" : "b23d624919053e101a71f473f731c42af51415ff", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/group-by-unwound-output.sh" + "blob" : "31a2473a484390de18b47f6b8490ed7e27b2c7d0", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/unwind-multiple-arrays-output.sh" }, { "blob" : "4368c161a2ca1c469e1a99711d6388649fb36883", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/unwind-multiple-arrays.snippet.unwind-multiple-arrays.js" }, { - "blob" : "31a2473a484390de18b47f6b8490ed7e27b2c7d0", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/stages/unwind/unwind-multiple-arrays-output.sh" + "blob" : "129e06800d3e819b8d58d9e4264d09382ea7c1b0", + "path" : "content/manual/manual/source/includes/driver-examples/csharp/aggregation/BuildersExamples.cs" + }, { + "blob" : "c243d04a813c8fca7ff41b3b0da789ce3a06a3d8", + "path" : "content/manual/manual/source/includes/driver-examples/node/aggregation/examples.js" } ], "operator" : "unwind", "pageBlob" : "195393b7aefd488cbd70cbdab4478fde747707f1", @@ -10470,35 +10005,44 @@ "context" : "query/filters", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/filters/all/useAllToMatchValues", "status" : "OWNED", "stem" : null, - "title" : "Use ``$all`` to Match Values" + "title" : "Use $all to Match Values" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/filters/all/useAllWithElemMatch", "status" : "OWNED", "stem" : null, - "title" : "Use ``$all`` with ``$elemMatch``" - } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" + "title" : "Use $all with $elemMatch" }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "9df4c250c25187aa89ed3bc35a07830b6b2270c5145c56113b22a02d72913ec8", + "text" : "db.inventory.find( { \"qty.num\": { $all: [ 50 ] } } )" + } ], + "detail" : "UNSUPPORTED_SHARED_SETUP", + "name" : "Match an Embedded Value with $all", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "matchAnEmbeddedValueWithAll", + "title" : "Use $all with $elemMatch" }, { - "blob" : "b633a0a267dc0b55feafbfc238e5bc216b1376b0", - "path" : "content/manual/manual/source/includes/arrays-additional-examples.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "db71c785bd9d2b8cc50cfeaa1354b9a5cc0c115cd28b3f187c33c55d4f01f023", + "text" : "db.inventory.find( { \"qty.num\" : 50 } )" + } ], + "detail" : "UNSUPPORTED_SHARED_SETUP", + "name" : "Match an Embedded Value by Equality", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "matchAnEmbeddedValueByEquality", + "title" : "Use $all with $elemMatch" } ], + "includes" : [ ], "operator" : "all", "pageBlob" : "06c88ad754b8abef8f6c48849daf6168d2bbb64f", "source" : { @@ -10515,23 +10059,68 @@ "status" : "OWNED", "stem" : null, "title" : "main" - } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "28a99f0a8e170bca63b8ffa9b9d3b8ab8dff105974ae92ec3e5e8d7c4fae3f39", + "text" : "db.inventory.find( { price: { $ne: 1.99, $exists: true } } )" + } ], + "detail" : null, + "name" : "Combine Conditions on One Field", + "owner" : null, + "status" : "UNOWNED", + "stem" : "combineConditionsOnOneField", + "title" : "main" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "01c4c2bdf27ece8ae1c7fb76cb7a4e391da68e3504fb218451945f2e0a05fb23", + "text" : "db.inventory.find( { status: { $nin: [ \"closed\", \"archived\" ] } } )" + } ], + "detail" : null, + "name" : "Exclude Values with $nin", + "owner" : null, + "status" : "UNOWNED", + "stem" : "excludeValuesWithNin", + "title" : "main" }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "45bbfcbf2f4dc2eefa58e9b3c891291e8263ae66eedc3d9bde2cadba67e731b7", + "text" : "db.inventory.find( {\n $and: [\n { status: \"new\" },\n { status: \"processing\" }\n ]\n} )" + } ], + "detail" : null, + "name" : "Require Two Values of One Field", + "owner" : null, + "status" : "UNOWNED", + "stem" : "requireTwoValuesOfOneField", + "title" : "main" }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "52f711d8006cd8dd53d6e04cf64af1c390ef6a4b323b8e139a84dc1354d57a83", + "text" : "db.inventory.find( { status: { $in: [ \"new\", \"processing\" ] } } )" + } ], + "detail" : null, + "name" : "Match Either Value with $in", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchEitherValueWithIn", + "title" : "main" }, { - "blob" : "36b8606b42ed0e98425051200767e7f63870dbbf", - "path" : "content/manual/manual/source/includes/and-or-behavior.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "d8d657b3619f44da4b125870bb74e8a29c2af06aa1da887a4f42ab3f4619fa53", + "text" : "db.inventory.find( { status: { $all: [ \"new\", \"processing\" ] } } )" + } ], + "detail" : null, + "name" : "Require Both Values with $all", + "owner" : null, + "status" : "UNOWNED", + "stem" : "requireBothValuesWithAll", + "title" : "main" } ], + "includes" : [ ], "operator" : "and", "pageBlob" : "1a640af206a5d59f2c0551c68869bb11ec14f504", "source" : { @@ -10563,13 +10152,7 @@ "stem" : null, "title" : "BinData Bitmask" } ], - "includes" : [ { - "blob" : "afbd145c74b39307f276191e848f7b1fd3d4abfc", - "path" : "content/manual/manual/source/includes/extracts-fact-query-bitwise.yaml" - }, { - "blob" : "8c0e5bd69b54bae71656f0530221d81ecc617c2e", - "path" : "content/manual/manual/source/includes/fact-bindata-endian.rst" - } ], + "includes" : [ ], "operator" : "bitsAllClear", "pageBlob" : "6d2fc32fef28e23dc7039708780c97b20e3c1ad0", "source" : { @@ -10601,13 +10184,7 @@ "stem" : null, "title" : "BinData Bitmask" } ], - "includes" : [ { - "blob" : "afbd145c74b39307f276191e848f7b1fd3d4abfc", - "path" : "content/manual/manual/source/includes/extracts-fact-query-bitwise.yaml" - }, { - "blob" : "8c0e5bd69b54bae71656f0530221d81ecc617c2e", - "path" : "content/manual/manual/source/includes/fact-bindata-endian.rst" - } ], + "includes" : [ ], "operator" : "bitsAllSet", "pageBlob" : "3895a4c52b4a08544d63e00f60709386f6d4e2ce", "source" : { @@ -10639,13 +10216,7 @@ "stem" : null, "title" : "BinData Bitmask" } ], - "includes" : [ { - "blob" : "afbd145c74b39307f276191e848f7b1fd3d4abfc", - "path" : "content/manual/manual/source/includes/extracts-fact-query-bitwise.yaml" - }, { - "blob" : "8c0e5bd69b54bae71656f0530221d81ecc617c2e", - "path" : "content/manual/manual/source/includes/fact-bindata-endian.rst" - } ], + "includes" : [ ], "operator" : "bitsAnyClear", "pageBlob" : "68bb626f82cea155b5f2c57798be48d631c746e4", "source" : { @@ -10677,13 +10248,7 @@ "stem" : null, "title" : "BinData Bitmask" } ], - "includes" : [ { - "blob" : "afbd145c74b39307f276191e848f7b1fd3d4abfc", - "path" : "content/manual/manual/source/includes/extracts-fact-query-bitwise.yaml" - }, { - "blob" : "8c0e5bd69b54bae71656f0530221d81ecc617c2e", - "path" : "content/manual/manual/source/includes/fact-bindata-endian.rst" - } ], + "includes" : [ ], "operator" : "bitsAnySet", "pageBlob" : "59f4b0a3195fcbcc027dff60d764f7e40fe92089", "source" : { @@ -10701,10 +10266,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "231e34e5ae706bd4cce129c3601d1066b2e85d8c", - "path" : "content/manual/manual/source/includes/note-geospatial-index-must-exist.rst" - } ], + "includes" : [ ], "operator" : "box", "pageBlob" : "f56219d1e2e0a87341c169f23de6e1257d1d9608", "source" : { @@ -10722,10 +10284,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "231e34e5ae706bd4cce129c3601d1066b2e85d8c", - "path" : "content/manual/manual/source/includes/note-geospatial-index-must-exist.rst" - } ], + "includes" : [ ], "operator" : "center", "pageBlob" : "61d3684663b770a699006e167d18babfa81684d3", "source" : { @@ -10736,22 +10295,14 @@ }, { "context" : "query/filters", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "963bdeceb39203228430f08c78f97836836db783f61a56b4a82fbef8d8efdbe0", - "text" : "db.places.find( {\n loc: { $geoWithin: { $centerSphere: [ [ -88, 30 ], 10/3963.2 ] } }\n} )" - } ], - "detail" : null, - "name" : "Find Places Within a Spherical Radius", + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", - "stem" : "findPlacesWithinASphericalRadius", + "status" : "UNSUPPORTED", + "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "231e34e5ae706bd4cce129c3601d1066b2e85d8c", - "path" : "content/manual/manual/source/includes/note-geospatial-index-must-exist.rst" - } ], + "includes" : [ ], "operator" : "centerSphere", "pageBlob" : "9f74d15b869b494c43fed36371ee8724da2da22f", "source" : { @@ -10777,40 +10328,86 @@ "title" : "Array of Embedded Documents" }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "987818285977076a71cd3ffc9de10d14f2b993c73a97b80dac500f8fe9483560", + "text" : "db.survey.insertMany( [\n { \"_id\": 1, \"results\": [ { \"product\": \"abc\", \"score\": 10 },\n { \"product\": \"xyz\", \"score\": 5 } ] },\n { \"_id\": 2, \"results\": [ { \"product\": \"abc\", \"score\": 8 },\n { \"product\": \"xyz\", \"score\": 7 } ] },\n { \"_id\": 3, \"results\": [ { \"product\": \"abc\", \"score\": 7 },\n { \"product\": \"xyz\", \"score\": 8 } ] },\n { \"_id\": 4, \"results\": [ { \"product\": \"abc\", \"score\": 7 },\n { \"product\": \"def\", \"score\": 8 } ] },\n { \"_id\": 5, \"results\": { \"product\": \"xyz\", \"score\": 7 } }\n] )" + }, { "role" : "ACTION", "sha256" : "b40eaf38890d9f3c8b3e2f425bb8a0a034addeb69019e1f92100e25e63c0f398", "text" : "db.survey.find(\n { results: { $elemMatch: { product: \"xyz\" } } }\n)" - }, { - "role" : "DATA", - "sha256" : "4c97a99506b224d716ac57a4fc0ee43628b0ee18ac1b810944100c94bdd2edb9", - "text" : "{ _id: 1, results: [ 82, 85, 88 ] }\n{ _id: 2, results: [ 75, 88, 89 ] }" }, { "role" : "EXPECTED", "sha256" : "448d2cbea4caa43d75a123f6b0d4a7b3375b8c9381a6cba0a8a25d6b7c35b432", "text" : "[\n {\n _id: 1,\n results: [ { product: 'abc', score: 10 }, { product: 'xyz', score: 5 } ]\n },\n {\n _id: 2,\n results: [ { product: 'abc', score: 8 }, { product: 'xyz', score: 7 } ]\n },\n {\n _id: 3,\n results: [ { product: 'abc', score: 7 }, { product: 'xyz', score: 8 } ]\n }\n]" } ], "detail" : null, + "name" : "Match an Element with $elemMatch", "owner" : null, "status" : "UNOWNED", - "stem" : "singleQueryCondition", - "title" : "Single Query Condition" - } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" + "stem" : "matchAnElementWithElemMatch", + "title" : "main" }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" + "blocks" : [ { + "role" : "DATA", + "sha256" : "987818285977076a71cd3ffc9de10d14f2b993c73a97b80dac500f8fe9483560", + "text" : "db.survey.insertMany( [\n { \"_id\": 1, \"results\": [ { \"product\": \"abc\", \"score\": 10 },\n { \"product\": \"xyz\", \"score\": 5 } ] },\n { \"_id\": 2, \"results\": [ { \"product\": \"abc\", \"score\": 8 },\n { \"product\": \"xyz\", \"score\": 7 } ] },\n { \"_id\": 3, \"results\": [ { \"product\": \"abc\", \"score\": 7 },\n { \"product\": \"xyz\", \"score\": 8 } ] },\n { \"_id\": 4, \"results\": [ { \"product\": \"abc\", \"score\": 7 },\n { \"product\": \"def\", \"score\": 8 } ] },\n { \"_id\": 5, \"results\": { \"product\": \"xyz\", \"score\": 7 } }\n] )" + }, { + "role" : "ACTION", + "sha256" : "e0d42a14f07c83ab23e2dc5ce14829ab9984fa6f2ddf734b6d36e8f65d89bf5f", + "text" : "db.survey.find(\n { \"results.product\": \"xyz\" }\n)" + }, { + "role" : "EXPECTED", + "sha256" : "414fce701902e79eb9d6dda9bac84bd400f24e40a021deaf975abcbb51f44b74", + "text" : "[\n {\n _id: 1,\n results: [ { product: 'abc', score: 10 }, { product: 'xyz', score: 5 } ]\n },\n {\n _id: 2,\n results: [ { product: 'abc', score: 8 }, { product: 'xyz', score: 7 } ]\n },\n {\n _id: 3,\n results: [ { product: 'abc', score: 7 }, { product: 'xyz', score: 8 } ]\n },\n { _id: 5, results: { product: 'xyz', score: 7 } }\n]" + } ], + "detail" : null, + "name" : "Match an Element with Dot Notation", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchAnElementWithDotNotation", + "title" : "main" }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" + "blocks" : [ { + "role" : "DATA", + "sha256" : "987818285977076a71cd3ffc9de10d14f2b993c73a97b80dac500f8fe9483560", + "text" : "db.survey.insertMany( [\n { \"_id\": 1, \"results\": [ { \"product\": \"abc\", \"score\": 10 },\n { \"product\": \"xyz\", \"score\": 5 } ] },\n { \"_id\": 2, \"results\": [ { \"product\": \"abc\", \"score\": 8 },\n { \"product\": \"xyz\", \"score\": 7 } ] },\n { \"_id\": 3, \"results\": [ { \"product\": \"abc\", \"score\": 7 },\n { \"product\": \"xyz\", \"score\": 8 } ] },\n { \"_id\": 4, \"results\": [ { \"product\": \"abc\", \"score\": 7 },\n { \"product\": \"def\", \"score\": 8 } ] },\n { \"_id\": 5, \"results\": { \"product\": \"xyz\", \"score\": 7 } }\n] )" + }, { + "role" : "ACTION", + "sha256" : "d5529215930ae1f790336fcfd9dda0a8fa427a734b279be5b9798da979ae396d", + "text" : "db.survey.find(\n { \"results\": { $elemMatch: { product: { $ne: \"xyz\" } } } }\n)" + }, { + "role" : "EXPECTED", + "sha256" : "b3028b2639084464c1682321b2892593aac75fa79db30b502f1c6bd406240e4a", + "text" : "{ \"_id\" : 1, \"results\" : [ { \"product\" : \"abc\", \"score\" : 10 },\n { \"product\" : \"xyz\", \"score\" : 5 } ] }\n{ \"_id\" : 2, \"results\" : [ { \"product\" : \"abc\", \"score\" : 8 },\n { \"product\" : \"xyz\", \"score\" : 7 } ] }\n{ \"_id\" : 3, \"results\" : [ { \"product\" : \"abc\", \"score\" : 7 },\n { \"product\" : \"xyz\", \"score\" : 8 } ] }\n{ \"_id\" : 4, \"results\" : [ { \"product\" : \"abc\", \"score\" : 7 },\n { \"product\" : \"def\", \"score\" : 8 } ] }" + } ], + "detail" : null, + "name" : "Match an Element That Isn't xyz", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchAnElementThatIsnTXyz", + "title" : "main" }, { - "blob" : "b633a0a267dc0b55feafbfc238e5bc216b1376b0", - "path" : "content/manual/manual/source/includes/arrays-additional-examples.rst" + "blocks" : [ { + "role" : "DATA", + "sha256" : "987818285977076a71cd3ffc9de10d14f2b993c73a97b80dac500f8fe9483560", + "text" : "db.survey.insertMany( [\n { \"_id\": 1, \"results\": [ { \"product\": \"abc\", \"score\": 10 },\n { \"product\": \"xyz\", \"score\": 5 } ] },\n { \"_id\": 2, \"results\": [ { \"product\": \"abc\", \"score\": 8 },\n { \"product\": \"xyz\", \"score\": 7 } ] },\n { \"_id\": 3, \"results\": [ { \"product\": \"abc\", \"score\": 7 },\n { \"product\": \"xyz\", \"score\": 8 } ] },\n { \"_id\": 4, \"results\": [ { \"product\": \"abc\", \"score\": 7 },\n { \"product\": \"def\", \"score\": 8 } ] },\n { \"_id\": 5, \"results\": { \"product\": \"xyz\", \"score\": 7 } }\n] )" + }, { + "role" : "ACTION", + "sha256" : "d4ee8e7e028a7949ac7541f34ed9d3c5df6fd510697da063ee7950c872233c40", + "text" : "db.survey.find(\n { \"results.product\": { $ne: \"xyz\" } }\n)" + }, { + "role" : "EXPECTED", + "sha256" : "767a723a7f1ecb3a180d34cf6b79c1023adcdc788060bdcff948e6640119a18d", + "text" : "{ \"_id\" : 4, \"results\" : [ { \"product\" : \"abc\", \"score\" : 7 },\n { \"product\" : \"def\", \"score\" : 8 } ] }" + } ], + "detail" : null, + "name" : "Match When No Element Is xyz", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchWhenNoElementIsXyz", + "title" : "main" } ], + "includes" : [ ], "operator" : "elemMatch", "pageBlob" : "dad451e32460ad48e14e220c45c4c4cf2475eaf0", "source" : { @@ -10822,45 +10419,125 @@ "context" : "query/filters", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/filters/eq/equalsASpecifiedValue", "status" : "OWNED", "stem" : null, "title" : "Equals a Specified Value" }, { - "blocks" : [ ], + "blocks" : [ { + "role" : "DATA", + "sha256" : "51abd3c3389d41b63baff1599996b7aede0843ff018f1c2e72f83e5c940dd1d7", + "text" : "db.inventory.insertMany( [\n { _id: 1, item: { name: \"ab\", code: \"123\" }, qty: 15, tags: [ \"A\", \"B\", \"C\" ] },\n { _id: 2, item: { name: \"cd\", code: \"123\" }, qty: 20, tags: [ \"B\" ] },\n { _id: 3, item: { name: \"ij\", code: \"456\" }, qty: 25, tags: [ \"A\", \"B\" ] },\n { _id: 4, item: { name: \"xy\", code: \"456\" }, qty: 30, tags: [ \"B\", \"A\" ] },\n { _id: 5, item: { name: \"mn\", code: \"000\" }, qty: 20, tags: [ [ \"A\", \"B\" ], \"C\" ] }\n] )" + }, { + "role" : "ACTION", + "sha256" : "e1ffe9129e84a91107a98566d5c0ac064cf528a52979b8b5dd5e4d3ef986e143", + "text" : "db.inventory.find( { qty: 20 } )" + }, { + "role" : "EXPECTED", + "sha256" : "35747647312bc0ba19afc47521a5f541814884e1cd45c70a15982ad3839e7322", + "text" : "[\n { _id: 2, item: { name: \"cd\", code: \"123\" }, qty: 20, tags: [ \"B\" ] },\n { _id: 5, item: { name: \"mn\", code: \"000\" }, qty: 20, tags: [ [ \"A\", \"B\" ], \"C\" ] }\n]" + } ], "detail" : null, + "name" : "Match a Quantity Exactly", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchAQuantityExactly", + "title" : "Equals a Specified Value" + }, { + "blocks" : [ ], + "detail" : "matched by action text", "owner" : "query/filters/eq/fieldInEmbeddedDocumentEqualsAValue", "status" : "OWNED", "stem" : null, "title" : "Field in Embedded Document Equals a Value" }, { - "blocks" : [ ], + "blocks" : [ { + "role" : "DATA", + "sha256" : "51abd3c3389d41b63baff1599996b7aede0843ff018f1c2e72f83e5c940dd1d7", + "text" : "db.inventory.insertMany( [\n { _id: 1, item: { name: \"ab\", code: \"123\" }, qty: 15, tags: [ \"A\", \"B\", \"C\" ] },\n { _id: 2, item: { name: \"cd\", code: \"123\" }, qty: 20, tags: [ \"B\" ] },\n { _id: 3, item: { name: \"ij\", code: \"456\" }, qty: 25, tags: [ \"A\", \"B\" ] },\n { _id: 4, item: { name: \"xy\", code: \"456\" }, qty: 30, tags: [ \"B\", \"A\" ] },\n { _id: 5, item: { name: \"mn\", code: \"000\" }, qty: 20, tags: [ [ \"A\", \"B\" ], \"C\" ] }\n] )" + }, { + "role" : "ACTION", + "sha256" : "c6d631398ae13f757366fbf1e152f3eae1ce476102154fceca2b6749a93945dc", + "text" : "db.inventory.find( { \"item.name\": \"ab\" } )" + }, { + "role" : "EXPECTED", + "sha256" : "a0e6803bed9bd4364e5a0ca0f79724346ff70632de16ffc4012cb48e8c82e6c9", + "text" : "[ { _id: 1, item: { name: \"ab\", code: \"123\" }, qty: 15, tags: [ \"A\", \"B\", \"C\" ] } ]" + } ], "detail" : null, - "owner" : "query/filters/eq/arrayElementEqualsAValue", - "status" : "OWNED", - "stem" : null, - "title" : "Array Element Equals a Value" + "name" : "Match an Embedded Field with Dot Notation", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchAnEmbeddedFieldWithDotNotation", + "title" : "Field in Embedded Document Equals a Value" }, { "blocks" : [ ], - "detail" : null, - "owner" : "query/filters/eq/equalsAnArrayValue", + "detail" : "matched by action text", + "owner" : "query/filters/eq/arrayElementEqualsAValue", "status" : "OWNED", "stem" : null, - "title" : "Equals an Array Value" + "title" : "Array Element Equals a Value" }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "51abd3c3389d41b63baff1599996b7aede0843ff018f1c2e72f83e5c940dd1d7", + "text" : "db.inventory.insertMany( [\n { _id: 1, item: { name: \"ab\", code: \"123\" }, qty: 15, tags: [ \"A\", \"B\", \"C\" ] },\n { _id: 2, item: { name: \"cd\", code: \"123\" }, qty: 20, tags: [ \"B\" ] },\n { _id: 3, item: { name: \"ij\", code: \"456\" }, qty: 25, tags: [ \"A\", \"B\" ] },\n { _id: 4, item: { name: \"xy\", code: \"456\" }, qty: 30, tags: [ \"B\", \"A\" ] },\n { _id: 5, item: { name: \"mn\", code: \"000\" }, qty: 20, tags: [ [ \"A\", \"B\" ], \"C\" ] }\n] )" + }, { "role" : "ACTION", - "sha256" : "12e0426e5b7c0caeaf0ecccfd42781733bf0c5f983092b01d5e88f51bfe4821f", - "text" : "db.collection.find( { company: \"MongoDB\" }, {_id: 0 })\ndb.collection.find( { company: { $eq: \"MongoDB\" } }, {_id: 0 } )" + "sha256" : "cec796547f5dedb0a18f94df5235860d4e5a48bd9dd47188ca8b8a4d2e7c472f", + "text" : "db.inventory.find( { tags: \"B\" } )" + }, { + "role" : "EXPECTED", + "sha256" : "2c8b935b37dd335eea90126089179f2347150def3261ac1c5cfc4b881674d2cc", + "text" : "[\n { _id: 1, item: { name: \"ab\", code: \"123\" }, qty: 15, tags: [ \"A\", \"B\", \"C\" ] },\n { _id: 2, item: { name: \"cd\", code: \"123\" }, qty: 20, tags: [ \"B\" ] },\n { _id: 3, item: { name: \"ij\", code: \"456\" }, qty: 25, tags: [ \"A\", \"B\" ] },\n { _id: 4, item: { name: \"xy\", code: \"456\" }, qty: 30, tags: [ \"B\", \"A\" ] }\n]" + } ], + "detail" : null, + "name" : "Match One Array Element", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchOneArrayElement", + "title" : "Array Element Equals a Value" + }, { + "blocks" : [ ], + "detail" : "matched by action text", + "owner" : "query/filters/eq/equalsAnArrayValue", + "status" : "OWNED", + "stem" : null, + "title" : "Equals an Array Value" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "51abd3c3389d41b63baff1599996b7aede0843ff018f1c2e72f83e5c940dd1d7", + "text" : "db.inventory.insertMany( [\n { _id: 1, item: { name: \"ab\", code: \"123\" }, qty: 15, tags: [ \"A\", \"B\", \"C\" ] },\n { _id: 2, item: { name: \"cd\", code: \"123\" }, qty: 20, tags: [ \"B\" ] },\n { _id: 3, item: { name: \"ij\", code: \"456\" }, qty: 25, tags: [ \"A\", \"B\" ] },\n { _id: 4, item: { name: \"xy\", code: \"456\" }, qty: 30, tags: [ \"B\", \"A\" ] },\n { _id: 5, item: { name: \"mn\", code: \"000\" }, qty: 20, tags: [ [ \"A\", \"B\" ], \"C\" ] }\n] )" + }, { + "role" : "ACTION", + "sha256" : "0ce698bb9952fdaac5d2408b468a47e287157a7df3a6a17d7d635ed2fefab7df", + "text" : "db.inventory.find( { tags: [ \"A\", \"B\" ] } )" + }, { + "role" : "EXPECTED", + "sha256" : "d9e22cc1e1f72756fe77236cad31d2739e18c18f9fe34a5ce91e03f949be6f93", + "text" : "[\n { _id: 3, item: { name: \"ij\", code: \"456\" }, qty: 25, tags: [ \"A\", \"B\" ] },\n { _id: 5, item: { name: \"mn\", code: \"000\" }, qty: 20, tags: [ [ \"A\", \"B\" ], \"C\" ] }\n]" + } ], + "detail" : null, + "name" : "Match an Array Exactly", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchAnArrayExactly", + "title" : "Equals an Array Value" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "51abd3c3389d41b63baff1599996b7aede0843ff018f1c2e72f83e5c940dd1d7", + "text" : "db.inventory.insertMany( [\n { _id: 1, item: { name: \"ab\", code: \"123\" }, qty: 15, tags: [ \"A\", \"B\", \"C\" ] },\n { _id: 2, item: { name: \"cd\", code: \"123\" }, qty: 20, tags: [ \"B\" ] },\n { _id: 3, item: { name: \"ij\", code: \"456\" }, qty: 25, tags: [ \"A\", \"B\" ] },\n { _id: 4, item: { name: \"xy\", code: \"456\" }, qty: 30, tags: [ \"B\", \"A\" ] },\n { _id: 5, item: { name: \"mn\", code: \"000\" }, qty: 20, tags: [ [ \"A\", \"B\" ], \"C\" ] }\n] )" }, { "role" : "DATA", "sha256" : "774b50a63b766664905788cb16f8b5eb80855580b5b2282769b55e626ebf3bbe", "text" : "db.companies.insertMany( [\n { _id: 001, company: \"MongoDB\" },\n { _id: 002, company: \"MongoDB2\" }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "b5cbb440afdf3f9d5918aaa8bd37e419d5f4440e5c1a67f4add0b7973e294f24", - "text" : "[ { company: \"MongoDB\" } ]" + "role" : "ACTION", + "sha256" : "ec2dfe96056bd28025694741d791ab3d793d2d724f655252531afed13f4b5ced", + "text" : "db.companies.find( { company: { $eq: /MongoDB/ } }, {_id: 0 } )" } ], "detail" : null, "owner" : null, @@ -10868,19 +10545,7 @@ "stem" : "regexMatchBehavior", "title" : "Regex Match Behavior" } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - } ], + "includes" : [ ], "operator" : "eq", "pageBlob" : "833cb20778a655fe9152395c1bd33475ffe603e9", "source" : { @@ -10893,8 +10558,8 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "879b3815989ff59ca658e72aa78068a0825e56a62a75c36ee6e0c34fb4c59fe3", - "text" : "db.movies.find( { rated: { $exists: true, $nin: [ \"R\", \"PG-13\" ] } } ).limit(5)" + "sha256" : "7b0bf30047597dc3738dbff32f256acd67fd38e85e5624941b414741170f3d3c", + "text" : "db.movies.find( { rated: { $exists: true, $nin: [ \"R\", \"PG-13\" ] } } ).limit(5)\n" } ], "detail" : null, "owner" : null, @@ -10904,8 +10569,8 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "0b43030edfaa2abf16234d74390cbce7f4c485b35127985a64593150080dab0a", - "text" : "db.movies.find( { rated: { $exists: true } }, { _id: 0, title: 1, rated: 1 } ).limit( 3 )" + "sha256" : "a1c9f741ecd959f4bab4173f078f623a6dddab6765e313b0a3fb7165ffed695b", + "text" : "db.movies.find( { rated: { $exists: true } }, { _id: 0, title: 1, rated: 1 } ).limit( 3 )\n" }, { "role" : "EXPECTED", "sha256" : "98bcd39aaa713768c4599ff5713617e3efe249ee87ad76cd38d1ac0493766aba", @@ -10914,54 +10579,55 @@ "detail" : null, "owner" : null, "status" : "UNOWNED", - "stem" : "nullValues", - "title" : "Null Values" - } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" + "stem" : "existsTrue", + "title" : "$exists: true" }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "4e09a795eba2fd7e360980ce1a4d7a1cf97506f2", - "path" : "content/manual/manual/source/includes/reference/exist-op-support-expressions.rst" - }, { - "blob" : "9f213f62ce7e034569621266049696115f61dd3c", - "path" : "content/manual/manual/source/includes/fact-atlas-search-operator.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "16ce4ebb756e25ec3543ac27d1cdc16d41d4b032fc92a40586415eff27178cb0", + "text" : "db.movies.find( { rated: { $exists: false } }, { _id: 0, title: 1, year: 1 } ).limit( 3 )\n" + }, { + "role" : "EXPECTED", + "sha256" : "10a1fe7f4948abe48fcb4cc21cde4c4d763486feda87a5e1f0fb73424365b6f1", + "text" : "[\n {\n title: 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',\n year: 1911\n },\n { title: 'Gertie the Dinosaur', year: 1914 },\n { title: 'In the Land of the Head Hunters', year: 1914 }\n]" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "existsFalse", + "title" : "$exists: false" }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "useASparseIndexToImproveExistsPerformance", + "title" : "Use a Sparse Index to Improve $exists Performance" + } ], + "includes" : [ { + "blob" : "db0fc5552d218f14458084bb3aefca0d8f8d176b", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/exists/create-index.snippet.create-sparse-index.js" }, { "blob" : "1d7ed23e9ecc787f3784c70fd827f8f6da3be17f", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/exists/exists-and-not-equal.snippet.exists-and-not-equal.js" - }, { - "blob" : "513230a42813c77304de32441f54868ff4268ddb", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/exists/null-values.snippet.exists-with-null.js" - }, { - "blob" : "21a4c3d188877380c0b45128cb4f75a7bb8baeea", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/exists/null-values-output.sh" - }, { - "blob" : "54333b7af5633ff56b7a13b64ea97f9a4e07359a", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/exists/false.snippet.exists-false.js" }, { "blob" : "f8c96172878a2d7b8c84943e4ffa1069060d8a9d", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/exists/false-output.sh" }, { - "blob" : "db0fc5552d218f14458084bb3aefca0d8f8d176b", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/exists/create-index.snippet.create-sparse-index.js" + "blob" : "54333b7af5633ff56b7a13b64ea97f9a4e07359a", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/exists/false.snippet.exists-false.js" }, { "blob" : "01eb88753d5be71d2786cb746288fa87246e0b3b", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/exists/metacritic.snippet.exists-true.js" }, { "blob" : "5c4a3092c0743548a360d2386c3840adae7ac48c", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/exists/metracritic-2.snippet.ne-null.js" + }, { + "blob" : "21a4c3d188877380c0b45128cb4f75a7bb8baeea", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/exists/null-values-output.sh" + }, { + "blob" : "513230a42813c77304de32441f54868ff4268ddb", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/exists/null-values.snippet.exists-with-null.js" } ], "operator" : "exists", "pageBlob" : "63f7dc39bcbd3fdad9722c35a191d8f12a958452", @@ -10975,8 +10641,8 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "6f38e367f7b7fb2449061ac27968800152d980828cf8792dfe638db14b883d05", - "text" : "db.movies.find(\n { $expr: { $gt: [ \"$tomatoes.viewer.rating\", \"$tomatoes.critic.rating\" ] } },\n { _id: 0, title: 1, \"tomatoes.viewer.rating\": 1, \"tomatoes.critic.rating\": 1 }\n).sort( { \"tomatoes.viewer.rating\": -1 } ).limit( 3 )" + "sha256" : "fbae0b00114ce07049507bad4f8ddf1ffa6a5668fa82e8ab6b8fea604e14dffd", + "text" : "db.movies.find(\n { $expr: { $gt: [ \"$tomatoes.viewer.rating\", \"$tomatoes.critic.rating\" ] } },\n { _id: 0, title: 1, \"tomatoes.viewer.rating\": 1, \"tomatoes.critic.rating\": 1 }\n).sort( { \"tomatoes.viewer.rating\": -1 } ).limit( 3 )\n" }, { "role" : "EXPECTED", "sha256" : "4e9959f8cd9aac85c128f28a5b112d8f23a30bcb9ea3ca0ad6506aad5c112973", @@ -10990,8 +10656,8 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "adb19b0e42b39bd42b1fdb7dfd757b1da9aff8267930aafe1bd9c3e9de44060b", - "text" : "db.movies.find(\n {\n \"imdb.rating\": { $type: \"number\" },\n \"imdb.votes\": { $type: \"number\" },\n $expr: {\n $gt: [\n {\n $cond: {\n if: { $gte: [\"$imdb.votes\", 1000] },\n then: { $multiply: [\"$imdb.rating\", 1.0] },\n else: { $multiply: [\"$imdb.rating\", 0.5] }\n }\n },\n 9\n ]\n }\n },\n { _id: 0, title: 1, \"imdb.rating\": 1, \"imdb.votes\": 1 }\n).sort( { title: 1 } ).limit(5)" + "sha256" : "802102af82151d5355951b1eae9ad6163830758d877aa0301e65d4a8f1239cc6", + "text" : "db.movies.find(\n {\n \"imdb.rating\": { $type: \"number\" },\n \"imdb.votes\": { $type: \"number\" },\n $expr: {\n $gt: [\n {\n $cond: {\n if: { $gte: [\"$imdb.votes\", 1000] },\n then: { $multiply: [\"$imdb.rating\", 1.0] },\n else: { $multiply: [\"$imdb.rating\", 0.5] }\n }\n },\n 9\n ]\n }\n },\n { _id: 0, title: 1, \"imdb.rating\": 1, \"imdb.votes\": 1 }\n).sort( { title: 1 } ).limit(5)\n" }, { "role" : "EXPECTED", "sha256" : "ce8b3550dfac96e5c32dea05818279d95cdc782e579cf4b684970b30d61b4829", @@ -11004,38 +10670,17 @@ "title" : "Use $expr With Conditional Statements" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "c36352611b9afbca6193ffd7b5a385dcc8f9459f", - "path" : "content/manual/manual/source/includes/expr-operators-and-indexes.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "a51b5fbe8f3342db12e7227977ece664d63d5530", - "path" : "content/manual/manual/source/includes/use-expr-in-find-query.rst" + "blob" : "405a1b3bf6ced3b76cd6cc06dff14d3289e43974", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/expr/find-output.js" }, { "blob" : "2593fa68ff7f731651775179ee23370952084d6e", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/expr/find.snippet.expr-find-viewer-gt-critic.js" }, { - "blob" : "405a1b3bf6ced3b76cd6cc06dff14d3289e43974", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/expr/find-output.js" + "blob" : "0af72b5b30d069a6aa06074638db426f66399d74", + "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/expr/weighted-score-output.sh" }, { "blob" : "9b80c321c8e5413f882111c569cbe511814d0507", "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/expr/weighted-score.snippet.expr-weighted-score.js" - }, { - "blob" : "0af72b5b30d069a6aa06074638db426f66399d74", - "path" : "content/code-examples/tested/command-line/mongosh/aggregation/expressions/expr/weighted-score-output.sh" } ], "operator" : "expr", "pageBlob" : "4519033a980db04d52052393546309f8fd45d33e", @@ -11061,13 +10706,7 @@ "stem" : null, "title" : "Intersects a \"Big\" Polygon" } ], - "includes" : [ { - "blob" : "69d2a8115dafb1eb5cc88b3958386b6f62079b7b", - "path" : "content/manual/manual/source/includes/extracts-geospatial-long-lat.yaml" - }, { - "blob" : "17c657397c37f21770176fa2cae047f34839af4d", - "path" : "content/manual/manual/source/includes/fact-geometry-hemisphere-limitation.rst" - } ], + "includes" : [ ], "operator" : "geoIntersects", "pageBlob" : "7f4f8ba7f24f6d333c778c8f0735fd5b31e0620a", "source" : { @@ -11092,10 +10731,7 @@ "stem" : null, "title" : "Within a \"Big\" Polygon" } ], - "includes" : [ { - "blob" : "17c657397c37f21770176fa2cae047f34839af4d", - "path" : "content/manual/manual/source/includes/fact-geometry-hemisphere-limitation.rst" - } ], + "includes" : [ ], "operator" : "geoWithin", "pageBlob" : "8f182fd610d2438392e17c53c7626f958f21dd19", "source" : { @@ -11103,20 +10739,6 @@ "path" : "content/manual/manual/source/reference/operator/query/geoWithin.txt", "relation" : "AT_ORIGIN" } - }, { - "context" : "query/filters", - "examples" : [ ], - "includes" : [ { - "blob" : "69d2a8115dafb1eb5cc88b3958386b6f62079b7b", - "path" : "content/manual/manual/source/includes/extracts-geospatial-long-lat.yaml" - } ], - "operator" : "geometry", - "pageBlob" : "80d73722b17cf1f2b998b1dfb95f4ab2286a0d54", - "source" : { - "commit" : "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", - "path" : "content/manual/manual/source/reference/operator/query/geometry.txt", - "relation" : "AT_ORIGIN" - } }, { "context" : "query/filters", "examples" : [ { @@ -11129,12 +10751,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "a5b6143ba59f153fe1026f8513b9c4d61a29139f89196d3d1238bccc934b5e84", - "text" : "db.movies.updateMany(\n { \"imdb.rating\" : { $gt: 9.5 } },\n { $set: { \"highestRated\": true } }\n)" + "sha256" : "8ec72758c52a30e320b270e0bd4265ef243ea87016c0c427b8ea062e0f38dab3", + "text" : "db.movies.updateMany(\n { \"imdb.rating\" : { $gt: 9.5 } },\n { $set: { \"highestRated\": true } }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "46d4c65a0b05291438a5e08790d04fc40275ef40cd44deea7cc959d107e7d3ea", - "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: 1,\n modifiedCount: 1,\n upsertedCount: 0\n}" + "sha256" : "2498744efaaa5252ced033c8878f93daf0eac7b94f776da16d2be3d65e3cc79c", + "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: 1,\n modifiedCount: 1,\n upsertedCount: 0\n}\n" } ], "detail" : null, "owner" : null, @@ -11143,24 +10765,6 @@ "title" : "Perform an Update Based on Embedded Document Fields" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "61b44d6a56cd18a43cd9019d04f9dc4d593f3311", - "path" : "content/manual/manual/source/includes/fact-type-bracketing.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { "blob" : "860a5c7f22c76e16896046d3e6b285eaf301a4bd", "path" : "content/code-examples/tested/command-line/mongosh/operators/gt/gt-find/gt-find.snippet.gt-find.js" }, { @@ -11198,24 +10802,6 @@ "title" : "Perform an Update Based on Embedded Document Fields" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "61b44d6a56cd18a43cd9019d04f9dc4d593f3311", - "path" : "content/manual/manual/source/includes/fact-type-bracketing.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { "blob" : "61adc171765f517d610d27aa223583e25e75d579", "path" : "content/code-examples/tested/command-line/mongosh/operators/gte/gte-find/gte-find.snippet.gte-find.js" }, { @@ -11240,12 +10826,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "6d9b8a794341b0712c9890419e4f31284ac3f170c7599a3c1bbdbbda00e89f30", - "text" : "db.movies.find(\n { rated: { $in: [\"G\", \"TV-G\"] } },\n { _id: 0, title: 1 }\n)" + "sha256" : "cf7c173046032358a9f3fe08557c83ee27143a5556123617b391d8b77227619a", + "text" : "db.movies.find(\n { rated: { $in: [\"G\", \"TV-G\"] } },\n { _id: 0, title: 1 }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "0b5d70927d98f4ae53a50621014514ca4045527e64dc00cf1e8a6fe980047f9f", - "text" : "[\n { title: 'The Great Train Robbery' },\n { title: 'A Corner in Wheat' },\n { title: 'From Hand to Mouth' },\n { title: 'One Week' },\n { title: 'The Devil to Pay!' },\n { title: 'Footlight Parade' },\n { title: 'Gold Diggers of 1935' },\n { title: 'Naughty Marietta' },\n { title: 'Modern Times' },\n { title: 'Gone with the Wind' },\n { title: 'Fantasia' },\n { title: 'The Man Who Came to Dinner' },\n { title: 'National Velvet' },\n { title: 'Alice in Wonderland' },\n { title: 'The Member of the Wedding' },\n { title: 'Seven Brides for Seven Brothers' },\n { title: 'Around the World in Eighty Days' },\n { title: 'The King and I' },\n { title: 'A King in New York' },\n { title: 'Ben-Hur' }\n]" + "sha256" : "4e2a046ed547567a06376968fe48238e8d90266eef160e4f0326693098023c86", + "text" : "[\n { title: 'The Great Train Robbery' },\n { title: 'A Corner in Wheat' },\n { title: 'From Hand to Mouth' },\n { title: 'One Week' },\n { title: 'The Devil to Pay!' },\n { title: 'Footlight Parade' },\n { title: 'Gold Diggers of 1935' },\n { title: 'Naughty Marietta' },\n { title: 'Modern Times' },\n { title: 'Gone with the Wind' },\n { title: 'Fantasia' },\n { title: 'The Man Who Came to Dinner' },\n { title: 'National Velvet' },\n { title: 'Alice in Wonderland' },\n { title: 'The Member of the Wedding' },\n { title: 'Seven Brides for Seven Brothers' },\n { title: 'Around the World in Eighty Days' },\n { title: 'The King and I' },\n { title: 'A King in New York' },\n { title: 'Ben-Hur' }\n]\n" } ], "detail" : null, "owner" : null, @@ -11255,12 +10841,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "b432bcca04a82a40e5cf2d5df0412283b28912a7921b3fc62138515c0364a625", - "text" : "db.movies.updateMany(\n { rated: { $in: [\"G\", \"TV-G\"] } },\n { $set: { familyFriendly: true } }\n)" + "sha256" : "daf917386c72e4793cf7047bccfa31985837d6dcb4b14c732a82fc2f2676b7ab", + "text" : "db.movies.updateMany(\n { rated: { $in: [\"G\", \"TV-G\"] } },\n { $set: { familyFriendly: true } }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "975b068c8097f374b37b504c680ea8bdef426d70c77c8ed341e56167c782efc8", - "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: 536,\n modifiedCount: 536,\n upsertedCount: 0\n}" + "sha256" : "5d2a10f4df8af3c5897a78daa48b3afd55daa08f2524f8f3f9668a09c7dd1ad4", + "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: 536,\n modifiedCount: 536,\n upsertedCount: 0\n}\n" } ], "detail" : null, "owner" : null, @@ -11270,58 +10856,37 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "d63573e627bd244a708f78a0324b5f863fc4e8bc36263d5def03fb7d6ad6e61f", - "text" : "db.movies.find( \n { plot: { $in: [ /^Alien/ , /sci-fi/ ] } },\n { _id: 0, title: 1, plot: 1 }\n)" + "sha256" : "829ce356ddf1bb4d415fe062edb218188ef6ca0b97e8274619351dcc8ca36623", + "text" : "db.movies.find( \n { plot: { $in: [ /^Alien/ , /sci-fi/ ] } },\n { _id: 0, title: 1, plot: 1 }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "b80e004226f1ae2c7ea00bba325a30961fdeb346399e3272202fd77caa5d23be", - "text" : "[ \n { \n plot: 'Aliens come to Earth seeking scientists to help them in their war.', \n title: 'This Island Earth' \n }, \n { \n plot: 'Censored by the Polish authorities, this film was reedited and new footage added. It begins with a sci-fi motif: abstract images and electronic music take the viewer from ruins of Lebanon ...', \n title: 'Rece do gèry' \n }, \n { \n plot: 'An idyllic sci-fi future has one major drawback: life must end at 30.', \n title: \"Logan's Run\" \n }, \n { \n plot: \"Four horror/sci-fi segments directed by four famous directors which are their own versions of classic stories from Rod Serling's landmark television series.\", \n title: 'Twilight Zone: The Movie' \n }, \n { \n plot: 'Aliens who look like clowns come from outer space and terrorize a small town.', \n title: 'Killer Klowns from Outer Space' \n },\n ...\n]" + "sha256" : "74c9e6edf426644c30f03470acf93ac9e6557e4b41a929856d80e8eee5e15d4a", + "text" : "[ \n { \n plot: 'Aliens come to Earth seeking scientists to help them in their war.', \n title: 'This Island Earth' \n }, \n { \n plot: 'Censored by the Polish authorities, this film was reedited and new footage added. It begins with a sci-fi motif: abstract images and electronic music take the viewer from ruins of Lebanon ...', \n title: 'Rece do gèry' \n }, \n { \n plot: 'An idyllic sci-fi future has one major drawback: life must end at 30.', \n title: \"Logan's Run\" \n }, \n { \n plot: \"Four horror/sci-fi segments directed by four famous directors which are their own versions of classic stories from Rod Serling's landmark television series.\", \n title: 'Twilight Zone: The Movie' \n }, \n { \n plot: 'Aliens who look like clowns come from outer space and terrorize a small town.', \n title: 'Killer Klowns from Outer Space' \n },\n ...\n]\n\n" } ], - "detail" : null, + "detail" : "SYNTAX", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "useInWithARegularExpression", - "title" : "Use ``$in`` with a Regular Expression" + "title" : "Use $in with a Regular Expression" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "9f213f62ce7e034569621266049696115f61dd3c", - "path" : "content/manual/manual/source/includes/fact-atlas-search-operator.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "b633a0a267dc0b55feafbfc238e5bc216b1376b0", - "path" : "content/manual/manual/source/includes/arrays-additional-examples.rst" - }, { "blob" : "3de986c54bdedbf04246780e2a7d1aa8ed7e6a27", "path" : "content/code-examples/tested/command-line/mongosh/operators/in/in-find/in-find.snippet.in-find.js" }, { "blob" : "17328e66b5f33620da011a9d04cc98c52dba1d16", "path" : "content/code-examples/tested/command-line/mongosh/operators/in/in-find/output.sh" - }, { - "blob" : "57cb9218f4ddcf1126d249c32773264737b7485a", - "path" : "content/code-examples/tested/command-line/mongosh/operators/in/in-update/in-update.snippet.in-update.js" - }, { - "blob" : "42a93423cc17c26809ed719c92214c3ee68af94e", - "path" : "content/code-examples/tested/command-line/mongosh/operators/in/in-update/output.sh" }, { "blob" : "8c241da5e9acd8d492757f638dd90eb79dc774c4", "path" : "content/code-examples/tested/command-line/mongosh/operators/in/in-regex/in-regex.snippet.in-regex.js" }, { "blob" : "5d469b20e0c8b2efe379749211a2615d55a4511c", "path" : "content/code-examples/tested/command-line/mongosh/operators/in/in-regex/output.sh" + }, { + "blob" : "57cb9218f4ddcf1126d249c32773264737b7485a", + "path" : "content/code-examples/tested/command-line/mongosh/operators/in/in-update/in-update.snippet.in-update.js" + }, { + "blob" : "42a93423cc17c26809ed719c92214c3ee68af94e", + "path" : "content/code-examples/tested/command-line/mongosh/operators/in/in-update/output.sh" } ], "operator" : "in", "pageBlob" : "bac31808d1910fe9947955e65d193b3035f2e718", @@ -11333,10 +10898,7 @@ }, { "context" : "query/filters", "examples" : [ ], - "includes" : [ { - "blob" : "198a659c645d9eb881f75549a3176c9fe27580d0", - "path" : "content/manual/manual/source/includes/schema-validation/json-schema-intro.rst" - } ], + "includes" : [ ], "operator" : "jsonSchema", "pageBlob" : "3d6169733aaa5cbb60867fecad8c76b796a8eb42", "source" : { @@ -11361,13 +10923,7 @@ "stem" : null, "title" : "Perform an Update Based on Embedded Document Fields" } ], - "includes" : [ { - "blob" : "61b44d6a56cd18a43cd9019d04f9dc4d593f3311", - "path" : "content/manual/manual/source/includes/fact-type-bracketing.rst" - }, { - "blob" : "d9e142d553ea8461562fcdf52063f40769c1d3d4", - "path" : "content/manual/manual/source/includes/examples-create-inventory.rst" - } ], + "includes" : [ ], "operator" : "lt", "pageBlob" : "180d12bff343229c25313500628c6db3539d9e32", "source" : { @@ -11392,13 +10948,7 @@ "stem" : null, "title" : "Perform an Update Based on Embedded Document Fields" } ], - "includes" : [ { - "blob" : "61b44d6a56cd18a43cd9019d04f9dc4d593f3311", - "path" : "content/manual/manual/source/includes/fact-type-bracketing.rst" - }, { - "blob" : "d9e142d553ea8461562fcdf52063f40769c1d3d4", - "path" : "content/manual/manual/source/includes/examples-create-inventory.rst" - } ], + "includes" : [ ], "operator" : "lte", "pageBlob" : "58cf2b1afbb59294717050abc9e0e83a16ed2474", "source" : { @@ -11441,7 +10991,7 @@ "owner" : null, "status" : "UNOWNED", "stem" : "useWithNear", - "title" : "Use with ``$near``" + "title" : "Use with $near" }, { "blocks" : [ { "role" : "ACTION", @@ -11452,18 +11002,9 @@ "owner" : null, "status" : "UNOWNED", "stem" : "useWithNearSphere", - "title" : "Use with ``$nearSphere``" - } ], - "includes" : [ { - "blob" : "863fbf338696cb4b854049f161659d7eda9e08fd", - "path" : "content/manual/manual/source/includes/example-near-minDistance.rst" - }, { - "blob" : "69d2a8115dafb1eb5cc88b3958386b6f62079b7b", - "path" : "content/manual/manual/source/includes/extracts-geospatial-long-lat.yaml" - }, { - "blob" : "86d75947d981bc77dca7e5aaf276f130d413ab64", - "path" : "content/manual/manual/source/includes/example-nearSphere-minDistance.rst" + "title" : "Use with $nearSphere" } ], + "includes" : [ ], "operator" : "minDistance", "pageBlob" : "8b8e4df767af726804eab30f85c803c866308edd", "source" : { @@ -11475,43 +11016,50 @@ "context" : "query/filters", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/filters/mod/useModToSelectDocuments", "status" : "OWNED", "stem" : null, - "title" : "Use ``$mod`` to Select Documents" + "title" : "Use $mod to Select Documents" }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "de6c7e9f8216f489582942c2e1f582b322c1a4963ee3bef838fd10a6f93bf06e", + "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"abc123\", qty: 0 },\n { _id: 2, item: \"xyz123\", qty: 5 },\n { _id: 3, item: \"ijk123\", qty: 12 }\n] )" + }, { "role" : "ACTION", "sha256" : "b2dfe6e444fb329ddd17a8e26f27ec2ecbfb42ce1f6adae71bd1dac6b24a6a8a", "text" : "db.inventory.find( { qty: { $mod: [ 4 ] } } )" - }, { + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "arrayWithSingleElement", + "title" : "Array with Single Element" + }, { + "blocks" : [ { "role" : "DATA", "sha256" : "de6c7e9f8216f489582942c2e1f582b322c1a4963ee3bef838fd10a6f93bf06e", "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"abc123\", qty: 0 },\n { _id: 2, item: \"xyz123\", qty: 5 },\n { _id: 3, item: \"ijk123\", qty: 12 }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "27fc04be60c800de41b1dae85e90578fe3935a0e7ef634b1998985089252e4e1", - "text" : "MongoServerError: malformed mod, not enough elements" + "role" : "ACTION", + "sha256" : "6c39570f25c4a52ee9d352b9a86ba109caa43b9d19e907eee2031de4aecf3ecd", + "text" : "db.inventory.find( { qty: { $mod: [ ] } } )" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", - "stem" : "notEnoughElementsError", - "title" : "Not Enough Elements Error" + "stem" : "emptyArray", + "title" : "Empty Array" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "bd2e21745ea777fa593acb1098d0071bbf0259e7015fff8b7d514dccbd7d0dd4", - "text" : "db.inventory.find( { qty: { $mod: [ 4, 1, 2, 3 ] } } )" - }, { "role" : "DATA", "sha256" : "de6c7e9f8216f489582942c2e1f582b322c1a4963ee3bef838fd10a6f93bf06e", "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"abc123\", qty: 0 },\n { _id: 2, item: \"xyz123\", qty: 5 },\n { _id: 3, item: \"ijk123\", qty: 12 }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "c8e7b33ae13dc6bd99de56ab4dc10c643c0a34611525db71f533239ea702b0a0", - "text" : "MongoServerError: malformed mod, too many elements" + "role" : "ACTION", + "sha256" : "bd2e21745ea777fa593acb1098d0071bbf0259e7015fff8b7d514dccbd7d0dd4", + "text" : "db.inventory.find( { qty: { $mod: [ 4, 1, 2, 3 ] } } )" } ], "detail" : null, "owner" : null, @@ -11520,20 +11068,60 @@ "title" : "Too Many Elements Error" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/filters/mod/floatingPointArguments", "status" : "OWNED", "stem" : null, "title" : "Floating Point Arguments" }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "de6c7e9f8216f489582942c2e1f582b322c1a4963ee3bef838fd10a6f93bf06e", + "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"abc123\", qty: 0 },\n { _id: 2, item: \"xyz123\", qty: 5 },\n { _id: 3, item: \"ijk123\", qty: 12 }\n] )" + }, { "role" : "ACTION", - "sha256" : "cbe21e45b002431527e9f11fa9060b5263152a43b812eac5edf418b635fa86a4", - "text" : "db.inventory.find( { qty: { $mod: [ -4, -0 ] } } )" + "sha256" : "f5a5fdbfcabd816d91a158316ecea5e4d19992cba29d0441c9d3c8680c7bf128", + "text" : "db.inventory.find( { qty: { $mod: [ 4.5, 0 ] } } )" + }, { + "role" : "EXPECTED", + "sha256" : "c4978ec20b1f5bacc1bcef6e1d8d6cec0bc4c22a23f4f4acd3f32fde3a54b75f", + "text" : "[\n { _id: 1, item: 'abc123', qty: 0 },\n { _id: 3, item: 'ijk123', qty: 12 }\n]" + } ], + "detail" : null, + "name" : "Divide by 4.5", + "owner" : null, + "status" : "UNOWNED", + "stem" : "divideBy45", + "title" : "Floating Point Arguments" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "de6c7e9f8216f489582942c2e1f582b322c1a4963ee3bef838fd10a6f93bf06e", + "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"abc123\", qty: 0 },\n { _id: 2, item: \"xyz123\", qty: 5 },\n { _id: 3, item: \"ijk123\", qty: 12 }\n] )" + }, { + "role" : "ACTION", + "sha256" : "b13dab4c8fe93e0961a7fe82edaee694d6dffd44f261fcc548158bdcec5dfaa5", + "text" : "db.inventory.find( { qty: { $mod: [ 4.99, 0 ] } } )" }, { + "role" : "EXPECTED", + "sha256" : "c4978ec20b1f5bacc1bcef6e1d8d6cec0bc4c22a23f4f4acd3f32fde3a54b75f", + "text" : "[\n { _id: 1, item: 'abc123', qty: 0 },\n { _id: 3, item: 'ijk123', qty: 12 }\n]" + } ], + "detail" : null, + "name" : "Divide by 4.99", + "owner" : null, + "status" : "UNOWNED", + "stem" : "divideBy499", + "title" : "Floating Point Arguments" + }, { + "blocks" : [ { "role" : "DATA", "sha256" : "de6c7e9f8216f489582942c2e1f582b322c1a4963ee3bef838fd10a6f93bf06e", "text" : "db.inventory.insertMany( [\n { _id: 1, item: \"abc123\", qty: 0 },\n { _id: 2, item: \"xyz123\", qty: 5 },\n { _id: 3, item: \"ijk123\", qty: 12 }\n] )" + }, { + "role" : "ACTION", + "sha256" : "cbe21e45b002431527e9f11fa9060b5263152a43b812eac5edf418b635fa86a4", + "text" : "db.inventory.find( { qty: { $mod: [ -4, -0 ] } } )" }, { "role" : "EXPECTED", "sha256" : "c4978ec20b1f5bacc1bcef6e1d8d6cec0bc4c22a23f4f4acd3f32fde3a54b75f", @@ -11545,10 +11133,7 @@ "stem" : "negativeDividend", "title" : "Negative Dividend" } ], - "includes" : [ { - "blob" : "29386fb4543b83467ddb0e4aefe4ff861bb48d07", - "path" : "content/manual/manual/source/includes/negative-dividend.rst" - } ], + "includes" : [ ], "operator" : "mod", "pageBlob" : "6e993c25d85ccfbfedfadceaf7e792550e19423c", "source" : { @@ -11568,76 +11153,73 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "74a8d7f066416adfab13e01327bdcf5a767a11dd2e61108e577608f242e9f6fa", - "text" : "db.movies.updateMany(\n { \"imdb.rating\": { $ne: 9.3 } },\n { $set: { \"highestRated\": false } }\n)" + "sha256" : "9ee01d0ffb4e8505dfea175be98d60d1c6eed0f3c23f5bdd830bc31a9a098f63", + "text" : "db.movies.updateMany(\n { \"imdb.rating\": { $ne: 9.3 } },\n { $set: { \"highestRated\": false } }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "f685160ba4913f26e3c6cd0d2a66626e6e56411277e4900a7808b90948b605a5", - "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: ...,\n modifiedCount: ...,\n upsertedCount: 0\n}" + "sha256" : "5c10942fa0b906562d6cc1ace8b5e885fdfd28d928372aa386c6d1b7ef43efa6", + "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: ...,\n modifiedCount: ...,\n upsertedCount: 0\n}\n" } ], - "detail" : null, + "detail" : "SYNTAX", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "updateBasedOnNotEqualEmbeddedDocumentFields", "title" : "Update Based on Not Equal Embedded Document Fields" }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "65ccb7c9d95bee1d0683a3f18d78e6673fbc6f1784be2d2f6310b7503c8678f2", - "text" : "db.movies.find(\n { genres: { $ne: \"Drama\" }, runtime: { $gt: 1000 } },\n { _id: 0, title: 1, genres: 1 }\n)" + "sha256" : "85e0ee7a4b98b4e960e9513841506c48925eac2d84c04b33fd87d405a8d2eabf", + "text" : "db.movies.find(\n { genres: { $ne: \"Drama\" }, runtime: { $gt: 1000 } },\n { _id: 0, title: 1, genres: 1 }\n)\n" + }, { + "role" : "EXPECTED", + "sha256" : "9b2d38cfc1c3f491dfbcab8020d634829e576ac8a2b690059d6e5dea5409f146", + "text" : "[\n {\n genres: [ 'Documentary', 'History', 'Sport' ],\n title: 'Baseball'\n }\n]\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "useAScalarComparison", + "title" : "Use a Scalar Comparison" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "42f6a58e46f2c6c1cd4d2c6ec7e220507de8156c09ccdc290f455e67a9314861", + "text" : "db.movies.find(\n { genres: { $ne: [ \"Drama\" ] }, runtime: { $gt: 1000 } },\n { _id: 0, title: 1, genres: 1 }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "169114eccdde0d80667636a59de5bb399ee14f600b6a322fb63d92e39e711cd8", - "text" : "[\n {\n genres: [ 'Documentary', 'History', 'Sport' ],\n title: 'Baseball'\n }\n]" + "sha256" : "d953d7818362c2db79470e8b2442291cc7d4fccd7b27f6ab151dfb0b46c0b241", + "text" : "[\n {\n genres: [ 'Action', 'Adventure', 'Drama' ],\n title: 'Centennial'\n },\n {\n genres: [ 'Documentary', 'History', 'Sport' ],\n title: 'Baseball'\n }\n]\n" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", - "stem" : "arrays", - "title" : "Arrays" + "stem" : "useAnExactArrayComparison", + "title" : "Use an Exact Array Comparison" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" + "blob" : "1ae57d8172dc5e845ff69f5d936784eefa399042", + "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-find-array-exact-output.sh" }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "8e4726c5197ec235854dfb8265071e9554119ecb", + "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-find-array-exact.snippet.ne-find-array-exact.js" }, { - "blob" : "6735bdad1e3d9ab5633ae02e8476a532573a7144", - "path" : "content/manual/manual/source/includes/extracts-inequality-operators-selectivity.yaml" + "blob" : "0ca222cfc185c873af0cd90bb0faa52635f03b9f", + "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-find-array-scalar-output.sh" }, { - "blob" : "4da5c081c2cb680f7e1a39ac2ef6c35d173bc03d", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-find.snippet.ne-find.js" + "blob" : "21236da6972902d0d2307a7f887ce2322ba99c38", + "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-find-array-scalar.snippet.ne-find-array-scalar.js" }, { "blob" : "3d341656a640f6ae3fa4d655fd3b628a29554c52", "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-find-output.sh" }, { - "blob" : "4373ca4c82a58fdc86697d7031d42bbce897cbee", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-update.snippet.ne-update.js" + "blob" : "4da5c081c2cb680f7e1a39ac2ef6c35d173bc03d", + "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-find.snippet.ne-find.js" }, { "blob" : "45002dac752689c1d55f67d1e79e8afcfc825a8e", "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-update-output.sh" }, { - "blob" : "21236da6972902d0d2307a7f887ce2322ba99c38", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-find-array-scalar.snippet.ne-find-array-scalar.js" - }, { - "blob" : "0ca222cfc185c873af0cd90bb0faa52635f03b9f", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-find-array-scalar-output.sh" - }, { - "blob" : "8e4726c5197ec235854dfb8265071e9554119ecb", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-find-array-exact.snippet.ne-find-array-exact.js" - }, { - "blob" : "1ae57d8172dc5e845ff69f5d936784eefa399042", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-find-array-exact-output.sh" + "blob" : "4373ca4c82a58fdc86697d7031d42bbce897cbee", + "path" : "content/code-examples/tested/command-line/mongosh/query/operators/ne/ne-update.snippet.ne-update.js" } ], "operator" : "ne", "pageBlob" : "cd85ca2d756fdf5575f2f4a58cbc6772d179ed3a", @@ -11667,25 +11249,7 @@ "stem" : "queryOnLegacyCoordinates", "title" : "Query on Legacy Coordinates" } ], - "includes" : [ { - "blob" : "69d2a8115dafb1eb5cc88b3958386b6f62079b7b", - "path" : "content/manual/manual/source/includes/extracts-geospatial-long-lat.yaml" - }, { - "blob" : "c06a15831b78be20b8bedbee54fea72c27abf599", - "path" : "content/manual/manual/source/includes/fact-geo-near-special-indexes.rst" - }, { - "blob" : "d0af3b05b45ed55a7f4ce12fbb4b891adfe167b8", - "path" : "content/manual/manual/source/includes/fact-geo-near-returns-sorted-results.rst" - }, { - "blob" : "f222cac6d9135342c574197db5984c8cff63b9d7", - "path" : "content/manual/manual/source/includes/fact-geo-near-geojson-validation.rst" - }, { - "blob" : "9e99883fd7635433ca3cc818fffade9f40a09acc", - "path" : "content/manual/manual/source/includes/fact-geo-near-memory-limit.rst" - }, { - "blob" : "863fbf338696cb4b854049f161659d7eda9e08fd", - "path" : "content/manual/manual/source/includes/example-near-minDistance.rst" - } ], + "includes" : [ ], "operator" : "near", "pageBlob" : "eb4487d42b34b2ed7e322f0a63f82d953a3eae8e", "source" : { @@ -11711,25 +11275,21 @@ "detail" : null, "owner" : null, "status" : "UNOWNED", - "stem" : "specifyCenterPointUsingLegacyCoordinates", - "title" : "Specify Center Point Using Legacy Coordinates" - } ], - "includes" : [ { - "blob" : "c06a15831b78be20b8bedbee54fea72c27abf599", - "path" : "content/manual/manual/source/includes/fact-geo-near-special-indexes.rst" - }, { - "blob" : "d0af3b05b45ed55a7f4ce12fbb4b891adfe167b8", - "path" : "content/manual/manual/source/includes/fact-geo-near-returns-sorted-results.rst" + "stem" : "case2dIndex", + "title" : "2d Index" }, { - "blob" : "f222cac6d9135342c574197db5984c8cff63b9d7", - "path" : "content/manual/manual/source/includes/fact-geo-near-geojson-validation.rst" - }, { - "blob" : "9e99883fd7635433ca3cc818fffade9f40a09acc", - "path" : "content/manual/manual/source/includes/fact-geo-near-memory-limit.rst" - }, { - "blob" : "86d75947d981bc77dca7e5aaf276f130d413ab64", - "path" : "content/manual/manual/source/includes/example-nearSphere-minDistance.rst" + "blocks" : [ { + "role" : "ACTION", + "sha256" : "0d65b502f1a9e72fa06c0ad2c29c922ee7787ea1e1afbe66ce8fea87eda19ee8", + "text" : "db.legacyPlaces.find(\n { location : { $nearSphere : [ -73.9667, 40.78 ], $minDistance: 0.0004 } }\n)" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "case2dsphereIndex", + "title" : "2dsphere Index" } ], + "includes" : [ ], "operator" : "nearSphere", "pageBlob" : "a6eb8122244a781bd436ba5bc1f2192a3d6cd00b", "source" : { @@ -11749,49 +11309,31 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "2cb24aa78ee11f548825080052f74b7b13fe6de57debec91fb9a3fd4fbdf8f56", - "text" : "db.movies.updateMany(\n { genres: { $nin: [ \"Drama\" ] } },\n { $set: { exclude: true } }\n)" + "sha256" : "f5fe1178cab584c00dc72104ae8607e437cfadba9b5b59c7647adcd496de6c1e", + "text" : "db.movies.updateMany(\n { genres: { $nin: [ \"Drama\" ] } },\n { $set: { exclude: true } }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "f685160ba4913f26e3c6cd0d2a66626e6e56411277e4900a7808b90948b605a5", - "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: ...,\n modifiedCount: ...,\n upsertedCount: 0\n}" + "sha256" : "5c10942fa0b906562d6cc1ace8b5e885fdfd28d928372aa386c6d1b7ef43efa6", + "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: ...,\n modifiedCount: ...,\n upsertedCount: 0\n}\n" } ], - "detail" : null, + "detail" : "SYNTAX", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "selectOnElementsNotInAnArray", "title" : "Select on Elements Not in an Array" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "6735bdad1e3d9ab5633ae02e8476a532573a7144", - "path" : "content/manual/manual/source/includes/extracts-inequality-operators-selectivity.yaml" + "blob" : "24120303bb856085a8774219a4d72315d2d56f93", + "path" : "content/code-examples/tested/command-line/mongosh/query/operators/nin/nin-find-output.sh" }, { "blob" : "3357dcf50abbf3b4c6650d14dab5bfbec0385b27", "path" : "content/code-examples/tested/command-line/mongosh/query/operators/nin/nin-find.snippet.nin-find.js" }, { - "blob" : "24120303bb856085a8774219a4d72315d2d56f93", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/nin/nin-find-output.sh" + "blob" : "45002dac752689c1d55f67d1e79e8afcfc825a8e", + "path" : "content/code-examples/tested/command-line/mongosh/query/operators/nin/nin-update-output.sh" }, { "blob" : "98ba3f3957f88ca598159038ab7000b555595c65", "path" : "content/code-examples/tested/command-line/mongosh/query/operators/nin/nin-update.snippet.nin-update.js" - }, { - "blob" : "45002dac752689c1d55f67d1e79e8afcfc825a8e", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/nin/nin-update-output.sh" } ], "operator" : "nin", "pageBlob" : "6e2678480a02e473bac0072edf179a4402764d01", @@ -11804,25 +11346,25 @@ "context" : "query/filters", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/filters/nor/norQueryWithTwoExpressions", "status" : "OWNED", "stem" : null, - "title" : "``$nor`` Query with Two Expressions" + "title" : "$nor Query with Two Expressions" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/filters/nor/norAndAdditionalComparisons", "status" : "OWNED", "stem" : null, - "title" : "``$nor`` and Additional Comparisons" + "title" : "$nor and Additional Comparisons" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/filters/nor/norAndExists", "status" : "OWNED", "stem" : null, - "title" : "``$nor`` and ``$exists``" + "title" : "$nor and $exists" } ], "includes" : [ ], "operator" : "nor", @@ -11832,109 +11374,6 @@ "path" : "content/manual/manual/source/reference/operator/query/nor.txt", "relation" : "AT_ORIGIN" } - }, { - "context" : "query/filters", - "examples" : [ ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "789277a07612de10a0e7f3a432fb63d95c3d794b", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/not/not-regex.snippet.not-regex.js" - }, { - "blob" : "1fe62dab2e471e5d8d1eab743357807925a68139", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/not/not-regex-output.sh" - }, { - "blob" : "94306c54c09222814364f89a4246176ea7f340a5", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/not/not-regex-string.snippet.not-regex-string.js" - }, { - "blob" : "1fe62dab2e471e5d8d1eab743357807925a68139", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/not/not-regex-string-output.sh" - }, { - "blob" : "820d556111a690631cf05de20d009555a3551e5f", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/not/not-regex-literal.snippet.not-regex-literal.js" - }, { - "blob" : "1fe62dab2e471e5d8d1eab743357807925a68139", - "path" : "content/code-examples/tested/command-line/mongosh/query/operators/not/not-regex-literal-output.sh" - } ], - "operator" : "not", - "pageBlob" : "1ef2dc9a1fbb60eec4f88891c9a27bb4b212eb1f", - "source" : { - "commit" : "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", - "path" : "content/manual/manual/source/reference/operator/query/not.txt", - "relation" : "AT_ORIGIN" - } - }, { - "context" : "query/filters", - "examples" : [ ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "a6b6e20a100cc7a045ae2d382c5cbe38f0904500", - "path" : "content/manual/manual/source/includes/text-search-legacy-atlas-section.rst" - }, { - "blob" : "4f64cb03e66bdd5969e83c3ddf2d7fa635107d09", - "path" : "content/manual/manual/source/includes/text-search-legacy-atlas-section-main.rst" - }, { - "blob" : "36b8606b42ed0e98425051200767e7f63870dbbf", - "path" : "content/manual/manual/source/includes/and-or-behavior.rst" - }, { - "blob" : "f6bc070457047ca9f4039896451c4043a63be081", - "path" : "content/code-examples/tested/command-line/mongosh/operators/or/or-movies.snippet.or-movies.js" - }, { - "blob" : "e708b627c799d484acc19df9ac9d673d0960cd5a", - "path" : "content/code-examples/tested/command-line/mongosh/operators/or/or-movies-output.sh" - }, { - "blob" : "969854959ee6e02357f3ad1534add6ebedbcdff4", - "path" : "content/code-examples/tested/command-line/mongosh/operators/or/or-index-query.snippet.or-index-query.js" - }, { - "blob" : "78a8eeb0ade2e3fbcc83d73a7098a8561042ba80", - "path" : "content/code-examples/tested/command-line/mongosh/operators/or/or-index-create.snippet.or-index-create.js" - }, { - "blob" : "62146e0db7732171321cd8f51726753bba6dd0ea", - "path" : "content/code-examples/tested/command-line/mongosh/operators/or/or-theaters-geointersects.snippet.or-theaters-geointersects.js" - }, { - "blob" : "b12af8d0e1826500851cd67314cc03a76b5b0603", - "path" : "content/code-examples/tested/command-line/mongosh/operators/or/or-theaters-geointersects-output.sh" - }, { - "blob" : "09c0a43063c38385a7a3226455169cbe09e15b8c", - "path" : "content/code-examples/tested/command-line/mongosh/operators/or/or-equivalent-in.snippet.or-equivalent-in.js" - }, { - "blob" : "12475e6c496abc06b22d57bc1061a2d1ab434640", - "path" : "content/code-examples/tested/command-line/mongosh/operators/or/or-equivalent-in-output.sh" - } ], - "operator" : "or", - "pageBlob" : "f861a60862d92b7e0f1839f82400e4eb0016b859", - "source" : { - "commit" : "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", - "path" : "content/manual/manual/source/reference/operator/query/or.txt", - "relation" : "AT_ORIGIN" - } }, { "context" : "query/filters", "examples" : [ { @@ -11945,10 +11384,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "231e34e5ae706bd4cce129c3601d1066b2e85d8c", - "path" : "content/manual/manual/source/includes/note-geospatial-index-must-exist.rst" - } ], + "includes" : [ ], "operator" : "polygon", "pageBlob" : "23e1ecf8a53e87e26c1b28b8c53c498c5d66e29e", "source" : { @@ -11960,32 +11396,13 @@ "context" : "query/filters", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "927d8b4dee6455ade1e8b297fa7b23a97c1e5cc72271798720988f17cf0ecb36", - "text" : "db.products.find( { sku: { $regex: /789$/ } } )" - }, { "role" : "DATA", "sha256" : "4b5c8c2580e5f30de76c04866c52a93011569df89c12b09395d37501f9128727", "text" : "db.products.insertMany( [\n { _id: 100, sku: \"abc123\", description: \"Single line description.\" },\n { _id: 101, sku: \"abc789\", description: \"First line\\nSecond line\" },\n { _id: 102, sku: \"xyz456\", description: \"Many spaces before line\" },\n { _id: 103, sku: \"xyz789\", description: \"Multiple\\nline description\" },\n { _id: 104, sku: \"Abc789\", description: \"SKU starts with A\" }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "0915b4fe2e6ce821a6c32d18f9a6e9f931150906c5068d78ed7f8c24949a0211", - "text" : "SELECT * FROM products\nWHERE sku like \"%789\";" - } ], - "detail" : null, - "owner" : null, - "status" : "UNOWNED", - "stem" : "performALikeMatch", - "title" : "Perform a ``LIKE`` Match" - }, { - "blocks" : [ { "role" : "ACTION", "sha256" : "8cbcc091b707fc909827f782ebaf2b353cb4d3fc40b33b2d43104d3db8454d21", "text" : "db.products.find( { sku: { $regex: /^ABC/i } } )" - }, { - "role" : "DATA", - "sha256" : "4b5c8c2580e5f30de76c04866c52a93011569df89c12b09395d37501f9128727", - "text" : "db.products.insertMany( [\n { _id: 100, sku: \"abc123\", description: \"Single line description.\" },\n { _id: 101, sku: \"abc789\", description: \"First line\\nSecond line\" },\n { _id: 102, sku: \"xyz456\", description: \"Many spaces before line\" },\n { _id: 103, sku: \"xyz789\", description: \"Multiple\\nline description\" },\n { _id: 104, sku: \"Abc789\", description: \"SKU starts with A\" }\n] )" }, { "role" : "EXPECTED", "sha256" : "5f8aeda57bb5ef5558014798430e8709799bdaa3deb446ee8f174f5d3c350823", @@ -11998,13 +11415,13 @@ "title" : "Perform Case-Insensitive Regular Expression Match" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "5c99cdd62e5919607ea616b232418326f96e8910b9f8e5afe10f283a5320c27c", - "text" : "db.products.find( { description: { $regex: /\\bline\\b/ } } )" - }, { "role" : "DATA", "sha256" : "4b5c8c2580e5f30de76c04866c52a93011569df89c12b09395d37501f9128727", "text" : "db.products.insertMany( [\n { _id: 100, sku: \"abc123\", description: \"Single line description.\" },\n { _id: 101, sku: \"abc789\", description: \"First line\\nSecond line\" },\n { _id: 102, sku: \"xyz456\", description: \"Many spaces before line\" },\n { _id: 103, sku: \"xyz789\", description: \"Multiple\\nline description\" },\n { _id: 104, sku: \"Abc789\", description: \"SKU starts with A\" }\n] )" + }, { + "role" : "ACTION", + "sha256" : "5c99cdd62e5919607ea616b232418326f96e8910b9f8e5afe10f283a5320c27c", + "text" : "db.products.find( { description: { $regex: /\\bline\\b/ } } )" }, { "role" : "EXPECTED", "sha256" : "ba4013a1c29968408da7bce7f9645935ea7106862b0046a5f1dac781b492a085", @@ -12017,32 +11434,53 @@ "title" : "Match Whole Words Only" }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "4b5c8c2580e5f30de76c04866c52a93011569df89c12b09395d37501f9128727", + "text" : "db.products.insertMany( [\n { _id: 100, sku: \"abc123\", description: \"Single line description.\" },\n { _id: 101, sku: \"abc789\", description: \"First line\\nSecond line\" },\n { _id: 102, sku: \"xyz456\", description: \"Many spaces before line\" },\n { _id: 103, sku: \"xyz789\", description: \"Multiple\\nline description\" },\n { _id: 104, sku: \"Abc789\", description: \"SKU starts with A\" }\n] )" + }, { "role" : "ACTION", "sha256" : "eb02ab366f7905689b11d7ad68b88a1af9fc4bb4b4ee6cd88cd8064b3b994455", "text" : "db.products.find( { description: { $regex: /^S/, $options: 'm' } } )" }, { + "role" : "EXPECTED", + "sha256" : "5f8aeda57bb5ef5558014798430e8709799bdaa3deb446ee8f174f5d3c350823", + "text" : "[\n { _id: 100, sku: 'abc123', description: 'Single line description.' },\n { _id: 101, sku: 'abc789', description: 'First line\\nSecond line' },\n { _id: 104, sku: 'Abc789', description: 'SKU starts with A' }\n]" + } ], + "detail" : null, + "name" : "Match Lines That Start with S", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchLinesThatStartWithS", + "title" : "Multiline Match for Lines Starting with Specified Pattern" + }, { + "blocks" : [ { "role" : "DATA", "sha256" : "4b5c8c2580e5f30de76c04866c52a93011569df89c12b09395d37501f9128727", "text" : "db.products.insertMany( [\n { _id: 100, sku: \"abc123\", description: \"Single line description.\" },\n { _id: 101, sku: \"abc789\", description: \"First line\\nSecond line\" },\n { _id: 102, sku: \"xyz456\", description: \"Many spaces before line\" },\n { _id: 103, sku: \"xyz789\", description: \"Multiple\\nline description\" },\n { _id: 104, sku: \"Abc789\", description: \"SKU starts with A\" }\n] )" + }, { + "role" : "ACTION", + "sha256" : "1acd8d3a1163dfe5b84c15df570ab9bdcb091914a04c08e699599ed78483d337", + "text" : "db.products.find( { description: { $regex: /S/ } } )" }, { "role" : "EXPECTED", "sha256" : "5f8aeda57bb5ef5558014798430e8709799bdaa3deb446ee8f174f5d3c350823", "text" : "[\n { _id: 100, sku: 'abc123', description: 'Single line description.' },\n { _id: 101, sku: 'abc789', description: 'First line\\nSecond line' },\n { _id: 104, sku: 'Abc789', description: 'SKU starts with A' }\n]" } ], "detail" : null, + "name" : "Match S Anywhere", "owner" : null, "status" : "UNOWNED", - "stem" : "multilineMatchForLinesStartingWithSpecifiedPattern", + "stem" : "matchSAnywhere", "title" : "Multiline Match for Lines Starting with Specified Pattern" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "0af56f01741b67a245bff11095cfa71b38dcf7098f6bf472e475c5ece11dff48", - "text" : "db.products.find( { description: { $regex: /m.*line/, $options: 'si' } } )" - }, { "role" : "DATA", "sha256" : "4b5c8c2580e5f30de76c04866c52a93011569df89c12b09395d37501f9128727", "text" : "db.products.insertMany( [\n { _id: 100, sku: \"abc123\", description: \"Single line description.\" },\n { _id: 101, sku: \"abc789\", description: \"First line\\nSecond line\" },\n { _id: 102, sku: \"xyz456\", description: \"Many spaces before line\" },\n { _id: 103, sku: \"xyz789\", description: \"Multiple\\nline description\" },\n { _id: 104, sku: \"Abc789\", description: \"SKU starts with A\" }\n] )" + }, { + "role" : "ACTION", + "sha256" : "0af56f01741b67a245bff11095cfa71b38dcf7098f6bf472e475c5ece11dff48", + "text" : "db.products.find( { description: { $regex: /m.*line/, $options: 'si' } } )" }, { "role" : "EXPECTED", "sha256" : "b8c2bcc2ec7a1778d522771fc48eebbe04ec5f2aa644311e7a6d35c385038c0c", @@ -12052,16 +11490,16 @@ "owner" : null, "status" : "UNOWNED", "stem" : "useTheDotCharacterToMatchNewLine", - "title" : "Use the ``.`` Dot Character to Match New Line" + "title" : "Use the . Dot Character to Match New Line" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "cbcdc047801707f2f11641abcfa4529161650922f534ecd5ca2ea50ba67f63d4", - "text" : "var pattern = \"abc #category code\\n123 #item number\"\ndb.products.find( { sku: { $regex: pattern, $options: \"x\" } } )" - }, { "role" : "DATA", "sha256" : "4b5c8c2580e5f30de76c04866c52a93011569df89c12b09395d37501f9128727", "text" : "db.products.insertMany( [\n { _id: 100, sku: \"abc123\", description: \"Single line description.\" },\n { _id: 101, sku: \"abc789\", description: \"First line\\nSecond line\" },\n { _id: 102, sku: \"xyz456\", description: \"Many spaces before line\" },\n { _id: 103, sku: \"xyz789\", description: \"Multiple\\nline description\" },\n { _id: 104, sku: \"Abc789\", description: \"SKU starts with A\" }\n] )" + }, { + "role" : "ACTION", + "sha256" : "cbcdc047801707f2f11641abcfa4529161650922f534ecd5ca2ea50ba67f63d4", + "text" : "var pattern = \"abc #category code\\n123 #item number\"\ndb.products.find( { sku: { $regex: pattern, $options: \"x\" } } )" }, { "role" : "EXPECTED", "sha256" : "ce7978072d7983722063723941ea21ba9826c8bc5cb6544d5ffc4fca907ba027", @@ -12074,13 +11512,13 @@ "title" : "Ignore White Spaces in Pattern" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "0bf6256d8dd9695164c913e9b5e909941dc26369a6a88db93e20d63e63e47ff4", - "text" : "db.products.find( { sku: { $regex: \"(?i)a(?-i)bc\" } } )" - }, { "role" : "DATA", "sha256" : "4b5c8c2580e5f30de76c04866c52a93011569df89c12b09395d37501f9128727", "text" : "db.products.insertMany( [\n { _id: 100, sku: \"abc123\", description: \"Single line description.\" },\n { _id: 101, sku: \"abc789\", description: \"First line\\nSecond line\" },\n { _id: 102, sku: \"xyz456\", description: \"Many spaces before line\" },\n { _id: 103, sku: \"xyz789\", description: \"Multiple\\nline description\" },\n { _id: 104, sku: \"Abc789\", description: \"SKU starts with A\" }\n] )" + }, { + "role" : "ACTION", + "sha256" : "0bf6256d8dd9695164c913e9b5e909941dc26369a6a88db93e20d63e63e47ff4", + "text" : "db.products.find( { sku: { $regex: \"(?i)a(?-i)bc\" } } )" }, { "role" : "EXPECTED", "sha256" : "5f8aeda57bb5ef5558014798430e8709799bdaa3deb446ee8f174f5d3c350823", @@ -12093,31 +11531,33 @@ "title" : "Use a Regular Expression to Match Case in Strings" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/filters/regex/extendRegexOptionsToMatchCharactersOutsideOfAscii", "status" : "OWNED", "stem" : null, "title" : "Extend Regex Options to Match Characters Outside of ASCII" - } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" }, { - "blob" : "1c76d95ca483b2924600db416405d9e9850d96b3", - "path" : "content/manual/manual/source/includes/fact-6.1-pcre2.rst" - }, { - "blob" : "aca3da15ee2060e1d462b6e4b4e2799aadeaacaa", - "path" : "content/manual/manual/source/includes/indexes/case-insensitive-regex-queries.rst" + "blocks" : [ { + "role" : "DATA", + "sha256" : "4b5c8c2580e5f30de76c04866c52a93011569df89c12b09395d37501f9128727", + "text" : "db.products.insertMany( [\n { _id: 100, sku: \"abc123\", description: \"Single line description.\" },\n { _id: 101, sku: \"abc789\", description: \"First line\\nSecond line\" },\n { _id: 102, sku: \"xyz456\", description: \"Many spaces before line\" },\n { _id: 103, sku: \"xyz789\", description: \"Multiple\\nline description\" },\n { _id: 104, sku: \"Abc789\", description: \"SKU starts with A\" }\n] )" + }, { + "role" : "DATA", + "sha256" : "fe57eeed227fadcb73a7c902c24044435de23ac575895943964c7bcd7dc05ea3", + "text" : "db.songs.insertMany( [\n { _id: 0, \"artist\" : \"Blue Ă–yster Cult\", \"title\": \"The Reaper\" },\n { _id: 1, \"artist\": \"Blue Ă–yster Cult\", \"title\": \"Godzilla\" },\n { _id: 2, \"artist\" : \"Blue Oyster Cult\", \"title\": \"Take Me Away\" }\n] )" + }, { + "role" : "ACTION", + "sha256" : "3429e1aa070529af34a8b0eb137b3a2ceb84768a1ab75362e9c55979f6ffc92e", + "text" : "db.songs.find( { artist: { $regex: \"(*UCP)/\\byster/\" } } )" + } ], + "detail" : null, + "name" : "Match Unicode Word Boundaries", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchUnicodeWordBoundaries", + "title" : "Extend Regex Options to Match Characters Outside of ASCII" } ], + "includes" : [ ], "operator" : "regex", "pageBlob" : "15c439109f30b8b073365973147384da07bb16d2", "source" : { @@ -12125,43 +11565,21 @@ "path" : "content/manual/manual/source/reference/operator/query/regex.txt", "relation" : "AT_ORIGIN" } - }, { - "context" : "query/filters", - "examples" : [ ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "b633a0a267dc0b55feafbfc238e5bc216b1376b0", - "path" : "content/manual/manual/source/includes/arrays-additional-examples.rst" - } ], - "operator" : "size", - "pageBlob" : "08e7c8452ea24de98764afb510036f85f566ac6e", - "source" : { - "commit" : "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", - "path" : "content/manual/manual/source/reference/operator/query/size.txt", - "relation" : "AT_ORIGIN" - } }, { "context" : "query/filters", "examples" : [ { "blocks" : [ { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { "role" : "ACTION", - "sha256" : "eede64c00c4d1ebaab838e26c98ae820982b91e7e8ee2d98f7ced4706af5324e", - "text" : "db.movies.find(\n { $text: { $search: \"baseball\" }, runtime: { $gt: 1000 } },\n { _id: 0, title: 1, year: 1, runtime: 1 }\n)" + "sha256" : "b6ec9ad036e03a3b0f82b18dfefbe59aa3900ca342dd32fcffd3a559978eb4cc", + "text" : "db.movies.find(\n { $text: { $search: \"baseball\" }, runtime: { $gt: 1000 } },\n { _id: 0, title: 1, year: 1, runtime: 1 }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "3b8dd8784ce8eb39bb19c60cc3c9a48fba91fe3c348591c9e57370367c92747e", - "text" : "[ { title: 'Baseball', year: 1994, runtime: 1140 } ]" + "sha256" : "405d12565f2a989f805e2ba849ebfbc72a8b332c7fb0aa6983b2bcaa6d261793", + "text" : "[ { title: 'Baseball', year: 1994, runtime: 1140 } ]\n" } ], "detail" : null, "owner" : null, @@ -12170,13 +11588,17 @@ "title" : "Search for a Single Word" }, { "blocks" : [ { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { "role" : "ACTION", - "sha256" : "bfb2ef3417dc0822be0ddf435a51a10d88e951eda8ae9b332059606056f6552d", - "text" : "db.movies.find(\n { $text: { $search: \"baseball colorado\" },\n runtime: { $gt: 1000 } },\n { _id: 0, title: 1, year: 1, runtime: 1, fullplot: 1 }\n)" + "sha256" : "3970c483eb7113a39d2c8cd1bbaace615c4ce47d73c9a5ae979987fcde7961af", + "text" : "db.movies.find(\n { $text: { $search: \"baseball colorado\" },\n runtime: { $gt: 1000 } },\n { _id: 0, title: 1, year: 1, runtime: 1, fullplot: 1 }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "c6c4ce99f9b0c4f4fb0f9ed3468ae0c074b3e681e1402c9f5fca27c110376b48", - "text" : "[\n {\n runtime: 1140,\n title: 'Baseball',\n fullplot: 'Ken Burns relates the history of baseball in a fashion similar to that of his Civil War mini series. Old-time photos and illustrations depict the games early years, while newsreels and video clips highlight more recent developments. Players and participants speak in their own words, and sports writers and broadcasters offer commentary on the sport and events they witnessed.',\n year: 1994\n },\n {\n runtime: 1256,\n title: 'Centennial',\n fullplot: 'This is the story of the evolution of the town Centennial, Colorado. It follows the paths of dozens of people who come to the area for many reasons: money, freedom, or crime. It also shows the bigoted treatment of the Native Indians by the advancing US colonists. It is topped off with a murder mystery that takes 100 years to solve.',\n year: 1978\n }\n]" + "sha256" : "50501049bad77d92bf31ef8e2d06fea5e00147cd0060fd9378370e7a09090df0", + "text" : "[\n {\n runtime: 1140,\n title: 'Baseball',\n fullplot: 'Ken Burns relates the history of baseball in a fashion similar to that of his Civil War mini series. Old-time photos and illustrations depict the games early years, while newsreels and video clips highlight more recent developments. Players and participants speak in their own words, and sports writers and broadcasters offer commentary on the sport and events they witnessed.',\n year: 1994\n },\n {\n runtime: 1256,\n title: 'Centennial',\n fullplot: 'This is the story of the evolution of the town Centennial, Colorado. It follows the paths of dozens of people who come to the area for many reasons: money, freedom, or crime. It also shows the bigoted treatment of the Native Indians by the advancing US colonists. It is topped off with a murder mystery that takes 100 years to solve.',\n year: 1978\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -12185,18 +11607,43 @@ "title" : "Match Any Search Term" }, { "blocks" : [ { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { "role" : "ACTION", - "sha256" : "9dbf08ced1e9ff0e5b8b63a990092b28af8f7e9539d6a22c89c012111b7e42de", - "text" : "db.movies.find(\n { $text: { $search: \"\\\"ken burns\\\"\" },\n runtime: { $gt: 1000 } },\n { _id: 0, title: 1, year: 1, runtime: 1, fullplot: 1 }\n)" + "sha256" : "8250e19f1852c00634324e88654e165a8cc4c4b6255cfcbeb8861d845bda945d", + "text" : "db.movies.find(\n { $text: { $search: \"\\\"ken burns\\\"\" },\n runtime: { $gt: 1000 } },\n { _id: 0, title: 1, year: 1, runtime: 1, fullplot: 1 }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "84e96ab7866e7a38ed9db3c3b5a13f226cafa77ce53c0878c5fc8352332ed34d", - "text" : "[\n {\n runtime: 1140,\n title: 'Baseball',\n fullplot: 'Ken Burns relates the history of baseball in a fashion similar to that of his Civil War mini series. Old-time photos and illustrations depict the games early years, while newsreels and video clips highlight more recent developments. Players and participants speak in their own words, and sports writers and broadcasters offer commentary on the sport and events they witnessed.',\n year: 1994\n }\n]" + "sha256" : "709203e24c4f470ab3540a8e6a1e0922ef7b920a1c8f12a3f467516c6f0668fd", + "text" : "[\n {\n runtime: 1140,\n title: 'Baseball',\n fullplot: 'Ken Burns relates the history of baseball in a fashion similar to that of his Civil War mini series. Old-time photos and illustrations depict the games early years, while newsreels and video clips highlight more recent developments. Players and participants speak in their own words, and sports writers and broadcasters offer commentary on the sport and events they witnessed.',\n year: 1994\n }\n]\n" } ], "detail" : null, + "name" : "Search for One Exact Phrase", "owner" : null, "status" : "UNOWNED", - "stem" : "searchForAnExactString", + "stem" : "searchForOneExactPhrase", + "title" : "Search for an Exact String" + }, { + "blocks" : [ { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { + "role" : "ACTION", + "sha256" : "7eba1d3738880c9b3088f906cb063bebcb2621d3c4680220935d330161141dcd", + "text" : "db.movies.find(\n { $text: { $search: \"\\'ken burns\\' \\'centennial\\'\" },\n runtime: { $gt: 1000 } },\n { _id: 0, title: 1, year: 1, runtime: 1, fullplot: 1 }\n)\n" + }, { + "role" : "EXPECTED", + "sha256" : "50501049bad77d92bf31ef8e2d06fea5e00147cd0060fd9378370e7a09090df0", + "text" : "[\n {\n runtime: 1140,\n title: 'Baseball',\n fullplot: 'Ken Burns relates the history of baseball in a fashion similar to that of his Civil War mini series. Old-time photos and illustrations depict the games early years, while newsreels and video clips highlight more recent developments. Players and participants speak in their own words, and sports writers and broadcasters offer commentary on the sport and events they witnessed.',\n year: 1994\n },\n {\n runtime: 1256,\n title: 'Centennial',\n fullplot: 'This is the story of the evolution of the town Centennial, Colorado. It follows the paths of dozens of people who come to the area for many reasons: money, freedom, or crime. It also shows the bigoted treatment of the Native Indians by the advancing US colonists. It is topped off with a murder mystery that takes 100 years to solve.',\n year: 1978\n }\n]\n" + } ], + "detail" : null, + "name" : "Search for Two Exact Phrases", + "owner" : null, + "status" : "UNOWNED", + "stem" : "searchForTwoExactPhrases", "title" : "Search for an Exact String" }, { "blocks" : [ ], @@ -12206,12 +11653,62 @@ "stem" : null, "title" : "Exclude Documents That Contain a Term" }, { - "blocks" : [ ], - "detail" : null, - "owner" : "query/filters/text/relevanceScoreExamples", - "status" : "OWNED", - "stem" : null, - "title" : "Relevance Score Examples" + "blocks" : [ { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { + "role" : "ACTION", + "sha256" : "fc29a3bfa2c9c11cd09deabcdd9d125006cf281de21e5774f8241614499ed981", + "text" : "db.movies.find(\n { $text: { $search: \"baseball\" }, runtime: { $gt: 1000 } },\n { _id: 0, title: 1, year: 1,\n score: { $meta: \"textScore\" } }\n)\n" + }, { + "role" : "EXPECTED", + "sha256" : "29c3ddd6094d67e6a870abaafb7058bd183af54057c8d60ba3dd4dafff2de4b3", + "text" : "[\n {\n title: 'Baseball',\n year: 1994,\n score: ...\n }\n]\n" + } ], + "detail" : "SYNTAX", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "returnTheRelevanceScore", + "title" : "Return the Relevance Score" + }, { + "blocks" : [ { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { + "role" : "ACTION", + "sha256" : "c819ebc8b69422f5a304041f8cc8bde33fac1ae858a9a8096383d7c4c99ce868", + "text" : "db.movies.find(\n { $text: { $search: \"baseball colorado\" },\n runtime: { $gt: 1000 } },\n { _id: 0, title: 1, year: 1,\n score: { $meta: \"textScore\" } }\n).sort( { score: { $meta: \"textScore\" } } ).limit(2)\n" + }, { + "role" : "EXPECTED", + "sha256" : "048580e4817f63f2059c1b1800566325b1b3adee47eb2b2eaf675040f8292232", + "text" : "[\n { title: 'Baseball', year: 1994, score: ... },\n { title: 'Centennial', year: 1978, score: ... }\n]\n" + } ], + "detail" : "SYNTAX", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "returnTop2MatchingDocuments", + "title" : "Return Top 2 Matching Documents" + }, { + "blocks" : [ { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { + "role" : "ACTION", + "sha256" : "55d4d5e8737756cec955b29bbabaa95e6fbb4f200658e31a92c0a3bef4094779", + "text" : "db.movies.find(\n { runtime: { $gt: 1000 },\n $text: { $search: \"baseball colorado\" } },\n { _id: 0, title: 1, year: 1,\n score: { $meta: \"textScore\" } }\n).sort( { year: 1, score: { $meta: \"textScore\" } } )\n" + }, { + "role" : "EXPECTED", + "sha256" : "6f718d3bcca9a53073cd401afbb3f1216b8fa9e19247f27a65422c7ae1c2e04d", + "text" : "[\n { title: 'Centennial', year: 1978, score: ... },\n { title: 'Baseball', year: 1994, score: ... }\n]\n" + } ], + "detail" : "SYNTAX", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "combineTextWithOtherQueryAndSortOperations", + "title" : "Combine $text with Other Query and Sort Operations" }, { "blocks" : [ ], "detail" : null, @@ -12221,22 +11718,38 @@ "title" : "Query a Different Language" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "f4d0c0955b7346d657c3064678dea3cfe5168f5c242bdb85eeab69df2ff16c85", - "text" : "db.articles.find(\n { $text: { $search: \"cake\" } }\n).sort( { score: { $meta: \"textScore\" } } )" + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { + "role" : "INDEX", + "sha256" : "71581de959b59f1061b738adee1fe90bcc0427a04c5f88bc132c2bc397da14cc", + "text" : "db.articles.createIndex( { subject: \"text\" } )\n" }, { "role" : "DATA", - "sha256" : "75be7567ac471f668230dc37e999a96b7ab0dd610b9b3f4b1efb54cbb6bdf500", - "text" : "db.articles.insertMany( [\n { _id: 1, subject: \"coffee\", author: \"xyz\", views: 50 },\n { _id: 2, subject: \"Coffee Shopping\", author: \"efg\", views: 5 },\n { _id: 3, subject: \"Baking a cake\", author: \"abc\", views: 90 },\n { _id: 4, subject: \"baking\", author: \"xyz\", views: 100 },\n { _id: 5, subject: \"CafĂ© Con Leche\", author: \"abc\", views: 200 },\n { _id: 6, subject: \"Đ¡Ñ‹Ñ€Đ½Đ¸ĐºĐ¸\", author: \"jkl\", views: 80 },\n { _id: 7, subject: \"coffee and cream\", author: \"efg\", views: 10 },\n { _id: 8, subject: \"Cafe con Leche\", author: \"xyz\", views: 10 }\n] )" + "sha256" : "81f2fdc2f8614284c927f0016f9d5390d4e7ae32ac08b0262e7445fbbd5d8a44", + "text" : "db.articles.insertMany( [\n { _id: 1, subject: \"coffee\", author: \"xyz\", views: 50 },\n { _id: 2, subject: \"Coffee Shopping\", author: \"efg\", views: 5 },\n { _id: 3, subject: \"Baking a cake\", author: \"abc\", views: 90 },\n { _id: 4, subject: \"baking\", author: \"xyz\", views: 100 },\n { _id: 5, subject: \"CafĂ© Con Leche\", author: \"abc\", views: 200 },\n { _id: 6, subject: \"Đ¡Ñ‹Ñ€Đ½Đ¸ĐºĐ¸\", author: \"jkl\", views: 80 },\n { _id: 7, subject: \"coffee and cream\", author: \"efg\", views: 10 },\n { _id: 8, subject: \"Cafe con Leche\", author: \"xyz\", views: 10 }\n] )\n" }, { "role" : "INDEX", - "sha256" : "17d16d38e69065181aa8c466ba2318f512838a0ab738a0290d0dd6a7cb3c4735", - "text" : "db.articles.createIndex( { subject: \"text\" } )" + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { + "role" : "ACTION", + "sha256" : "f4d0c0955b7346d657c3064678dea3cfe5168f5c242bdb85eeab69df2ff16c85", + "text" : "db.articles.find(\n { $text: { $search: \"cake\" } }\n).sort( { score: { $meta: \"textScore\" } } )" } ], "detail" : null, + "name" : "Sort Articles by Their Text Score", "owner" : null, "status" : "UNOWNED", - "stem" : "sortByRelevanceScore", + "stem" : "sortArticlesByTheirTextScore", + "title" : "Sort by Relevance Score" + }, { + "blocks" : [ ], + "detail" : "matched by action text", + "owner" : "query/filters/text/relevanceScoreExamples", + "status" : "OWNED", + "stem" : null, "title" : "Sort by Relevance Score" }, { "blocks" : [ ], @@ -12247,170 +11760,235 @@ "title" : "Case and Diacritic Insensitivity" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/filters/text/caseSensitivity", "status" : "OWNED", "stem" : null, - "title" : "Case Sensitivity" + "title" : "Case-Sensitive Term Search" + }, { + "blocks" : [ { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { + "role" : "INDEX", + "sha256" : "71581de959b59f1061b738adee1fe90bcc0427a04c5f88bc132c2bc397da14cc", + "text" : "db.articles.createIndex( { subject: \"text\" } )\n" + }, { + "role" : "DATA", + "sha256" : "81f2fdc2f8614284c927f0016f9d5390d4e7ae32ac08b0262e7445fbbd5d8a44", + "text" : "db.articles.insertMany( [\n { _id: 1, subject: \"coffee\", author: \"xyz\", views: 50 },\n { _id: 2, subject: \"Coffee Shopping\", author: \"efg\", views: 5 },\n { _id: 3, subject: \"Baking a cake\", author: \"abc\", views: 90 },\n { _id: 4, subject: \"baking\", author: \"xyz\", views: 100 },\n { _id: 5, subject: \"CafĂ© Con Leche\", author: \"abc\", views: 200 },\n { _id: 6, subject: \"Đ¡Ñ‹Ñ€Đ½Đ¸ĐºĐ¸\", author: \"jkl\", views: 80 },\n { _id: 7, subject: \"coffee and cream\", author: \"efg\", views: 10 },\n { _id: 8, subject: \"Cafe con Leche\", author: \"xyz\", views: 10 }\n] )\n" + }, { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { + "role" : "ACTION", + "sha256" : "e0870a3b30a57924bcb4d0ed58ee30e7e06d75d146e1eaddb215f0e4a50ae7ed", + "text" : "db.articles.find( {\n $text: { $search: \"\\\"CafĂ© Con Leche\\\"\", $caseSensitive: true }\n} )\n" + }, { + "role" : "EXPECTED", + "sha256" : "3cdebb2c44c0d240687fa7639a686a21083fbb354900d1fe46fa38135a5fd525", + "text" : "[ { _id: 5, subject: 'CafĂ© Con Leche', author: 'abc', views: 200 } ]\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "caseSensitiveExactStringSearch", + "title" : "Case-Sensitive Exact String Search" }, { "blocks" : [ { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { + "role" : "INDEX", + "sha256" : "71581de959b59f1061b738adee1fe90bcc0427a04c5f88bc132c2bc397da14cc", + "text" : "db.articles.createIndex( { subject: \"text\" } )\n" + }, { + "role" : "DATA", + "sha256" : "81f2fdc2f8614284c927f0016f9d5390d4e7ae32ac08b0262e7445fbbd5d8a44", + "text" : "db.articles.insertMany( [\n { _id: 1, subject: \"coffee\", author: \"xyz\", views: 50 },\n { _id: 2, subject: \"Coffee Shopping\", author: \"efg\", views: 5 },\n { _id: 3, subject: \"Baking a cake\", author: \"abc\", views: 90 },\n { _id: 4, subject: \"baking\", author: \"xyz\", views: 100 },\n { _id: 5, subject: \"CafĂ© Con Leche\", author: \"abc\", views: 200 },\n { _id: 6, subject: \"Đ¡Ñ‹Ñ€Đ½Đ¸ĐºĐ¸\", author: \"jkl\", views: 80 },\n { _id: 7, subject: \"coffee and cream\", author: \"efg\", views: 10 },\n { _id: 8, subject: \"Cafe con Leche\", author: \"xyz\", views: 10 }\n] )\n" + }, { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { "role" : "ACTION", - "sha256" : "f9e46f1370668823bbb62e27bb22a0ebfbe10f2e36397b4ba68f85cd7c2b94a0", - "text" : "db.articles.find(\n { $text: { $search: \"CAFÉ\", $diacriticSensitive: true } }\n)" + "sha256" : "20bd90018c62e3646b70f8df158e9c3f52ffe76ca8eaee87c20af64f5cd8774e", + "text" : "db.articles.find(\n { $text: { $search: \"Coffee -shop\", $caseSensitive: true } }\n)\n" + }, { + "role" : "EXPECTED", + "sha256" : "d9ce18a04b5a41f705545d6b2f3739bee6fb8eb3113138259223354776e45312", + "text" : "[ { _id: 2, subject: 'Coffee Shopping', author: 'efg', views: 5 } ]\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "caseSensitiveNegatedTermSearch", + "title" : "Case-Sensitive Negated Term Search" + }, { + "blocks" : [ { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { + "role" : "INDEX", + "sha256" : "71581de959b59f1061b738adee1fe90bcc0427a04c5f88bc132c2bc397da14cc", + "text" : "db.articles.createIndex( { subject: \"text\" } )\n" }, { "role" : "DATA", - "sha256" : "75be7567ac471f668230dc37e999a96b7ab0dd610b9b3f4b1efb54cbb6bdf500", - "text" : "db.articles.insertMany( [\n { _id: 1, subject: \"coffee\", author: \"xyz\", views: 50 },\n { _id: 2, subject: \"Coffee Shopping\", author: \"efg\", views: 5 },\n { _id: 3, subject: \"Baking a cake\", author: \"abc\", views: 90 },\n { _id: 4, subject: \"baking\", author: \"xyz\", views: 100 },\n { _id: 5, subject: \"CafĂ© Con Leche\", author: \"abc\", views: 200 },\n { _id: 6, subject: \"Đ¡Ñ‹Ñ€Đ½Đ¸ĐºĐ¸\", author: \"jkl\", views: 80 },\n { _id: 7, subject: \"coffee and cream\", author: \"efg\", views: 10 },\n { _id: 8, subject: \"Cafe con Leche\", author: \"xyz\", views: 10 }\n] )" + "sha256" : "81f2fdc2f8614284c927f0016f9d5390d4e7ae32ac08b0262e7445fbbd5d8a44", + "text" : "db.articles.insertMany( [\n { _id: 1, subject: \"coffee\", author: \"xyz\", views: 50 },\n { _id: 2, subject: \"Coffee Shopping\", author: \"efg\", views: 5 },\n { _id: 3, subject: \"Baking a cake\", author: \"abc\", views: 90 },\n { _id: 4, subject: \"baking\", author: \"xyz\", views: 100 },\n { _id: 5, subject: \"CafĂ© Con Leche\", author: \"abc\", views: 200 },\n { _id: 6, subject: \"Đ¡Ñ‹Ñ€Đ½Đ¸ĐºĐ¸\", author: \"jkl\", views: 80 },\n { _id: 7, subject: \"coffee and cream\", author: \"efg\", views: 10 },\n { _id: 8, subject: \"Cafe con Leche\", author: \"xyz\", views: 10 }\n] )\n" + }, { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { + "role" : "ACTION", + "sha256" : "f33135cf20908bd4ba8e7cbda7496a0b3ad5ef91e30f9d0f3c5f870c27a82c36", + "text" : "db.articles.find(\n { $text: { $search: \"CAFÉ\", $diacriticSensitive: true } }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "4fc8cc86c2e8ae1d35ac85887778007fa51d6ad3cccb92c2d20790a44559c1c3", - "text" : "[ { _id: 5, subject: 'CafĂ© Con Leche', author: 'abc', views: 200 } ]" + "sha256" : "3cdebb2c44c0d240687fa7639a686a21083fbb354900d1fe46fa38135a5fd525", + "text" : "[ { _id: 5, subject: 'CafĂ© Con Leche', author: 'abc', views: 200 } ]\n" + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "diacriticSensitiveTermSearch", + "title" : "Diacritic-Sensitive Term Search" + }, { + "blocks" : [ { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" }, { "role" : "INDEX", - "sha256" : "17d16d38e69065181aa8c466ba2318f512838a0ab738a0290d0dd6a7cb3c4735", - "text" : "db.articles.createIndex( { subject: \"text\" } )" + "sha256" : "71581de959b59f1061b738adee1fe90bcc0427a04c5f88bc132c2bc397da14cc", + "text" : "db.articles.createIndex( { subject: \"text\" } )\n" + }, { + "role" : "DATA", + "sha256" : "81f2fdc2f8614284c927f0016f9d5390d4e7ae32ac08b0262e7445fbbd5d8a44", + "text" : "db.articles.insertMany( [\n { _id: 1, subject: \"coffee\", author: \"xyz\", views: 50 },\n { _id: 2, subject: \"Coffee Shopping\", author: \"efg\", views: 5 },\n { _id: 3, subject: \"Baking a cake\", author: \"abc\", views: 90 },\n { _id: 4, subject: \"baking\", author: \"xyz\", views: 100 },\n { _id: 5, subject: \"CafĂ© Con Leche\", author: \"abc\", views: 200 },\n { _id: 6, subject: \"Đ¡Ñ‹Ñ€Đ½Đ¸ĐºĐ¸\", author: \"jkl\", views: 80 },\n { _id: 7, subject: \"coffee and cream\", author: \"efg\", views: 10 },\n { _id: 8, subject: \"Cafe con Leche\", author: \"xyz\", views: 10 }\n] )\n" + }, { + "role" : "INDEX", + "sha256" : "b1e9d6b91f2bd20f62f0daba26054fea284a4a9a79761778565e2e7a3f9c9690", + "text" : "db.movies.createIndex( { title: \"text\", fullplot: \"text\" } )\n" + }, { + "role" : "ACTION", + "sha256" : "93e60835a353fae1defcb7b60906b082b3435a2f397c0a4f3258f8cb0108f058", + "text" : "db.articles.find(\n { $text: { $search: \"leches -cafĂ©s\", $diacriticSensitive: true } }\n)\n" + }, { + "role" : "EXPECTED", + "sha256" : "039d76064358d8e9242b51a3177883e3da18de57d76b402f958d47838ef9cfe4", + "text" : "[ { _id: 8, subject: 'Cafe con Leche', author: 'xyz', views: 10 } ]\n" } ], "detail" : null, "owner" : null, "status" : "UNOWNED", - "stem" : "diacriticSensitivity", - "title" : "Diacritic Sensitivity" + "stem" : "diacriticSensitiveNegatedTermSearch", + "title" : "Diacritic-Sensitive Negated Term Search" } ], "includes" : [ { - "blob" : "993191a198b02fbb955f69ff654fdf46f966e57d", - "path" : "content/manual/manual/source/includes/extracts-atlas-search-facts.yaml" - }, { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" + "blob" : "26f6d4a973a1a5a817eb5340bc075eab6d3a3bf1", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-articles-create-index.snippet.text-articles-create-index.js" }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" + "blob" : "8c3f69fc97768216d8d96289aa2c07c46b4f8ea1", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-articles-insert-data.snippet.text-articles-insert-data.js" }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" + "blob" : "2a29a918f81f5d198563ff21f93169d931fbd2ec", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-create-index.snippet.text-create-index.js" }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" + "blob" : "9e6eea0789877fee2330c93b9cf59756109dee87", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-diacritic-insensitive-output.sh" }, { - "blob" : "99ffff8b9dbf77ce27ea92414cf76853a348752d", - "path" : "content/manual/manual/source/includes/fact-text-search-language-none.rst" + "blob" : "41893b76a1f20d6c96e459225cc657c77145fe91", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-diacritic-insensitive.snippet.text-search-case-diacritic-insensitive.js" }, { - "blob" : "8c95dbe444efb517395c376736ee2216096b9dfa", - "path" : "content/manual/manual/source/includes/list-text-search-restrictions-in-agg.rst" + "blob" : "9275436eac5fe42c2df597e7d8c05fcb6e6784a4", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-sensitive-exact-output.sh" }, { - "blob" : "a891f76e4032268b63849ceba85f3724e57dc430", - "path" : "content/manual/manual/source/includes/fact-text-search-multiword-and-term.rst" + "blob" : "ed577a31da1b690b6e0f8cbbfca79e0f583708ef", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-sensitive-exact.snippet.text-search-case-sensitive-exact.js" }, { - "blob" : "50afb761bede2976f652398ce19d3338b2e21947", - "path" : "content/manual/manual/source/includes/fact-text-search-score.rst" + "blob" : "62a4cc590ec6c7dfa574f4e7171fef94cb39c024", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-sensitive-negated-output.sh" }, { - "blob" : "44ab76f421f1c320b5c0053eddfd9c78fd8a4819", - "path" : "content/manual/manual/source/includes/fact-text-search-spilling.rst" + "blob" : "63800dbd7efab174e9b03d586d849ddaeb5d3adc", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-sensitive-negated.snippet.text-search-case-sensitive-negated.js" }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "62a4cc590ec6c7dfa574f4e7171fef94cb39c024", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-sensitive-term-output.sh" }, { - "blob" : "66943d53d54f268991c145e086785366069d3cab", - "path" : "content/manual/manual/source/includes/extracts-4.4-changes.yaml" + "blob" : "c2e63f75abfbce429493f3695da339ebf5171fdb", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-sensitive-term.snippet.text-search-case-sensitive-term.js" }, { - "blob" : "2a29a918f81f5d198563ff21f93169d931fbd2ec", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-create-index.snippet.text-create-index.js" + "blob" : "a8e07e25f8ca8b588d454c30eca050e2b7b25eb1", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-diacritic-sensitive-negated-output.sh" }, { - "blob" : "efdcd5db9c12ba55c35da19645dc8688be0f3875", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-single-word.snippet.text-search-single-word.js" + "blob" : "572fe8565b7b437dc3a1c9dbc5d4e52f6b9a8092", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-diacritic-sensitive-negated.snippet.text-search-diacritic-sensitive-negated.js" }, { - "blob" : "9c16f8cbe8465b145e7bed99d3711bec5764d6f8", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-single-word-output.sh" + "blob" : "9275436eac5fe42c2df597e7d8c05fcb6e6784a4", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-diacritic-sensitive-term-output.sh" }, { - "blob" : "727e349dae3756b5d22721f69b5f7241c9c60a16", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-multi-term.snippet.text-search-multi-term.js" + "blob" : "aa4ef34110f8084343e7ddec770ef01be8e328c5", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-diacritic-sensitive-term.snippet.text-search-diacritic-sensitive-term.js" }, { "blob" : "3a128c42eb8edd35cadd8615ffe70e83b281baab", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-multi-term-output.sh" + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-exact-phrase-or-output.sh" }, { - "blob" : "656970901cb5c0498c3ccdf7d3448c8828d7eb72", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-exact-phrase.snippet.text-search-exact-phrase.js" + "blob" : "7459974cbd671c3fc2f4f6ebc8026b77a6b07c3e", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-exact-phrase-or.snippet.text-search-exact-phrase-or.js" }, { "blob" : "d5630c5a3944e805aae1d40bc98f6e2e61ae8256", "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-exact-phrase-output.sh" }, { - "blob" : "7459974cbd671c3fc2f4f6ebc8026b77a6b07c3e", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-exact-phrase-or.snippet.text-search-exact-phrase-or.js" + "blob" : "656970901cb5c0498c3ccdf7d3448c8828d7eb72", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-exact-phrase.snippet.text-search-exact-phrase.js" + }, { + "blob" : "4d5ca0acd84fa9ea633d8f3814c887dba649954b", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-language-output.sh" + }, { + "blob" : "75a60dd62751a48d358b7c18dfd59f392e27dd0f", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-language.snippet.text-search-language.js" }, { "blob" : "3a128c42eb8edd35cadd8615ffe70e83b281baab", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-exact-phrase-or-output.sh" + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-multi-term-output.sh" }, { - "blob" : "f921f91d41a493689a8e617282144f9ca7a1cd80", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-negation.snippet.text-search-negation.js" + "blob" : "727e349dae3756b5d22721f69b5f7241c9c60a16", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-multi-term.snippet.text-search-multi-term.js" }, { "blob" : "679962a8b0fb146651ca19b00fe0317fc4b803f6", "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-negation-output.sh" }, { - "blob" : "a6284710a277d90cf0810ee8cf489f17f58d0929", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-score.snippet.text-search-score.js" + "blob" : "f921f91d41a493689a8e617282144f9ca7a1cd80", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-negation.snippet.text-search-negation.js" }, { "blob" : "c1ddae6e1020ee1e49ecfba496218af0d79f2d5b", "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-score-output.sh" }, { - "blob" : "f777d9b36e11895a6befd8344c1c28d79f422e3c", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-top-two.snippet.text-search-top-two.js" + "blob" : "a6284710a277d90cf0810ee8cf489f17f58d0929", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-score.snippet.text-search-score.js" }, { - "blob" : "6cae087a2dc8c328c1176667d949a926be7c6613", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-top-two-output.sh" + "blob" : "9c16f8cbe8465b145e7bed99d3711bec5764d6f8", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-single-word-output.sh" }, { - "blob" : "7cf84feda4b1f121564dc12d01c8ec750619207f", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-sort-combined.snippet.text-search-sort-combined.js" + "blob" : "efdcd5db9c12ba55c35da19645dc8688be0f3875", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-single-word.snippet.text-search-single-word.js" }, { "blob" : "7f3e69c03c05aad4389b1ee084d34af16a796f15", "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-sort-combined-output.sh" }, { - "blob" : "26f6d4a973a1a5a817eb5340bc075eab6d3a3bf1", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-articles-create-index.snippet.text-articles-create-index.js" - }, { - "blob" : "8c3f69fc97768216d8d96289aa2c07c46b4f8ea1", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-articles-insert-data.snippet.text-articles-insert-data.js" - }, { - "blob" : "75a60dd62751a48d358b7c18dfd59f392e27dd0f", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-language.snippet.text-search-language.js" - }, { - "blob" : "4d5ca0acd84fa9ea633d8f3814c887dba649954b", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-language-output.sh" - }, { - "blob" : "41893b76a1f20d6c96e459225cc657c77145fe91", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-diacritic-insensitive.snippet.text-search-case-diacritic-insensitive.js" - }, { - "blob" : "9e6eea0789877fee2330c93b9cf59756109dee87", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-diacritic-insensitive-output.sh" - }, { - "blob" : "c2e63f75abfbce429493f3695da339ebf5171fdb", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-sensitive-term.snippet.text-search-case-sensitive-term.js" - }, { - "blob" : "62a4cc590ec6c7dfa574f4e7171fef94cb39c024", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-sensitive-term-output.sh" - }, { - "blob" : "ed577a31da1b690b6e0f8cbbfca79e0f583708ef", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-sensitive-exact.snippet.text-search-case-sensitive-exact.js" - }, { - "blob" : "9275436eac5fe42c2df597e7d8c05fcb6e6784a4", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-sensitive-exact-output.sh" - }, { - "blob" : "63800dbd7efab174e9b03d586d849ddaeb5d3adc", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-sensitive-negated.snippet.text-search-case-sensitive-negated.js" - }, { - "blob" : "62a4cc590ec6c7dfa574f4e7171fef94cb39c024", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-case-sensitive-negated-output.sh" - }, { - "blob" : "aa4ef34110f8084343e7ddec770ef01be8e328c5", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-diacritic-sensitive-term.snippet.text-search-diacritic-sensitive-term.js" - }, { - "blob" : "9275436eac5fe42c2df597e7d8c05fcb6e6784a4", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-diacritic-sensitive-term-output.sh" + "blob" : "7cf84feda4b1f121564dc12d01c8ec750619207f", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-sort-combined.snippet.text-search-sort-combined.js" }, { - "blob" : "572fe8565b7b437dc3a1c9dbc5d4e52f6b9a8092", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-diacritic-sensitive-negated.snippet.text-search-diacritic-sensitive-negated.js" + "blob" : "6cae087a2dc8c328c1176667d949a926be7c6613", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-top-two-output.sh" }, { - "blob" : "a8e07e25f8ca8b588d454c30eca050e2b7b25eb1", - "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-diacritic-sensitive-negated-output.sh" + "blob" : "f777d9b36e11895a6befd8344c1c28d79f422e3c", + "path" : "content/code-examples/tested/command-line/mongosh/operators/text/text-search-top-two.snippet.text-search-top-two.js" } ], "operator" : "text", "pageBlob" : "e852e8a20ef2b64a293852991fb69d879a5b8f7d", @@ -12424,34 +12002,92 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "4aac6f98805ee341178fe66e827b12aaca541faafd1353bb413a2c3c4bb67a81", - "text" : "db.movies.find(\n { \"imdb.rating\": { $type: 2 }, year: 2013 },\n { _id: 0, title: 1, year: 1, \"imdb.rating\": 1 }\n)" + "sha256" : "99d54bcc38b997f26cf339b3870c9f5d19d2cae4aaf12fa56b3bbc500a01efa5", + "text" : "db.movies.find(\n { \"imdb.rating\": { $type: 2 }, year: 2013 },\n { _id: 0, title: 1, year: 1, \"imdb.rating\": 1 }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "739f37709263cfa43282104be3af2f59f665d71b3a0b09a8f9ee21e9eb61422d", - "text" : "[\n { title: 'Coming to Terms', year: 2013, imdb: { rating: '' } },\n { title: 'Absent Minded', year: 2013, imdb: { rating: '' } }\n]" + "sha256" : "bd044d9d430c5a6701544f8af2b44ae6a7b62f47d612122139045fd71956688e", + "text" : "[\n { title: 'Coming to Terms', year: 2013, imdb: { rating: '' } },\n { title: 'Absent Minded', year: 2013, imdb: { rating: '' } }\n]\n" } ], "detail" : null, + "name" : "Match String Ratings by Type Number", "owner" : null, "status" : "UNOWNED", - "stem" : "queryingByDataType", + "stem" : "matchStringRatingsByTypeNumber", "title" : "Querying by Data Type" }, { - "blocks" : [ ], + "blocks" : [ { + "role" : "ACTION", + "sha256" : "84685dfc533e691999db75301acb565b6a2fc8a01b20b43b693da7a4a4895320", + "text" : "db.movies.find(\n { \"imdb.rating\": { $type: \"string\" }, year: 2013 },\n { _id: 0, title: 1, year: 1, \"imdb.rating\": 1 }\n)\n" + }, { + "role" : "EXPECTED", + "sha256" : "bd044d9d430c5a6701544f8af2b44ae6a7b62f47d612122139045fd71956688e", + "text" : "[\n { title: 'Coming to Terms', year: 2013, imdb: { rating: '' } },\n { title: 'Absent Minded', year: 2013, imdb: { rating: '' } }\n]\n" + } ], "detail" : null, - "owner" : "query/filters/type/queryingByMultipleDataTypes", - "status" : "OWNED", - "stem" : null, + "name" : "Match String Ratings by Type Alias", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchStringRatingsByTypeAlias", + "title" : "Querying by Data Type" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "cf5ce41e809c86ef9cc77e0f38db84a35b5c48ab443502f8c044eb6061d72ad9", + "text" : "db.movies.find(\n { \"imdb.rating\": { $type: \"number\" }, runtime: { $gt: 1000 } },\n { _id: 0, title: 1, runtime: 1, \"imdb.rating\": 1 }\n)\n" + }, { + "role" : "EXPECTED", + "sha256" : "3f79bf3d372d20c4b814b8145564f464634e9fe927ed90208742107637b2c0bc", + "text" : "[\n { runtime: 1256, title: 'Centennial', imdb: { rating: 8.5 } },\n { runtime: 1140, title: 'Baseball', imdb: { rating: 9.1 } }\n]\n" + } ], + "detail" : null, + "name" : "Match Numeric Ratings", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchNumericRatings", + "title" : "Querying by Data Type" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "82ad4fb869ecad965f29dd67a368136d45754148039a9186787933f83f036a96", + "text" : "db.movies.find(\n { \"imdb.rating\": { $type: [ 2, 1 ] },\n runtime: { $gt: 1000 } },\n { _id: 0, title: 1, runtime: 1, \"imdb.rating\": 1 }\n)\n" + }, { + "role" : "EXPECTED", + "sha256" : "3f79bf3d372d20c4b814b8145564f464634e9fe927ed90208742107637b2c0bc", + "text" : "[\n { runtime: 1256, title: 'Centennial', imdb: { rating: 8.5 } },\n { runtime: 1140, title: 'Baseball', imdb: { rating: 9.1 } }\n]\n" + } ], + "detail" : null, + "name" : "Match Several Types by Number", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchSeveralTypesByNumber", + "title" : "Querying by Multiple Data Types" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "9eb1d96bcd464f0204a39dac12f6b245d764915699b0dadf8f4b1b27f65c424f", + "text" : "db.movies.find(\n { \"imdb.rating\": { $type: [ \"string\", \"double\" ] },\n runtime: { $gt: 1000 } },\n { _id: 0, title: 1, runtime: 1, \"imdb.rating\": 1 }\n)\n" + }, { + "role" : "EXPECTED", + "sha256" : "3f79bf3d372d20c4b814b8145564f464634e9fe927ed90208742107637b2c0bc", + "text" : "[\n { runtime: 1256, title: 'Centennial', imdb: { rating: 8.5 } },\n { runtime: 1140, title: 'Baseball', imdb: { rating: 9.1 } }\n]\n" + } ], + "detail" : null, + "name" : "Match Several Types by Alias", + "owner" : null, + "status" : "UNOWNED", + "stem" : "matchSeveralTypesByAlias", "title" : "Querying by Multiple Data Types" }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "579063fb18fa23c61af0eb7e95dde73cf2e6b5b3b57fa9951d3519e9e60c73c4", - "text" : "db.movies.find(\n { genres: { $type: \"array\" }, runtime: { $gt: 1000 } },\n { _id: 0, title: 1, genres: 1 }\n)" + "sha256" : "5e292e60024204418a0381b961fb8810a08c5a1c8b95c83f9cef55cfae8db616", + "text" : "db.movies.find(\n { genres: { $type: \"array\" }, runtime: { $gt: 1000 } },\n { _id: 0, title: 1, genres: 1 }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "bfbf52cc57bc791546259a4fab4bd08d92157cc114f51291b491e0230c3c807c", - "text" : "[\n {\n title: 'Centennial',\n genres: [ 'Action', 'Adventure', 'Drama' ]\n },\n {\n title: 'Baseball',\n genres: [ 'Documentary', 'History', 'Sport' ]\n }\n]" + "sha256" : "4dfadd437ef1c30f074565f648e198db64c5121a1823428c75b1fe6c61134f88", + "text" : "[\n {\n title: 'Centennial',\n genres: [ 'Action', 'Adventure', 'Drama' ]\n },\n {\n title: 'Baseball',\n genres: [ 'Documentary', 'History', 'Sport' ]\n }\n]\n" } ], "detail" : null, "owner" : null, @@ -12461,60 +12097,55 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "25a1ab9b3b38af3168d929f981b7405734a0636f3d6438c4bc48881c89df4c47", - "text" : "db.restaurants.find(\n { \"grades.grade\" : { $type : \"minKey\" } }\n)" - }, { - "role" : "DATA", - "sha256" : "f60c4982dd4fe14fca2ca918f8bd781b0f02f9b60de108f423208297cc135d5e", - "text" : "db.restaurants.insertOne( {\n _id: 1,\n address: {\n building: \"230\",\n coord: [ -73.996089, 40.675018 ],\n street: \"Huntington St\",\n zipcode: \"11231\"\n },\n borough: \"Brooklyn\",\n cuisine: \"Bakery\",\n grades: [\n { date : new Date(1393804800000), grade : \"C\", score : 15 },\n { date : new Date(1378857600000), grade : \"C\", score : 16 },\n { date : new Date(1358985600000), grade : MinKey(), score : 30 },\n { date : new Date(1322006400000), grade : \"C\", score : 15 }\n ],\n name : \"Dan's Donuts\",\n restaurant_id : \"30075445\"\n} )" + "sha256" : "ad2fbd24776a00fe6316b69abb84debc80b4e11c2eebe409d66394ca78c3b9fa", + "text" : "db.restaurants.find(\n { \"grades.grade\" : { $type : \"minKey\" } }\n)\n" }, { - "role" : "DATA", - "sha256" : "2bf71f23fe95a0f1696bed1ff512c11fb9894bf170869909860e33314e76bd8a", - "text" : "db.restaurants.insertOne( {\n _id : 2,\n address : {\n building : \"1166\",\n coord : [ -73.955184, 40.738589 ],\n street : \"Manhattan Ave\",\n zipcode : \"11222\"\n },\n borough: \"Brooklyn\",\n cuisine: \"Bakery\",\n grades: [\n { date : new Date(1393804800000), grade : MaxKey(), score : 2 },\n { date : new Date(1378857600000), grade : \"B\", score : 6 },\n { date : new Date(1358985600000), grade : MaxKey(), score : 3 },\n { date : new Date(1322006400000), grade : \"B\", score : 5 }\n ],\n name : \"Dainty Daisey's Donuts\",\n restaurant_id : \"30075449\"\n} )" + "role" : "EXPECTED", + "sha256" : "98bf556e31a95904a6fa3ac4fadb99699fdcfd42c5d97449aa194c68fe38254d", + "text" : "[\n {\n _id: 1,\n address: {\n building: '230',\n coord: [\n -73.996089,\n 40.675018\n ],\n street: 'Huntington St',\n zipcode: '11231'\n },\n borough: 'Brooklyn',\n cuisine: 'Bakery',\n grades: [\n {\n date: ISODate('2014-03-03T00:00:00.000Z'),\n grade: 'C',\n score: 15\n },\n {\n date: ISODate('2013-09-11T00:00:00.000Z'),\n grade: 'C',\n score: 16\n },\n {\n date: ISODate('2013-01-24T00:00:00.000Z'),\n grade: MinKey(),\n score: 30\n },\n {\n date: ISODate('2011-11-23T00:00:00.000Z'),\n grade: 'C',\n score: 15\n }\n ],\n name: ...,\n restaurant_id: '30075445'\n }\n]\n" + } ], + "detail" : "UNSUPPORTED_SHARED_SETUP", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "queryingByMinKeyAndMaxKey", + "title" : "Querying by MinKey and MaxKey" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "dc2adb0f41361b9315cb7d4d20e54a093742970c6773f5153720ed75350b1e26", + "text" : "db.restaurants.find(\n { \"grades.grade\" : { $type : \"maxKey\" } }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "1d1fe3bcba1ab5044371c00372035e1fe5a1b51f0371e807c8498d7e0b6cb41f", - "text" : "[\n {\n _id: 1,\n address: {\n building: '230',\n coord: [\n -73.996089,\n 40.675018\n ],\n street: 'Huntington St',\n zipcode: '11231'\n },\n borough: 'Brooklyn',\n cuisine: 'Bakery',\n grades: [\n {\n date: ISODate('2014-03-03T00:00:00.000Z'),\n grade: 'C',\n score: 15\n },\n {\n date: ISODate('2013-09-11T00:00:00.000Z'),\n grade: 'C',\n score: 16\n },\n {\n date: ISODate('2013-01-24T00:00:00.000Z'),\n grade: MinKey(),\n score: 30\n },\n {\n date: ISODate('2011-11-23T00:00:00.000Z'),\n grade: 'C',\n score: 15\n }\n ],\n name: ...,\n restaurant_id: '30075445'\n }\n]" + "sha256" : "6a6d45f53683177004af2aedac30f06aaadf0bfcf9389eebd689e2b4bcb3662a", + "text" : "[\n {\n _id: 2,\n address: {\n building: '1166',\n coord: [\n -73.955184,\n 40.738589\n ],\n street: 'Manhattan Ave',\n zipcode: '11222'\n },\n borough: 'Brooklyn',\n cuisine: 'Bakery',\n grades: [\n {\n date: ISODate('2014-03-03T00:00:00.000Z'),\n grade: MaxKey(),\n score: 2\n },\n {\n date: ISODate('2013-09-11T00:00:00.000Z'),\n grade: 'B',\n score: 6\n },\n {\n date: ISODate('2013-01-24T00:00:00.000Z'),\n grade: MaxKey(),\n score: 3\n },\n {\n date: ISODate('2011-11-23T00:00:00.000Z'),\n grade: 'B',\n score: 5\n }\n ],\n name: ...,\n restaurant_id: '30075449'\n }\n]\n" } ], - "detail" : null, + "detail" : "UNSUPPORTED_SHARED_SETUP", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "queryingByMinKeyAndMaxKey", "title" : "Querying by MinKey and MaxKey" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" + "blob" : "f513a12bd52fc5d90da9a3ad93be77cb4d9e130c", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-data-find-maxkey-output.sh" }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "c0b3609cf0eecbf3674d36e3a8fa0a5730000702", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-data-find-maxkey.snippet.type-data-find-maxkey.js" }, { - "blob" : "f5954c8a9f9742f2547ae2d6ab23c9bc07e70c5e", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-data-setup.snippet.type-data-setup.js" + "blob" : "c45d9b77de58a4ecfa9d653bc00c4edc640de963", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-data-find-minkey-output.sh" }, { "blob" : "bf4c156f7720af3535388268c188092c986b7536", "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-data-find-minkey.snippet.type-data-find-minkey.js" }, { - "blob" : "c45d9b77de58a4ecfa9d653bc00c4edc640de963", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-data-find-minkey-output.sh" - }, { - "blob" : "c0b3609cf0eecbf3674d36e3a8fa0a5730000702", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-data-find-maxkey.snippet.type-data-find-maxkey.js" + "blob" : "f5954c8a9f9742f2547ae2d6ab23c9bc07e70c5e", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-data-setup.snippet.type-data-setup.js" }, { - "blob" : "f513a12bd52fc5d90da9a3ad93be77cb4d9e130c", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-data-find-maxkey-output.sh" + "blob" : "fbdec22217adfb492928a1b767b49827a1bef44f", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-array-output.sh" }, { - "blob" : "af4c520956929887554452aa2ec63ca6b17d24d8", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-imdb-string.snippet.type-query-imdb-string-numeric.js" + "blob" : "9a1c384fb58ae011a482fdefe8a32f696d603f0b", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-array.snippet.type-query-array.js" }, { "blob" : "aeb5929060c96154322dcdcb559bd25c187865d1", "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-imdb-string-output.sh" @@ -12522,14 +12153,8 @@ "blob" : "cd0729519228b981654978d8bca77d69af1f4892", "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-imdb-string.snippet.type-query-imdb-string-alias.js" }, { - "blob" : "94a30eaf0a802d0e16e0058266a848223e43e174", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-number-alias.snippet.type-query-number-alias.js" - }, { - "blob" : "c52b15da53caa44f4e296ed44fa4454f7c65679c", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-number-alias-output.sh" - }, { - "blob" : "f61b3e1de563c67041c9bd657d0ca0a338e4d1c5", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-multiple-types.snippet.type-query-multiple-types-numeric.js" + "blob" : "af4c520956929887554452aa2ec63ca6b17d24d8", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-imdb-string.snippet.type-query-imdb-string-numeric.js" }, { "blob" : "c52b15da53caa44f4e296ed44fa4454f7c65679c", "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-multiple-types-output.sh" @@ -12537,29 +12162,32 @@ "blob" : "fbc4f8b1b49480a428b0a6348d214f3f68aaf5c0", "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-multiple-types.snippet.type-query-multiple-types-alias.js" }, { - "blob" : "9a1c384fb58ae011a482fdefe8a32f696d603f0b", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-array.snippet.type-query-array.js" + "blob" : "f61b3e1de563c67041c9bd657d0ca0a338e4d1c5", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-multiple-types.snippet.type-query-multiple-types-numeric.js" }, { - "blob" : "fbdec22217adfb492928a1b767b49827a1bef44f", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-array-output.sh" + "blob" : "c52b15da53caa44f4e296ed44fa4454f7c65679c", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-number-alias-output.sh" }, { - "blob" : "3152ce33def5cc3b004014588547cfa902f32c07", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-restaurants-setup.snippet.type-restaurants-insert-minkey.js" + "blob" : "94a30eaf0a802d0e16e0058266a848223e43e174", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-query-number-alias.snippet.type-query-number-alias.js" }, { - "blob" : "c68aaad1b549a31f9ec67a1127523c2b5d278d5d", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-restaurants-setup.snippet.type-restaurants-insert-maxkey.js" + "blob" : "5a5dd5a50914c01af0b1396c64d3b98fc3a144ab", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-restaurants-find-maxkey-output.sh" }, { - "blob" : "b19d2ee6d25626e87557a07a8f22f842b4649526", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-restaurants-find-minkey.snippet.type-restaurants-find-minkey.js" + "blob" : "276f572981a158ea2bfdaf9b3eb8d0c51fa5f67c", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-restaurants-find-maxkey.snippet.type-restaurants-find-maxkey.js" }, { "blob" : "0b6444202780ffd7c0d09fcd615753ade6ce5414", "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-restaurants-find-minkey-output.sh" }, { - "blob" : "276f572981a158ea2bfdaf9b3eb8d0c51fa5f67c", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-restaurants-find-maxkey.snippet.type-restaurants-find-maxkey.js" + "blob" : "b19d2ee6d25626e87557a07a8f22f842b4649526", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-restaurants-find-minkey.snippet.type-restaurants-find-minkey.js" }, { - "blob" : "5a5dd5a50914c01af0b1396c64d3b98fc3a144ab", - "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-restaurants-find-maxkey-output.sh" + "blob" : "c68aaad1b549a31f9ec67a1127523c2b5d278d5d", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-restaurants-setup.snippet.type-restaurants-insert-maxkey.js" + }, { + "blob" : "3152ce33def5cc3b004014588547cfa902f32c07", + "path" : "content/code-examples/tested/command-line/mongosh/operators/type/type-restaurants-setup.snippet.type-restaurants-insert-minkey.js" } ], "operator" : "type", "pageBlob" : "5e1ef813ce1eaebe5960bb664c50bdc7000b8a94", @@ -12571,45 +12199,14 @@ }, { "context" : "query/filters", "examples" : [ { - "blocks" : [ { - "role" : "ACTION", - "sha256" : "1ffbada99df79d71a262d2349b6dbafe8af883829c09db0b5eafe2651a6a1be4", - "text" : "db.players.find( { $where: function() { \n return (hex_md5(this.name) == \"9b53e667f30cd329dca1ec9e6a83e994\") \n} } );" - }, { - "role" : "DATA", - "sha256" : "8e4313a5735f8f5467c1dae49637854f3ebb2d1140238836b349a78892ae9ce6", - "text" : "db.players.insertMany([\n { _id: 12378, name: \"Steve\", username: \"steveisawesome\", first_login: \"2017-01-01\" },\n { _id: 2, name: \"Anya\", username: \"anya\", first_login: \"2001-02-02\" }\n])" - }, { - "role" : "EXPECTED", - "sha256" : "e8a3db447df362f98f158fd7bb05378bb80cbe21b60ea364a91d09a2860321a7", - "text" : "{\n \"_id\" : 2,\n \"name\" : \"Anya\",\n \"username\" : \"anya\",\n \"first_login\" : \"2001-02-02\"\n}" - } ], - "detail" : null, - "name" : "Match with a JavaScript Function", + "blocks" : [ ], + "detail" : "MISSING_COMMAND_OR_RESULT", "owner" : null, - "status" : "UNOWNED", - "stem" : "matchWithAJavaScriptFunction", + "status" : "UNSUPPORTED", + "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "44aef823199e73de2c2502d20f56e57fc744a77a", - "path" : "content/manual/manual/source/includes/fact-group-map-reduce-where-limitations-in-24.rst" - }, { - "blob" : "d8a337e97df48c367aa29183604d96eb1da16b38", - "path" : "content/manual/manual/source/includes/fact-6.0-js-engine-change.rst" - } ], + "includes" : [ ], "operator" : "where", "pageBlob" : "18e429706c68d279b16c26c1aac3f0608f819d52", "source" : { @@ -12621,13 +12218,13 @@ "context" : "query/updates", "examples" : [ { "blocks" : [ { + "role" : "DATA", + "sha256" : "da12c074ea48564a089ea6afef442af08b8ee14003301f4b8465a3f10e129bc1", + "text" : "db.inventory.insertOne(\n { _id: 1, item: \"polarizing_filter\", tags: [ \"electronics\", \"camera\" ] }\n)" + }, { "role" : "ACTION", "sha256" : "9c0c936b7af6fa37b4812fa21ace6217f85be69ac0c4e6df0ae206bc347343fe", "text" : "db.inventory.updateOne(\n { _id: 1 },\n { $addToSet: { tags: \"accessories\" } }\n)" - }, { - "role" : "DATA", - "sha256" : "3ac7143899fcf61ffe2e4f5fba2199a029ee42bf04d50713472d9c1459f6641f", - "text" : "db.inventory.insertOne( \n { _id: 1, item: \"polarizing_filter\", tags: [ \"electronics\", \"camera\" ] }\n)" } ], "detail" : null, "owner" : null, @@ -12636,13 +12233,13 @@ "title" : "Add to Array" }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "da12c074ea48564a089ea6afef442af08b8ee14003301f4b8465a3f10e129bc1", + "text" : "db.inventory.insertOne(\n { _id: 1, item: \"polarizing_filter\", tags: [ \"electronics\", \"camera\" ] }\n)" + }, { "role" : "ACTION", "sha256" : "4397516cf6fb83be37281479bb9f3981c7112eaece10c5ed2c4e1177b4a47da4", "text" : "db.inventory.updateOne(\n { _id: 1 },\n { $addToSet: { tags: \"camera\" } }\n)" - }, { - "role" : "DATA", - "sha256" : "3ac7143899fcf61ffe2e4f5fba2199a029ee42bf04d50713472d9c1459f6641f", - "text" : "db.inventory.insertOne( \n { _id: 1, item: \"polarizing_filter\", tags: [ \"electronics\", \"camera\" ] }\n)" } ], "detail" : null, "owner" : null, @@ -12651,40 +12248,13 @@ "title" : "Value Already Exists" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/updates/addToSet/eachModifier", "status" : "OWNED", "stem" : null, - "title" : "``$each`` Modifier" - } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" - }, { - "blob" : "5cbcd9b3e4e360b08e5e059f06184295aa16ecfe", - "path" : "content/manual/manual/source/includes/example-addToSet-each.rst" + "title" : "$each Modifier" } ], + "includes" : [ ], "operator" : "addToSet", "pageBlob" : "dffd39512ede482557a9737d44b68a2291400ae7", "source" : { @@ -12696,17 +12266,13 @@ "context" : "query/updates", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "742d403cedf65b2e5ebead02de1c3de12056cbdc436361c1080e1a270446e5d1", - "text" : "db.switches.updateOne(\n { _id: 1 },\n { $bit: { expdata: { and: Int32( 10 ) } } }\n)" - }, { "role" : "DATA", "sha256" : "ca5d139a93f135f8a8520c5b014c8272060825a4cc8d852e4f64b8fd6f64a5aa", "text" : "db.switches.insertMany( [\n { _id: 1, expdata: Int32(13) },\n { _id: 2, expdata: Int32(3) },\n { _id: 3, expdata: Int32(1) }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "d04c279baf2d2ca578d10053bd0a1c95c95ac19e800f9ba076a8ad1fa839f4a0", - "text" : "1101 // expdata\n1010 // Int32(10)\n----\n1000" + "role" : "ACTION", + "sha256" : "742d403cedf65b2e5ebead02de1c3de12056cbdc436361c1080e1a270446e5d1", + "text" : "db.switches.updateOne(\n { _id: 1 },\n { $bit: { expdata: { and: Int32( 10 ) } } }\n)" } ], "detail" : null, "owner" : null, @@ -12715,17 +12281,13 @@ "title" : "Bitwise AND" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "1dd46a9a601e56ba5352fb6d77499dd4d7fbbc1f46a0b36f5eaa063c4f7262b7", - "text" : "db.switches.updateOne(\n { _id: 2 },\n { $bit: { expdata: { or: Int32( 5 ) } } }\n)" - }, { "role" : "DATA", "sha256" : "ca5d139a93f135f8a8520c5b014c8272060825a4cc8d852e4f64b8fd6f64a5aa", "text" : "db.switches.insertMany( [\n { _id: 1, expdata: Int32(13) },\n { _id: 2, expdata: Int32(3) },\n { _id: 3, expdata: Int32(1) }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "adad7fc9eaf2588b98dd3d95a13da64e74b5e829a0b971b81c4b1ab0fd8d3440", - "text" : "0111 // expdata\n0101 // Int32(5)\n----\n0111" + "role" : "ACTION", + "sha256" : "1dd46a9a601e56ba5352fb6d77499dd4d7fbbc1f46a0b36f5eaa063c4f7262b7", + "text" : "db.switches.updateOne(\n { _id: 2 },\n { $bit: { expdata: { or: Int32( 5 ) } } }\n)" } ], "detail" : null, "owner" : null, @@ -12734,17 +12296,13 @@ "title" : "Bitwise OR" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "6b91a87465189afc7fd1bc176f58c2e947b2beb258bafd487eb94b833e23e7f1", - "text" : "db.switches.updateOne(\n { _id: 3 },\n { $bit: { expdata: { xor: Int32( 5 ) } } }\n)" - }, { "role" : "DATA", "sha256" : "ca5d139a93f135f8a8520c5b014c8272060825a4cc8d852e4f64b8fd6f64a5aa", "text" : "db.switches.insertMany( [\n { _id: 1, expdata: Int32(13) },\n { _id: 2, expdata: Int32(3) },\n { _id: 3, expdata: Int32(1) }\n] )" }, { - "role" : "EXPECTED", - "sha256" : "a900e17df7ac7c82b5a8bba74e4e9eb24ae41f54ca4d8dc52cc3a00579341420", - "text" : "0001 // expdata\n0101 // Int32(5)\n----\n0100" + "role" : "ACTION", + "sha256" : "6b91a87465189afc7fd1bc176f58c2e947b2beb258bafd487eb94b833e23e7f1", + "text" : "db.switches.updateOne(\n { _id: 3 },\n { $bit: { expdata: { xor: Int32( 5 ) } } }\n)" } ], "detail" : null, "owner" : null, @@ -12752,22 +12310,7 @@ "stem" : "bitwiseXor", "title" : "Bitwise XOR" } ], - "includes" : [ { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "01be6b132c2103c198b13c9eed278cc6e6b80f31", - "path" : "content/manual/manual/source/includes/fact-mongosh-integer-long-constructors.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - } ], + "includes" : [ ], "operator" : "bit", "pageBlob" : "8cf8522ce2030420f3b272e6316ab52863437435", "source" : { @@ -12778,60 +12321,41 @@ }, { "context" : "query/updates", "examples" : [ { - "blocks" : [ ], - "detail" : null, - "owner" : "query/updates/currentDate/currentDateUpdateOperator", - "status" : "OWNED", - "stem" : null, - "title" : "main" - }, { "blocks" : [ { + "role" : "DATA", + "sha256" : "52e44d3866738eb41ce921b867a3cc2506640124d3375616926c79dbf9c0a4d0", + "text" : "db.customers.insertOne(\n { _id: 1, status: \"a\", lastModified: ISODate(\"2013-10-02T01:11:18.965Z\") }\n)" + }, { "role" : "ACTION", "sha256" : "218f2759e7c5ef1b81bfab1836e388a9dfa592278a1db738f18cc4ba431de5fa", "text" : "db.customers.updateOne(\n { _id: 1 },\n [\n { $set: { lastModified: \"$$NOW\", cancellation: {date: \"$$CLUSTER_TIME\", reason: \"user request\"}, status: \"D\" } }\n ]\n)" - }, { + } ], + "detail" : null, + "owner" : null, + "status" : "UNOWNED", + "stem" : "aggregationAlternativeToCurrentDate", + "title" : "Aggregation Alternative to $currentDate" + }, { + "blocks" : [ { "role" : "DATA", - "sha256" : "dca8c0cc03b387893eee12f4ac0cc5421e9604b068352978e4c0d1bbffcec234", - "text" : "db.customers.insertOne( \n { _id: 1, status: \"a\", lastModified: ISODate(\"2013-10-02T01:11:18.965Z\") }\n)" + "sha256" : "52e44d3866738eb41ce921b867a3cc2506640124d3375616926c79dbf9c0a4d0", + "text" : "db.customers.insertOne(\n { _id: 1, status: \"a\", lastModified: ISODate(\"2013-10-02T01:11:18.965Z\") }\n)" + }, { + "role" : "ACTION", + "sha256" : "115318d98733c31505a7ee115610a8e108749542a85f3972e2e2c52f6fc59ddb", + "text" : "db.customers.find().pretty()" }, { "role" : "EXPECTED", "sha256" : "4506118e7b1dd3c633a7a37cf939b43cc45a606572a8523ee33c4d5e814e7212", "text" : "{\n \"_id\" : 1,\n \"status\" : \"D\",\n \"lastModified\" : ISODate(\"2020-01-22T21:02:18.994Z\"),\n \"cancellation\" : {\n \"date\" : Timestamp(1579726934, 2),\n \"reason\" : \"user request\"\n }\n}" } ], - "detail" : null, + "detail" : "AFTER_EARLIER_WRITE", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "aggregationAlternativeToCurrentDate", - "title" : "Aggregation Alternative to ``$currentDate``" - } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "de8b443992b12aaff42f25cc845c99ea3f8fe69c", - "path" : "content/manual/manual/source/includes/update-current-date.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" + "title" : "Aggregation Alternative to $currentDate" } ], + "includes" : [ ], "operator" : "currentDate", "pageBlob" : "747dc769a3a62dcf22eba510ac3e2cc94a5127f8", "source" : { @@ -12851,16 +12375,16 @@ "owner" : null, "status" : "UNOWNED", "stem" : "useEachWithPushOperator", - "title" : "Use ``$each`` with ``$push`` Operator" + "title" : "Use $each with $push Operator" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "745740405d9e99d1588cefbd142d35129496b53ce273519162355708abfecbdd", - "text" : "db.inventory.updateOne(\n { _id: 2 },\n { $addToSet: { tags: { $each: [ \"camera\", \"electronics\", \"accessories\" ] } } }\n )" - }, { "role" : "DATA", "sha256" : "83911122f4751fcd4ff6819d8d1e02e27f66e66d71d463f06d6c4805230ca521", "text" : "db.inventory.insertOne (\n { _id: 2, item: \"cable\", tags: [ \"electronics\", \"supplies\" ] }\n)" + }, { + "role" : "ACTION", + "sha256" : "745740405d9e99d1588cefbd142d35129496b53ce273519162355708abfecbdd", + "text" : "db.inventory.updateOne(\n { _id: 2 },\n { $addToSet: { tags: { $each: [ \"camera\", \"electronics\", \"accessories\" ] } } }\n )" }, { "role" : "EXPECTED", "sha256" : "994a44f93290cc244b21215f5985f360f5861dc0ae3dfe3bb83dbb5b9824af1b", @@ -12870,18 +12394,9 @@ "owner" : null, "status" : "UNOWNED", "stem" : "useEachWithAddToSetOperator", - "title" : "Use ``$each`` with ``$addToSet`` Operator" - } ], - "includes" : [ { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "5aaa337eef75caea1bcc01ed5bc3b4ddb5687c83", - "path" : "content/manual/manual/source/includes/example-push-each.rst" - }, { - "blob" : "5cbcd9b3e4e360b08e5e059f06184295aa16ecfe", - "path" : "content/manual/manual/source/includes/example-addToSet-each.rst" + "title" : "Use $each with $addToSet Operator" } ], + "includes" : [ ], "operator" : "each", "pageBlob" : "e2851e9447803390d3d0b55305339dffd4b4e1ea", "source" : { @@ -12899,31 +12414,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" - } ], + "includes" : [ ], "operator" : "inc", "pageBlob" : "bb3638a2f728bda767a3ed32efd32bd3049307d0", "source" : { @@ -12935,32 +12426,39 @@ "context" : "query/updates", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/updates/max/useMaxToCompareNumbers", "status" : "OWNED", "stem" : null, - "title" : "Use ``$max`` to Compare Numbers" + "title" : "Use $max to Compare Numbers" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "b263f32930312ef931a86cbfa85b24e8d9485d4533cf4dcc9d46a51883f89c6b", + "text" : "db.scores.insertOne( { _id: 1, highScore: 800, lowScore: 200 } )" + }, { + "role" : "ACTION", + "sha256" : "0c7b37132b9dac64b84d81d732302588ebf944d37a22203646403acfd04e2a2d", + "text" : "db.scores.updateOne( { _id: 1 }, { $max: { highScore: 870 } } )" + }, { + "role" : "EXPECTED", + "sha256" : "ecf0420fc2322b3d2a08bed1718cc864e7ca4096c248359f3c67434106aa1f0d", + "text" : "{ _id: 1, highScore: 950, lowScore: 200 }" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "useMaxToCompareNumbers", + "title" : "Use $max to Compare Numbers" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/updates/max/useMaxToCompareDates", "status" : "OWNED", "stem" : null, - "title" : "Use ``$max`` to Compare Dates" - } ], - "includes" : [ { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" + "title" : "Use $max to Compare Dates" } ], + "includes" : [ ], "operator" : "max", "pageBlob" : "3aaa596386d8fb48e5924116e7dd40a9a3c9fd49", "source" : { @@ -12972,32 +12470,39 @@ "context" : "query/updates", "examples" : [ { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/updates/min/useMinToCompareNumbers", "status" : "OWNED", "stem" : null, - "title" : "Use ``$min`` to Compare Numbers" + "title" : "Use $min to Compare Numbers" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "b263f32930312ef931a86cbfa85b24e8d9485d4533cf4dcc9d46a51883f89c6b", + "text" : "db.scores.insertOne( { _id: 1, highScore: 800, lowScore: 200 } )" + }, { + "role" : "ACTION", + "sha256" : "ce861ed7b4823cbf4a45848c3ea4fcd14bae44a2fdd2f03c61030eb08ccd74b4", + "text" : "db.scores.updateOne( { _id: 1 }, { $min: { lowScore: 250 } } )" + }, { + "role" : "EXPECTED", + "sha256" : "5e939616b88738336eaa205732ac20808c5eb99380f821904fddd3384d2476e3", + "text" : "{ _id: 1, highScore: 800, lowScore: 150 }" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "useMinToCompareNumbers", + "title" : "Use $min to Compare Numbers" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/updates/min/useMinToCompareDates", "status" : "OWNED", "stem" : null, - "title" : "Use ``$min`` to Compare Dates" - } ], - "includes" : [ { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" + "title" : "Use $min to Compare Dates" } ], + "includes" : [ ], "operator" : "min", "pageBlob" : "5fdc43a9da3018e0d5604c7cf711ca7bf19d80df", "source" : { @@ -13009,13 +12514,13 @@ "context" : "query/updates", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "57595dc3d673b91c29fc5d4e7aabe6ee82990b4f63653d5ed9b0b7d746c1e654", - "text" : "db.products.updateOne(\n { _id: 1 },\n { $mul: \n {\n price: Decimal128( \"1.25\" ),\n quantity: 2\n }\n }\n)" - }, { "role" : "DATA", "sha256" : "54156ab7c2aa98b9c74e416f653547b5267e2fc8ccf3d379c85293b026932c06", "text" : "db.products.insertOne(\n { \"_id\" : 1, \"item\" : \"Hats\", \"price\" : Decimal128(\"10.99\"), \"quantity\" : 25 }\n)" + }, { + "role" : "ACTION", + "sha256" : "3ac768bf65046522c280a3745c5e8eceb98557db91d8b0826a3b3495bbeca5c7", + "text" : "db.products.updateOne(\n { _id: 1 },\n { $mul:\n {\n price: Decimal128( \"1.25\" ),\n quantity: 2\n }\n }\n)" }, { "role" : "EXPECTED", "sha256" : "e380aa3e71ecb61d26cf0b26d4b87ebcb449761157907c3a6744a69129da2330", @@ -13028,13 +12533,13 @@ "title" : "Multiply the Value of a Field" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "2e2fd11b5340fd9313e2ca9bf2cdf06d853341a8abbeb086208bab30d6ef4b52", - "text" : "db.products.updateOne(\n { _id: 2 },\n { $mul: { price: Decimal128(\"100\") } }\n)" - }, { "role" : "DATA", "sha256" : "248f0cd05f5982144d9ab02bb846dea14b3453021f287045fbe91477d960790d", "text" : "db.products.insertOne( { _id: 2, item: \"Unknown\" } )" + }, { + "role" : "ACTION", + "sha256" : "2e2fd11b5340fd9313e2ca9bf2cdf06d853341a8abbeb086208bab30d6ef4b52", + "text" : "db.products.updateOne(\n { _id: 2 },\n { $mul: { price: Decimal128(\"100\") } }\n)" }, { "role" : "EXPECTED", "sha256" : "02e4f49c29118323bb0fb52c3d96facd4478dd14fa9c44409f37101a5b642a16", @@ -13044,7 +12549,7 @@ "owner" : null, "status" : "UNOWNED", "stem" : "applyMulOperatorToANonExistingField", - "title" : "Apply ``$mul`` Operator to a Non-existing Field" + "title" : "Apply $mul Operator to a Non-existing Field" }, { "blocks" : [ ], "detail" : null, @@ -13053,19 +12558,7 @@ "stem" : null, "title" : "Multiply Mixed Numeric Types" } ], - "includes" : [ { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - } ], + "includes" : [ ], "operator" : "mul", "pageBlob" : "ae5956964fcbbe75aa1505908f247ec46fb0d8d6", "source" : { @@ -13090,19 +12583,7 @@ "stem" : null, "title" : "Remove the Last Item of an Array" } ], - "includes" : [ { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" - } ], + "includes" : [ ], "operator" : "pop", "pageBlob" : "d98c0cd229d7c389205ee20e044fb40e12fb6128", "source" : { @@ -13134,10 +12615,7 @@ "stem" : null, "title" : "Use a Negative Array Index (Position) to Add Elements to the Array" } ], - "includes" : [ { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - } ], + "includes" : [ ], "operator" : "position", "pageBlob" : "aaec6658fb52be7f028053868111c4370f5c4492", "source" : { @@ -13157,20 +12635,16 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "0e72e4b4b1e41fca5c693a10c67c1472a109ca39c71cd3808e01f285b1eec058", - "text" : "db.collection.updateOne(\n { },\n { : { \"array.$.field\" : value } }\n)" - }, { - "role" : "DATA", - "sha256" : "a3ff0162cf8d31436bd9b71e0baff5e3d6ecde3817436715022d9b0d37218f4a", - "text" : "db.students.insertMany( [\n { \"_id\" : 1, \"grades\" : [ 85, 80, 80 ] },\n { \"_id\" : 2, \"grades\" : [ 88, 90, 92 ] },\n { \"_id\" : 3, \"grades\" : [ 85, 100, 90 ] }\n] )" + "sha256" : "ef48065db8cea750320f633da2ab133bfd319217dc5f60b29ea55798af5e1068", + "text" : "db.students.updateOne(\n { _id: 4, \"grades.grade\": 85 },\n { $set: { \"grades.$.std\" : 6 } }\n)" }, { "role" : "EXPECTED", - "sha256" : "ceeb887d63f32b03e4bf3084b4c35f5c94526315765912fe2e0af42d5becb556", - "text" : "{ \n \"_id\" : 4,\n \"grades\" : [\n { \"grade\" : 80, \"mean\" : 75, \"std\" : 8 },\n { \"grade\" : 85, \"mean\" : 90, \"std\" : 6 },\n { \"grade\" : 85, \"mean\" : 85, \"std\" : 8 }\n ]\n}" + "sha256" : "dc05295ed53e244520fb65fa0e22abfdd5a639ac485520f15c5e372170faa50b", + "text" : "{\n \"_id\" : 4,\n \"grades\" : [\n { \"grade\" : 80, \"mean\" : 75, \"std\" : 8 },\n { \"grade\" : 85, \"mean\" : 90, \"std\" : 6 },\n { \"grade\" : 85, \"mean\" : 85, \"std\" : 8 }\n ]\n}" } ], - "detail" : null, + "detail" : "UNSUPPORTED_SETUP", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "updateDocumentsInAnArray", "title" : "Update Documents in an Array" }, { @@ -13187,23 +12661,27 @@ "status" : "OWNED", "stem" : null, "title" : "Update with Multiple Array Matches" - } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" + "blocks" : [ { + "role" : "DATA", + "sha256" : "093b214c82198a5913eed1a1aceeb8c9ca5eeed76b6c8d55230c7f7eb55f0b47", + "text" : "db.students_deans_list.insertMany( [\n {\n _id: 8,\n activity_ids: [ 1, 2 ],\n grades: [ 90, 95 ],\n deans_list: [ 2021, 2020 ]\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "a49e711e1e1887ef0aece764b95e4697555c7c7b8ef611cb166ddf80c03ce4de", + "text" : "db.students_deans_list.find( { _id: 8 } )" + }, { + "role" : "EXPECTED", + "sha256" : "c80922427104033dfb7c8a0d2280f14971504d881a73f60efee816da9a947bff", + "text" : "{\n _id: 8,\n activity_ids: [ 1, 2 ],\n grades: [ 90, 95 ],\n deans_list: [ 2021, 2022 ]\n}" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "updateWithMultipleArrayMatches", + "title" : "Update with Multiple Array Matches" } ], + "includes" : [ ], "operator" : "positional", "pageBlob" : "9a00a37d76d5f421e23d1eeb63715ccd071e543b", "source" : { @@ -13215,13 +12693,13 @@ "context" : "query/updates", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "effd38e41d8a17021073c8d060577fd5204dd652aad932d49b505f209bc41263", - "text" : "db.students.updateMany(\n { },\n { $inc: { \"grades.$[]\": 10 } },\n)" - }, { "role" : "DATA", "sha256" : "1b06bfe4057afd47d13cd857f1f4375eadc938019caf090c46e856a1bc30e30b", "text" : "db.students.insertMany( [\n { \"_id\" : 1, \"grades\" : [ 85, 82, 80 ] },\n { \"_id\" : 2, \"grades\" : [ 88, 90, 92 ] },\n { \"_id\" : 3, \"grades\" : [ 85, 100, 90 ] }\n] )" + }, { + "role" : "ACTION", + "sha256" : "effd38e41d8a17021073c8d060577fd5204dd652aad932d49b505f209bc41263", + "text" : "db.students.updateMany(\n { },\n { $inc: { \"grades.$[]\": 10 } },\n)" }, { "role" : "EXPECTED", "sha256" : "05e32beff74b2dafaa54f59726d644124cdf40e5f2b01dc46729985c9783bd97", @@ -13234,13 +12712,13 @@ "title" : "Update All Elements in an Array" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "5c883c0ee1edb8535b50287dbdea982c14c10efe8cc2324d337550e2d5d688cf", - "text" : "db.collection.updateOne(\n { },\n { : { \"array.$[].field\" : value } }\n)" - }, { "role" : "DATA", - "sha256" : "1b06bfe4057afd47d13cd857f1f4375eadc938019caf090c46e856a1bc30e30b", - "text" : "db.students.insertMany( [\n { \"_id\" : 1, \"grades\" : [ 85, 82, 80 ] },\n { \"_id\" : 2, \"grades\" : [ 88, 90, 92 ] },\n { \"_id\" : 3, \"grades\" : [ 85, 100, 90 ] }\n] )" + "sha256" : "e94c9208a2c231abb1ca3b1634c640110378a042afe8a3e962609cb92450e743", + "text" : "db.students2.insertMany( [\n {\n \"_id\" : 1,\n \"grades\" : [\n { \"grade\" : 80, \"mean\" : 75, \"std\" : 8 },\n { \"grade\" : 85, \"mean\" : 90, \"std\" : 6 },\n { \"grade\" : 85, \"mean\" : 85, \"std\" : 8 }\n ]\n },\n {\n \"_id\" : 2,\n \"grades\" : [\n { \"grade\" : 90, \"mean\" : 75, \"std\" : 8 },\n { \"grade\" : 87, \"mean\" : 90, \"std\" : 5 },\n { \"grade\" : 85, \"mean\" : 85, \"std\" : 6 }\n ]\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "a35faa4ed76d7fb20bbf98525c4052a49fa9325cdc0f52629f7baefdd05f7ccd", + "text" : "db.students2.updateMany(\n { },\n { $inc: { \"grades.$[].std\" : -2 } },\n)" }, { "role" : "EXPECTED", "sha256" : "f5950f66f0766e5bcab888ba6b1ea94ef929c3d747d7b5ed7f104babcd80f8fc", @@ -13253,13 +12731,13 @@ "title" : "Update All Documents in an Array" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "f659113c202fba4c8f763255fb9419b68466580ce09f8d56e8c10d4c9d27d1aa", - "text" : "db.results.updateMany(\n { \"grades\" : { $ne: 100 } },\n { $inc: { \"grades.$[]\": 10 } },\n)" - }, { "role" : "DATA", "sha256" : "03a1dde51dad891328385ad282bbea0aff4421bcfa65060d465d8afdde1c35b2", "text" : "db.results.insertMany( [\n { \"_id\" : 1, \"grades\" : [ 85, 82, 80 ] },\n { \"_id\" : 2, \"grades\" : [ 88, 90, 92 ] },\n { \"_id\" : 3, \"grades\" : [ 85, 100, 90 ] }\n] )" + }, { + "role" : "ACTION", + "sha256" : "f659113c202fba4c8f763255fb9419b68466580ce09f8d56e8c10d4c9d27d1aa", + "text" : "db.results.updateMany(\n { \"grades\" : { $ne: 100 } },\n { $inc: { \"grades.$[]\": 10 } },\n)" }, { "role" : "EXPECTED", "sha256" : "c1076684b4c9090aef7c9b0f510ad05752cc8117cb2db82f08b875e2f886d70c", @@ -13272,13 +12750,13 @@ "title" : "Update Arrays Specified Using a Negation Query Operator" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "2a40504d077818494a7ada697c3295a52a5d41855a9f1c14a01eab2ad414bf3c", - "text" : "db.students3.updateMany(\n {},\n { $inc: { \"grades.$[].questions.$[score]\": 2 } },\n { arrayFilters: [ { \"score\": { $gte: 8 } } ] } \n)" - }, { "role" : "DATA", "sha256" : "052608baaeb5cc8fd3dc76d35c8bf427bf83814295e5d0b477d0ee350c67fbdf", "text" : "db.students3.insertMany( [\n { \"_id\" : 1,\n \"grades\" : [\n { type: \"quiz\", questions: [ 10, 8, 5 ] },\n { type: \"quiz\", questions: [ 8, 9, 6 ] },\n { type: \"hw\", questions: [ 5, 4, 3 ] },\n { type: \"exam\", questions: [ 25, 10, 23, 0 ] },\n ]\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "852ba4ccbd45babf678ed8970e867b4a0c74f733537b1074d3f301fea6b43314", + "text" : "db.students3.updateMany(\n {},\n { $inc: { \"grades.$[].questions.$[score]\": 2 } },\n { arrayFilters: [ { \"score\": { $gte: 8 } } ] }\n)" }, { "role" : "EXPECTED", "sha256" : "fb16d86240d99af6d8f1643586a2b18bf36a0d438a3e29ae884442ebe10edb49", @@ -13288,12 +12766,9 @@ "owner" : null, "status" : "UNOWNED", "stem" : "updateNestedArraysInConjunctionWithIdentifier", - "title" : "Update Nested Arrays in Conjunction with ``$[]``" - } ], - "includes" : [ { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" + "title" : "Update Nested Arrays in Conjunction with $[]" } ], + "includes" : [ ], "operator" : "positional-all", "pageBlob" : "2132adf02cce83c6e597ccf578bc2990525a5c6e", "source" : { @@ -13305,13 +12780,13 @@ "context" : "query/updates", "examples" : [ { "blocks" : [ { - "role" : "ACTION", - "sha256" : "6cad9599e48f0da362047616d85f1be7266d8b55446f95fe4eaef6f408f96d76", - "text" : "db.students.updateMany(\n { },\n { $set: { \"grades.$[element]\" : 100 } },\n { arrayFilters: [ { \"element\": { $gte: 100 } } ] }\n)" - }, { "role" : "DATA", "sha256" : "10a7b74902019bf51448882655f56756508ebf8bd60420609f188b290266194f", "text" : "db.students.insertMany( [\n { \"_id\" : 1, \"grades\" : [ 95, 92, 90 ] },\n { \"_id\" : 2, \"grades\" : [ 98, 100, 102 ] },\n { \"_id\" : 3, \"grades\" : [ 95, 110, 100 ] }\n] )" + }, { + "role" : "ACTION", + "sha256" : "6cad9599e48f0da362047616d85f1be7266d8b55446f95fe4eaef6f408f96d76", + "text" : "db.students.updateMany(\n { },\n { $set: { \"grades.$[element]\" : 100 } },\n { arrayFilters: [ { \"element\": { $gte: 100 } } ] }\n)" }, { "role" : "EXPECTED", "sha256" : "892ed0c63bd7cc155976e0a4c91f7905fea26c4c32051942058cb38ea66eaf95", @@ -13321,16 +12796,16 @@ "owner" : null, "status" : "UNOWNED", "stem" : "updateAllArrayElementsThatMatchArrayFilters", - "title" : "Update All Array Elements That Match ``arrayFilters``" + "title" : "Update All Array Elements That Match arrayFilters" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "816fcf69fa9678826f7b87e8809d0a3bb72e78c1433cc57e302bf9cb3a34f3c4", - "text" : "db.collection.updateMany(\n { },\n { : { \"array.$[].field\" : value } },\n { arrayFilters: [ { : } } ] }\n)" - }, { "role" : "DATA", - "sha256" : "10a7b74902019bf51448882655f56756508ebf8bd60420609f188b290266194f", - "text" : "db.students.insertMany( [\n { \"_id\" : 1, \"grades\" : [ 95, 92, 90 ] },\n { \"_id\" : 2, \"grades\" : [ 98, 100, 102 ] },\n { \"_id\" : 3, \"grades\" : [ 95, 110, 100 ] }\n] )" + "sha256" : "03917e50399ea309ebd7793fffcf1d8b8e5317d828f3931037fe8d1855d92ce5", + "text" : "db.students2.insertMany( [\n {\n \"_id\" : 1,\n \"grades\" : [\n { \"grade\" : 80, \"mean\" : 75, \"std\" : 6 },\n { \"grade\" : 85, \"mean\" : 90, \"std\" : 4 },\n { \"grade\" : 85, \"mean\" : 85, \"std\" : 6 }\n ]\n },\n {\n \"_id\" : 2,\n \"grades\" : [\n { \"grade\" : 90, \"mean\" : 75, \"std\" : 6 },\n { \"grade\" : 87, \"mean\" : 90, \"std\" : 3 },\n { \"grade\" : 85, \"mean\" : 85, \"std\" : 4 }\n ]\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "9a59bc9354b9c16a2de119fe5418129e4dddc314d8dffa3a17b558bd3e9f6d1f", + "text" : "db.students2.updateMany(\n { },\n { $set: { \"grades.$[elem].mean\" : 100 } },\n { arrayFilters: [ { \"elem.grade\": { $gte: 85 } } ] }\n)" }, { "role" : "EXPECTED", "sha256" : "722f75688ccb89cc84edacfbbd8c0e1959f80a0aeebb1c553e0c81446bc80eef", @@ -13340,16 +12815,16 @@ "owner" : null, "status" : "UNOWNED", "stem" : "updateAllDocumentsThatMatchArrayFiltersInAnArray", - "title" : "Update All Documents That Match ``arrayFilters`` in an Array" + "title" : "Update All Documents That Match arrayFilters in an Array" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "49139416c8bd58d21d93fcca69079492dc51b6cec57a95cc1572146988e95d86", - "text" : "db.students3.updateMany(\n { },\n { $inc: { \"grades.$[elem].std\" : -1 } },\n { arrayFilters: [ { \"elem.grade\": { $gte: 80 }, \"elem.std\": { $gte: 5 } } ] }\n)" - }, { "role" : "DATA", "sha256" : "a828ab3ffa48740e5b9ee54cf2350e23f2c80b3d0adce7e161be4863622e27c0", "text" : "db.students3.insertMany( [\n {\n \"_id\" : 1,\n \"grades\" : [\n { \"grade\" : 80, \"mean\" : 75, \"std\" : 6 },\n { \"grade\" : 85, \"mean\" : 100, \"std\" : 4 },\n { \"grade\" : 85, \"mean\" : 100, \"std\" : 6 }\n ]\n },\n {\n \"_id\" : 2,\n \"grades\" : [\n { \"grade\" : 90, \"mean\" : 100, \"std\" : 6 },\n { \"grade\" : 87, \"mean\" : 100, \"std\" : 3 },\n { \"grade\" : 85, \"mean\" : 100, \"std\" : 4 }\n ]\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "49139416c8bd58d21d93fcca69079492dc51b6cec57a95cc1572146988e95d86", + "text" : "db.students3.updateMany(\n { },\n { $inc: { \"grades.$[elem].std\" : -1 } },\n { arrayFilters: [ { \"elem.grade\": { $gte: 80 }, \"elem.std\": { $gte: 5 } } ] }\n)" }, { "role" : "EXPECTED", "sha256" : "78c840b741f822e55394a924b5795fe287ef90ecca2633952a38cc243652e037", @@ -13362,17 +12837,17 @@ "title" : "Update All Array Elements that Match Multiple Conditions" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "9e4472df3f32834c855ebf7bf3506895a0c105535b12b9a032225cc835798520", - "text" : "db.alumni.updateMany(\n { },\n { $set : { \"degrees.$[degree].gradcampaign\" : 1 } },\n { arrayFilters : [ {\"degree.level\" : { $ne: \"Bachelor\" } } ] }\n)" - }, { "role" : "DATA", "sha256" : "f972a483e7d59896f24c73962c878b8e52d9c2ea93c0510dbc05ad8861636944", "text" : "db.alumni.insertMany( [\n {\n \"_id\": 1,\n \"name\": \"Christine Franklin\",\n \"degrees\": [\n { \"level\": \"Master\" },\n { \"level\": \"Bachelor\" }\n ],\n },\n {\n \"_id\": 2,\n \"name\": \"Reyansh Sengupta\",\n \"degrees\": [ { \"level\": \"Bachelor\" } ],\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "9e4472df3f32834c855ebf7bf3506895a0c105535b12b9a032225cc835798520", + "text" : "db.alumni.updateMany(\n { },\n { $set : { \"degrees.$[degree].gradcampaign\" : 1 } },\n { arrayFilters : [ {\"degree.level\" : { $ne: \"Bachelor\" } } ] }\n)" }, { "role" : "EXPECTED", - "sha256" : "88f776c1d4f9809377ce51ac39b1d3d7edd97f47130f208e0ed78bfab53b54f7", - "text" : " {\n _id: 1,\n name: 'Christine Franklin',\n degrees: [ \n { level: 'Master', gradcampaign: 1 },\n { level: 'Bachelor' }\n ]\n},\n{\n _id: 2,\n name: 'Reyansh Sengupta',\n degrees: [ { level: 'Bachelor' } ]\n}" + "sha256" : "9085725e9d601dfefef953a778c2cad024322405e33cdf3b98edac44f649bc08", + "text" : " {\n _id: 1,\n name: 'Christine Franklin',\n degrees: [\n { level: 'Master', gradcampaign: 1 },\n { level: 'Bachelor' }\n ]\n},\n{\n _id: 2,\n name: 'Reyansh Sengupta',\n degrees: [ { level: 'Bachelor' } ]\n}" } ], "detail" : null, "owner" : null, @@ -13381,13 +12856,13 @@ "title" : "Update Array Elements Using a Negation Operator" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "74ab65430f36ec746df361bb9cd283befd489bfdb816612cfc60b18182b3bff2", - "text" : "db.students4.updateMany(\n {},\n { $inc: { \"grades.$[t].questions.$[score]\": 2 } },\n { arrayFilters: [ { \"t.type\": \"quiz\" }, { \"score\": { $gte: 8 } } ] }\n)" - }, { "role" : "DATA", "sha256" : "fce81433d997aac5c3d607dca83347e8fc16ab9c8d71d9c8def7e17084006c36", "text" : "db.students4.insertOne(\n { \"_id\" : 1,\n \"grades\" : [\n { type: \"quiz\", questions: [ 10, 8, 5 ] },\n { type: \"quiz\", questions: [ 8, 9, 6 ] },\n { type: \"hw\", questions: [ 5, 4, 3 ] },\n { type: \"exam\", questions: [ 25, 10, 23, 0 ] },\n ]\n }\n)" + }, { + "role" : "ACTION", + "sha256" : "74ab65430f36ec746df361bb9cd283befd489bfdb816612cfc60b18182b3bff2", + "text" : "db.students4.updateMany(\n {},\n { $inc: { \"grades.$[t].questions.$[score]\": 2 } },\n { arrayFilters: [ { \"t.type\": \"quiz\" }, { \"score\": { $gte: 8 } } ] }\n)" }, { "role" : "EXPECTED", "sha256" : "3314c8d93aff2b49e06e6a95b7320e675014adec23ee730e22b30ab3a79baad2", @@ -13397,12 +12872,24 @@ "owner" : null, "status" : "UNOWNED", "stem" : "updateNestedArraysInConjunctionWith", - "title" : "Update Nested Arrays in Conjunction with ``$[]``" - } ], - "includes" : [ { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" + "title" : "Update Nested Arrays in Conjunction with $[]" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "fce81433d997aac5c3d607dca83347e8fc16ab9c8d71d9c8def7e17084006c36", + "text" : "db.students4.insertOne(\n { \"_id\" : 1,\n \"grades\" : [\n { type: \"quiz\", questions: [ 10, 8, 5 ] },\n { type: \"quiz\", questions: [ 8, 9, 6 ] },\n { type: \"hw\", questions: [ 5, 4, 3 ] },\n { type: \"exam\", questions: [ 25, 10, 23, 0 ] },\n ]\n }\n)" + }, { + "role" : "ACTION", + "sha256" : "54e40c618d8122c9de1e64e74b1e8b354905f91a0489a2366022f84d848ec85d", + "text" : "db.students4.updateMany(\n {},\n { $inc: { \"grades.$[].questions.$[score]\": 2 } },\n { arrayFilters: [ { \"score\": { $gte: 8 } } ] }\n)" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "updateNestedArraysInConjunctionWith", + "title" : "Update Nested Arrays in Conjunction with $[]" } ], + "includes" : [ ], "operator" : "positional-filtered", "pageBlob" : "856551f331869f4d0255fa6db0c32e0c92bd0230", "source" : { @@ -13421,30 +12908,26 @@ "title" : "Remove All Items That Equal a Specified Value" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/updates/pull/removeAllItemsThatMatchASpecifiedPullCondition", "status" : "OWNED", "stem" : null, - "title" : "Remove All Items That Match a Specified ``$pull`` Condition" + "title" : "Remove All Items That Match a Specified $pull Condition" }, { "blocks" : [ { "role" : "ACTION", "sha256" : "281520252e66ce3f674e6fd34ba4104feeef6834ce3a3ce087cd911e6b25b7f2", "text" : "db.profilesBulkWrite.find()" - }, { - "role" : "DATA", - "sha256" : "4ebbb4849408842e486ad29116ef7fe4ce2cf696586a06922ad655e2e34bc96e", - "text" : "try {\n db.profilesBulkWrite.bulkWrite( [\n {\n insertOne: {\n \"document\": { _id: 1, votes: [ 3, 5, 6, 7, 7, 8 ] }\n }\n },\n {\n updateOne: {\n \"filter\": { _id: 1 },\n \"update\": { $pull: { votes: { $gte: 6 } } }\n }\n },\n {\n updateOne: {\n \"filter\": { _id: 1 },\n \"update\": { $pull: { votes: { $lte: 3 } } }\n }\n }\n ] );\n} catch (e) {\n print(e);\n}" }, { "role" : "EXPECTED", "sha256" : "cb06fb90eed971d5a0fd6c492bae204503ed602189c3ae657a19e328dac98459", "text" : "[ { _id: 1, votes: [ 5 ] } ]" } ], - "detail" : null, + "detail" : "AFTER_EARLIER_WRITE", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "removeItemsUsingBulkWrite", - "title" : "Remove Items Using ``bulkWrite()``" + "title" : "Remove Items Using bulkWrite()" }, { "blocks" : [ ], "detail" : null, @@ -13452,51 +12935,38 @@ "status" : "OWNED", "stem" : null, "title" : "Remove Items from an Array of Documents" + }, { + "blocks" : [ { + "role" : "DATA", + "sha256" : "9beb1e751f41df92cff1a7150db3fadcc0626aa8593c0d8f2a8034c4db77c89d", + "text" : "db.survey.insertMany([\n {\n _id: 1,\n results: [\n { item: \"A\", score: 5 },\n { item: \"B\", score: 8 }\n ]\n },\n {\n _id: 2,\n results: [\n { item: \"C\", score: 8 },\n { item: \"B\", score: 4 }\n ]\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "eb3f8fd17751fd76a4a368f67a88f4f530f847e2e88d9b31086ba0a33ea789d2", + "text" : "db.survey.updateMany(\n { },\n { $pull: { results: { $elemMatch: { score: 8 , item: \"B\" } } } }\n)" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "removeItemsFromAnArrayOfDocuments", + "title" : "Remove Items from an Array of Documents" }, { "blocks" : [ { "role" : "ACTION", "sha256" : "051fc64bb46e93d64f5ede63059167fe4fd1e845a9c14a1881942f2e6a466c62", "text" : "db.survey.updateMany(\n { },\n {\n $pull:\n {\n results:\n {\n answers: { $elemMatch: { q: 2, a: { $gte: 8 } } }\n }\n }\n }\n)" - }, { - "role" : "DATA", - "sha256" : "2ccdafcc0c15ab803ce423e6cdd193ff003b42bca3e443ec46cd28320a9de571", - "text" : "db.survey.drop()\n\ndb.survey.insertMany( [\n {\n _id: 1,\n results: [\n {\n item: \"A\", \n score: 5, \n answers: [ { q: 1, a: 4 }, { q: 2, a: 6 } ]\n },\n {\n item: \"B\",\n score: 8,\n answers: [ { q: 1, a: 8 }, { q: 2, a: 9 } ]\n }\n ]\n },\n {\n _id: 2,\n results: [\n {\n item: \"C\",\n score: 8,\n answers: [ { q: 1, a: 8 }, { q: 2, a: 7 } ]\n },\n {\n item: \"B\",\n score: 4,\n answers: [ { q: 1, a: 0 }, { q: 2, a: 8 } ]\n }\n ]\n }\n] )" }, { "role" : "EXPECTED", "sha256" : "90bd5de7962edb31d00ffac81bcc73a9926442927084d6c6c555e88e182e9b67", "text" : "{\n _id: 1,\n results: [\n {\n item: 'A',\n score: 5,\n answers: [ { q: 1, a: 4 }, { q: 2, a: 6 } ]\n }\n ]\n},\n{\n _id: 2,\n results: [\n {\n item: 'C',\n score: 8,\n answers: [ { q: 1, a: 8 }, { q: 2, a: 7 } ]\n }\n ]\n}" } ], - "detail" : null, + "detail" : "UNSUPPORTED_SETUP", "owner" : null, - "status" : "UNOWNED", + "status" : "UNSUPPORTED", "stem" : "removeDocumentsFromNestedArrays", "title" : "Remove Documents from Nested Arrays" } ], - "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" - } ], + "includes" : [ ], "operator" : "pull", "pageBlob" : "e768b818fcdeafd3e08da18a1e1bf4d97c51cb14", "source" : { @@ -13514,19 +12984,7 @@ "stem" : null, "title" : "main" } ], - "includes" : [ { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" - } ], + "includes" : [ ], "operator" : "pullAll", "pageBlob" : "fe146a480d2562301c695043a95777c2d4d301e7", "source" : { @@ -13546,12 +13004,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "92c9719fae41e8d9231598dc78f42ea77567ca750750d0e7af2a3830af4553ad", - "text" : "db.movies.updateMany(\n { \"imdb.rating\": { $gt: 9 } },\n { $push: { genres: \"Acclaimed\" } }\n)" + "sha256" : "bec2fb403773fbaeeb16e7d0d3a35d55acf422b5a4ef50a037191254df76fc5f", + "text" : "db.movies.updateMany(\n { \"imdb.rating\": { $gt: 9 } },\n { $push: { genres: \"Acclaimed\" } }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "75a544c54cab146431dab9b90864d492b648ca123e4ab56121693a3bb5c026b6", - "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: '...',\n modifiedCount: '...',\n upsertedCount: 0\n}" + "sha256" : "ee17ea49abe365dec392f5f66f59a4197dd0678cbd664810b7eccabd81520c92", + "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: '...',\n modifiedCount: '...',\n upsertedCount: 0\n}\n" } ], "detail" : null, "owner" : null, @@ -13561,12 +13019,12 @@ }, { "blocks" : [ { "role" : "ACTION", - "sha256" : "a89fccb56ffebe4a028fc88254b308717751e69c92f5cf21ecabffcaefc507a3", - "text" : "db.movies.updateOne(\n { title: \"The Dark Knight\" },\n { $push: { genres: { $each: [ \"Modern Classic\", \"Award-Winning\" ] } } }\n)" + "sha256" : "c0c33d740c6307c20c390e5a54ec2d1e3ea05b145e9d2f0b60e34a07b0312dd8", + "text" : "db.movies.updateOne(\n { title: \"The Dark Knight\" },\n { $push: { genres: { $each: [ \"Modern Classic\", \"Award-Winning\" ] } } }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "46d4c65a0b05291438a5e08790d04fc40275ef40cd44deea7cc959d107e7d3ea", - "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: 1,\n modifiedCount: 1,\n upsertedCount: 0\n}" + "sha256" : "2498744efaaa5252ced033c8878f93daf0eac7b94f776da16d2be3d65e3cc79c", + "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: 1,\n modifiedCount: 1,\n upsertedCount: 0\n}\n" } ], "detail" : null, "owner" : null, @@ -13575,60 +13033,30 @@ "title" : "Append Multiple Values to an Array" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/updates/push/usePushOperatorWithMultipleModifiers", "status" : "OWNED", "stem" : null, - "title" : "Use ``$push`` Operator with Multiple Modifiers" + "title" : "Use $push Operator with Multiple Modifiers" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" - }, { - "blob" : "6a1f204cebd6db80c2057b3ddd2b0d05ab1b2de2", - "path" : "content/manual/manual/source/includes/example-push-with-multiple-modifiers.rst" - }, { - "blob" : "bd0e2214cb7dfa40af6d59ac72331b6299ec0024", - "path" : "content/code-examples/tested/command-line/mongosh/operators/push/push-value.snippet.push-value.js" - }, { "blob" : "99193737739ac9e723ee88889b5867d65ffa2618", - "path" : "content/code-examples/tested/command-line/mongosh/operators/push/push-value-output.sh" + "path" : "content/code-examples/tested/command-line/mongosh/operators/push/push-each-output.sh" }, { - "blob" : "6899df07c0fe12885a2c61b36d4a8337c17a40ea", - "path" : "content/code-examples/tested/command-line/mongosh/operators/push/push-many.snippet.push-many.js" + "blob" : "333651f629d58085f1bcd5d50a8be586259b3332", + "path" : "content/code-examples/tested/command-line/mongosh/operators/push/push-each.snippet.push-each.js" }, { "blob" : "4ee445a77fb757c5ab825a9f81f47b7db5ff652c", "path" : "content/code-examples/tested/command-line/mongosh/operators/push/push-many-output.sh" }, { - "blob" : "333651f629d58085f1bcd5d50a8be586259b3332", - "path" : "content/code-examples/tested/command-line/mongosh/operators/push/push-each.snippet.push-each.js" + "blob" : "6899df07c0fe12885a2c61b36d4a8337c17a40ea", + "path" : "content/code-examples/tested/command-line/mongosh/operators/push/push-many.snippet.push-many.js" }, { "blob" : "99193737739ac9e723ee88889b5867d65ffa2618", - "path" : "content/code-examples/tested/command-line/mongosh/operators/push/push-each-output.sh" + "path" : "content/code-examples/tested/command-line/mongosh/operators/push/push-value-output.sh" + }, { + "blob" : "bd0e2214cb7dfa40af6d59ac72331b6299ec0024", + "path" : "content/code-examples/tested/command-line/mongosh/operators/push/push-value.snippet.push-value.js" } ], "operator" : "push", "pageBlob" : "fdb0910d9434d1a5996a946255b051a314b2be99", @@ -13655,13 +13083,13 @@ "title" : "Rename a Field in an Embedded Document" }, { "blocks" : [ { - "role" : "ACTION", - "sha256" : "dfd3d577f0ca90e3b249a0b14668c4a0378281fbcb42ce3bcb5a0a2641f1cfef", - "text" : "db.students.updateOne( { _id: 1 }, { $rename: { 'wife': 'spouse' } } )" - }, { "role" : "DATA", "sha256" : "5f47cb5dc653a0cbcb19d68a4c1798435f0154caf6f07dcce57e54e23bf11396", "text" : "db.students.insertMany( [\n {\n \"_id\": 1,\n \"alias\": [ \"The American Cincinnatus\", \"The American Fabius\" ],\n \"mobile\": \"555-555-5555\",\n \"nmae\": { \"first\" : \"george\", \"last\" : \"washington\" }\n },\n {\n \"_id\": 2,\n \"alias\": [ \"My dearest friend\" ],\n \"mobile\": \"222-222-2222\",\n \"nmae\": { \"first\" : \"abigail\", \"last\" : \"adams\" }\n },\n {\n \"_id\": 3,\n \"alias\": [ \"Amazing grace\" ],\n \"mobile\": \"111-111-1111\",\n \"nmae\": { \"first\" : \"grace\", \"last\" : \"hopper\" }\n }\n] )" + }, { + "role" : "ACTION", + "sha256" : "dfd3d577f0ca90e3b249a0b14668c4a0378281fbcb42ce3bcb5a0a2641f1cfef", + "text" : "db.students.updateOne( { _id: 1 }, { $rename: { 'wife': 'spouse' } } )" } ], "detail" : null, "owner" : null, @@ -13669,10 +13097,7 @@ "stem" : "renameAFieldThatDoesNotExist", "title" : "Rename a Field That Does Not Exist" } ], - "includes" : [ { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - } ], + "includes" : [ ], "operator" : "rename", "pageBlob" : "7f17f6c47b613a4ca0360eef4f6ab420044ea67e", "source" : { @@ -13696,6 +13121,17 @@ "status" : "OWNED", "stem" : null, "title" : "Set Fields in Embedded Documents" + }, { + "blocks" : [ { + "role" : "ACTION", + "sha256" : "372b6c257e38b4a13aefd893286ea085cb3241fbdfd1942e7d64c980a5329b59", + "text" : "db.movies.updateOne(\n { title: \"The Dark Knight\" },\n { $set: { imdb: { highlight: \"Critics' Choice\" } } }\n)" + } ], + "detail" : "AFTER_EARLIER_WRITE", + "owner" : null, + "status" : "UNSUPPORTED", + "stem" : "setFieldsInEmbeddedDocuments", + "title" : "Set Fields in Embedded Documents" }, { "blocks" : [ ], "detail" : null, @@ -13705,50 +13141,23 @@ "title" : "Set Elements in Arrays" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "99193737739ac9e723ee88889b5867d65ffa2618", + "path" : "content/code-examples/tested/command-line/mongosh/operators/set/set-array-elements-output.sh" }, { - "blob" : "a3df009589cfb4e40f720423733d0875115576f7", - "path" : "content/code-examples/tested/command-line/mongosh/operators/set/set-top-level-fields.snippet.set-top-level-fields.js" + "blob" : "41966c00daeb09fb05e6b8777407c7512ddceaa2", + "path" : "content/code-examples/tested/command-line/mongosh/operators/set/set-array-elements.snippet.set-array-elements.js" }, { "blob" : "99193737739ac9e723ee88889b5867d65ffa2618", - "path" : "content/code-examples/tested/command-line/mongosh/operators/set/set-top-level-fields-output.sh" + "path" : "content/code-examples/tested/command-line/mongosh/operators/set/set-embedded-fields-output.sh" }, { "blob" : "c92f1005192fe91dba72a6c0722d2636adf713cd", "path" : "content/code-examples/tested/command-line/mongosh/operators/set/set-embedded-fields.snippet.set-embedded-fields.js" }, { "blob" : "99193737739ac9e723ee88889b5867d65ffa2618", - "path" : "content/code-examples/tested/command-line/mongosh/operators/set/set-embedded-fields-output.sh" - }, { - "blob" : "41966c00daeb09fb05e6b8777407c7512ddceaa2", - "path" : "content/code-examples/tested/command-line/mongosh/operators/set/set-array-elements.snippet.set-array-elements.js" + "path" : "content/code-examples/tested/command-line/mongosh/operators/set/set-top-level-fields-output.sh" }, { - "blob" : "99193737739ac9e723ee88889b5867d65ffa2618", - "path" : "content/code-examples/tested/command-line/mongosh/operators/set/set-array-elements-output.sh" + "blob" : "a3df009589cfb4e40f720423733d0875115576f7", + "path" : "content/code-examples/tested/command-line/mongosh/operators/set/set-top-level-fields.snippet.set-top-level-fields.js" } ], "operator" : "set", "pageBlob" : "150b10d64bd743a8e186093e31ddc3c835043893", @@ -13776,19 +13185,7 @@ "stem" : "setFieldsOnlyOnInsert", "title" : "main" } ], - "includes" : [ { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" - } ], + "includes" : [ ], "operator" : "setOnInsert", "pageBlob" : "6c89dec4ea1a7d3ef9d2b3633579f09423975f0c", "source" : { @@ -13821,19 +13218,13 @@ "title" : "Update Array Using Slice Only" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/updates/slice/useSliceWithOtherPushModifiers", "status" : "OWNED", "stem" : null, - "title" : "Use ``$slice`` with Other ``$push`` Modifiers" - } ], - "includes" : [ { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "6a1f204cebd6db80c2057b3ddd2b0d05ab1b2de2", - "path" : "content/manual/manual/source/includes/example-push-with-multiple-modifiers.rst" + "title" : "Use $slice with Other $push Modifiers" } ], + "includes" : [ ], "operator" : "slice", "pageBlob" : "66ff3942a913fab6cf31ba1e2b7dc6303138c915", "source" : { @@ -13866,19 +13257,13 @@ "title" : "Update Array Using Sort Only" }, { "blocks" : [ ], - "detail" : null, + "detail" : "matched by action text", "owner" : "query/updates/sort/useSortWithOtherPushModifiers", "status" : "OWNED", "stem" : null, - "title" : "Use ``$sort`` with Other ``$push`` Modifiers" - } ], - "includes" : [ { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "6a1f204cebd6db80c2057b3ddd2b0d05ab1b2de2", - "path" : "content/manual/manual/source/includes/example-push-with-multiple-modifiers.rst" + "title" : "Use $sort with Other $push Modifiers" } ], + "includes" : [ ], "operator" : "sort", "pageBlob" : "1a2ae60ce1c0dcee8893ee8f028a70cf76aa647b", "source" : { @@ -13891,12 +13276,12 @@ "examples" : [ { "blocks" : [ { "role" : "ACTION", - "sha256" : "831321a579a72ec49aceedef98d06e413c9c1efa02fd077c61b252977f1fdf1b", - "text" : "db.movies.updateOne(\n { title: \"The Dark Knight\" },\n { $unset: { label: \"\", status: \"\" } }\n)" + "sha256" : "3f133162ba5d24e43586fa330c54726ac13e7c0a655413a1ff74eaa686cf27cc", + "text" : "db.movies.updateOne(\n { title: \"The Dark Knight\" },\n { $unset: { label: \"\", status: \"\" } }\n)\n" }, { "role" : "EXPECTED", - "sha256" : "46d4c65a0b05291438a5e08790d04fc40275ef40cd44deea7cc959d107e7d3ea", - "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: 1,\n modifiedCount: 1,\n upsertedCount: 0\n}" + "sha256" : "2498744efaaa5252ced033c8878f93daf0eac7b94f776da16d2be3d65e3cc79c", + "text" : "{\n acknowledged: true,\n insertedId: null,\n matchedCount: 1,\n modifiedCount: 1,\n upsertedCount: 0\n}\n" } ], "detail" : null, "name" : "Remove Fields from a Document", @@ -13906,38 +13291,11 @@ "title" : "main" } ], "includes" : [ { - "blob" : "a140ad76120c4e6b1b54a9596dddb4c5d1dcb6fa", - "path" : "content/manual/manual/source/includes/fact-compatibility.rst" - }, { - "blob" : "af0e90475267dcf0a4b56e11aae76eeee3805ee4", - "path" : "content/manual/manual/source/includes/fact-environments.rst" - }, { - "blob" : "dfe515e86de70e141e24429d85b36e8bb2aa50af", - "path" : "content/manual/manual/source/includes/fact-environments-atlas-only.rst" - }, { - "blob" : "a7fa92b7a8083b9a17700e67517a1831f359c476", - "path" : "content/manual/manual/source/includes/fact-environments-onprem-only.rst" - }, { - "blob" : "5e6b70f902bb252f245d63ebe08566767f1553ff", - "path" : "content/manual/manual/source/includes/use-dot-notation.rst" - }, { - "blob" : "3eddf446867bc82fd4404645462411a8ab8d4209", - "path" : "content/manual/manual/source/includes/fact-update-operator-processing-order.rst" - }, { - "blob" : "ac698feee23671aac82cf09e4f18bb3e3e20322e", - "path" : "content/manual/manual/source/includes/extracts-update-operations.yaml" - }, { - "blob" : "d16ecb02d62db5af0e83450c77a65c0b70114183", - "path" : "content/manual/manual/source/includes/extracts-update-operations-base.yaml" - }, { - "blob" : "9ee00400c433e87ffccf677d541ff73a51c317cc", - "path" : "content/manual/manual/source/includes/sample-data-usage.rst" + "blob" : "99193737739ac9e723ee88889b5867d65ffa2618", + "path" : "content/code-examples/tested/command-line/mongosh/operators/unset/unset-fields-output.sh" }, { "blob" : "9e1cda7b065041e94730dd13c0e7d9894c50952f", "path" : "content/code-examples/tested/command-line/mongosh/operators/unset/unset-fields.snippet.unset-fields.js" - }, { - "blob" : "99193737739ac9e723ee88889b5867d65ffa2618", - "path" : "content/code-examples/tested/command-line/mongosh/operators/unset/unset-fields-output.sh" } ], "operator" : "unset", "pageBlob" : "fddf9b8038403cb3abeb1ef730cc57f7484ae028", @@ -13949,23 +13307,36 @@ } ], "schemaVersion" : 1, "skipped" : [ { - "detail" : "no operator directive", - "path" : "content/manual/manual/source/reference/operator/aggregation/interface.txt" + "detail" : "no examples section", + "path" : "reference/operator/aggregation/max.txt" + }, { + "detail" : "no examples section", + "path" : "reference/operator/aggregation/score.txt" + }, { + "detail" : "no examples section", + "path" : "reference/operator/aggregation/vectorSearch.txt" + }, { + "detail" : "no examples section", + "path" : "reference/operator/query/geometry.txt" + }, { + "detail" : "no examples section", + "path" : "reference/operator/query/not.txt" }, { - "detail" : "no operator directive", - "path" : "content/manual/manual/source/reference/operator/aggregation/search.txt" + "detail" : "no examples section", + "path" : "reference/operator/query/or.txt" }, { - "detail" : "no operator directive", - "path" : "content/manual/manual/source/reference/operator/aggregation/searchMeta.txt" + "detail" : "no examples section", + "path" : "reference/operator/query/size.txt" } ], "sourceRepository" : "mongodb/docs", "summary" : { "examples.ambiguous" : 0, - "examples.owned" : 320, + "examples.owned" : 307, "examples.unnamed" : 0, - "examples.unowned" : 262, - "pages" : 297, - "pages.skipped" : 3, + "examples.unowned" : 281, + "examples.unsupported" : 112, + "pages" : 290, + "pages.skipped" : 7, "reviews.stale" : 0 } } diff --git a/audits/catalog/example-names.json b/audits/catalog/example-names.json index 2ee5dbd9923..96a4e0793c7 100644 --- a/audits/catalog/example-names.json +++ b/audits/catalog/example-names.json @@ -4,7 +4,7 @@ { "page": "aggregation/expressions/addToSet", "title": "main", - "actionSha256": "2d9e3bbe1326348b788e7dcef099935f6dbb443e699f9709bef7d21152397e66", + "actionSha256": "53bb87e0636c400287f1545fc1dae534098282224a350345c81b33016d785919", "name": "Collect the Genres of Each Director", "reason": "the page gives its only example no title; the name says what the pipeline does" }, @@ -25,7 +25,7 @@ { "page": "aggregation/expressions/count-accumulator", "title": "main", - "actionSha256": "547ca4198a6a6587a9e3c721552fe0d3729d947cf48f022949322edc9b50e709", + "actionSha256": "1a94a92286a9b4a4439f4ba6dd23a6f7ac0cf8489d6955256b37fc17d8649645", "name": "Count the Movies in Each Genre", "reason": "the page gives its only example no title; the name says what the pipeline does" }, @@ -36,6 +36,13 @@ "name": "Build Dates from Their Parts", "reason": "the page gives its only example no title; the name says what the example does" }, + { + "page": "aggregation/expressions/dateFromString", + "title": "Converting Dates", + "actionSha256": "ce57a2769a72071daff953cfb8ba1e515b848a4f82331367ff8dce121fa50a24", + "name": "Convert Dates in Each Document's Time Zone", + "reason": "the section shows several examples under one title" + }, { "page": "aggregation/expressions/divide", "title": "main", @@ -43,38 +50,10 @@ "name": "Divide Hours into Workdays", "reason": "the page gives its only example no title; the name says what the example does" }, - { - "page": "aggregation/expressions/encStrContains", - "title": "main", - "actionSha256": "439165b8d124f4b30952bf22c75e335a74f3841b06ade05c09ba116214dcd02e", - "name": "Match an Encrypted Substring", - "reason": "the page gives its only example no title; the name says what the pipeline does" - }, - { - "page": "aggregation/expressions/encStrEndsWith", - "title": "main", - "actionSha256": "31a65962f19997c88759b2c7986bb385d7f2673137d91318f083336a7ffa95b9", - "name": "Match an Encrypted Suffix", - "reason": "the page gives its only example no title; the name says what the pipeline does" - }, - { - "page": "aggregation/expressions/encStrNormalizedEq", - "title": "main", - "actionSha256": "9f83861d081923ddacc1dadbf61d4d8e7541203e1fd94e802d3264d23d98210a", - "name": "Match a Normalized Encrypted String", - "reason": "the page gives its only example no title; the name says what the pipeline does" - }, - { - "page": "aggregation/expressions/encStrStartsWith", - "title": "main", - "actionSha256": "9d269e8a85656803552e70bf616cda49c8bfef42194941f93df701ffae3bba5b", - "name": "Match an Encrypted Prefix", - "reason": "the page gives its only example no title; the name says what the pipeline does" - }, { "page": "aggregation/expressions/first", "title": "main", - "actionSha256": "99e7a077d4f186a6186965e5188771a3c2c1b06e5cbd848a1f592eb468826943", + "actionSha256": "84d4c5beb3b9d3f385f9b604ad5623d2789047d3b5e132dc1de32d8325a847ec", "name": "Find the First Movie in Each Genre", "reason": "the page gives its only example no title; the name says what the pipeline does" }, @@ -95,7 +74,7 @@ { "page": "aggregation/expressions/last", "title": "main", - "actionSha256": "d405687abd3755d309ea59681b98811681fbf01d8bc954e367b83f4c04dc3ec2", + "actionSha256": "e13e16c1f6b2543bd6075cd3d454e3fc4751561eb2db79a45dcffaac540dad49", "name": "Find the Last Movie in Each Genre", "reason": "the page gives its only example no title; the name says what the pipeline does" }, @@ -109,44 +88,114 @@ { "page": "aggregation/expressions/maxN-array-element", "title": "main", - "actionSha256": "43f4465048f9e85efd325217402ce4bd451023d3c6b10224558e315a26ae2e16", + "actionSha256": "8f413a1f4dd1e0b75d78ff4e98a813b8f6b786c38b4993c35a72d5f09d36cffe", "name": "Find the Top Two Cast Members", "reason": "the page gives its only example no title; the name says what the pipeline does" }, { "page": "aggregation/expressions/median", "title": "main", - "actionSha256": "1c5ec50e7061ef69eb7cc7582c7b25b643d55fa416c29202aab8b4a545555737", + "actionSha256": "188ea803f7e116fa0d014b50c932d5ee561af4fbd905d8af7acab77b7068a2c8", "name": "Calculate the Median Rating by Year", "reason": "the page gives its only example no title; the name says what the pipeline does" }, { "page": "aggregation/expressions/mergeObjects", "title": "main", - "actionSha256": "fc0dd9b6a18d455f53bf804fd1baf4f6932813f3e46264c38867a4680d8a1509", + "actionSha256": "877dcd95130975d42cd33a17a3903417d91bc5f3d4cc13411330aa26ab47cc4e", "name": "Merge the Ratings of Each Movie", "reason": "the page gives its only example no title; the name says what the pipeline does" }, { "page": "aggregation/expressions/meta", - "title": "main", + "title": "$meta: \"indexKey\"", + "actionSha256": "280fae49c4693652fdc247ce37dcf2b342f7862d15d118dbd03211cf4eadb61c", + "name": "Return the Index Key of a Matched Type in an Aggregation", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/expressions/meta", + "title": "$meta: \"indexKey\"", + "actionSha256": "9a03d252106277e10ce8a3ea7f02c5a4a85a3b76b91387124186acc5a1e19738", + "name": "Return the Index Key of a Matched Type in a Find", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/expressions/meta", + "title": "$meta: \"indexKey\"", + "actionSha256": "9c26bf665b74b46a1b1fe1f9194bbf1f40aeb85f89a26d38dd6f2601ec8b789c", + "name": "Return the Index Key of a Price Range in an Aggregation", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/expressions/meta", + "title": "$meta: \"indexKey\"", + "actionSha256": "ce238b656775a55c3bee23905ff8fbd1656a47c746bd6a1d1706be6cc1168adf", + "name": "Return the Index Key of a Price Range in a Find", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/expressions/meta", + "title": "$meta: \"textScore\"", "actionSha256": "58f7d9ff2811de1222d82760f6bd6b8fb1aec513068fb94e9fdad7755a52df79", "name": "Group by Text Score", "reason": "the page gives its only example no title; the name says what the example does" }, { - "page": "aggregation/expressions/minMaxScaler", + "page": "aggregation/expressions/push", "title": "main", - "actionSha256": "68cadc2ee23a651e9c95b29ee02069dcc6e06179ee07642c59916ac765840f4a", - "name": "Scale Values to a Range", + "actionSha256": "08d0e38c94df21c3d78edc77666013e7d4e056c46fb3582cd939e798856ad3b2", + "name": "Collect the First Genre of Each Director's Movies", "reason": "the page gives its only example no title; the name says what the pipeline does" }, { - "page": "aggregation/expressions/push", + "page": "aggregation/expressions/regexFind", + "title": "$regexFind and Its Options", + "actionSha256": "1f2f7891906c9b6c5c06ccceb58ed22c3bc1eb2ca7e4886c3158a982eec9a4ce", + "name": "Find the First Line or Link", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/expressions/regexFind", + "title": "$regexFind and Its Options", + "actionSha256": "24c1c746b2f6fd9901735f7bc30d5746505114fe597c17463b54cb9ded748d06", + "name": "Find the First Tier", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/expressions/regexFindAll", + "title": "$regexFindAll and Its Options", + "actionSha256": "1f04ac6bf1584e79290aa03c41508ed82d069cd8152115357e399412aaf0caa1", + "name": "Find Every Line or Link", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/expressions/regexFindAll", + "title": "$regexFindAll and Its Options", + "actionSha256": "6ef2436039f65b91884b9e03e3c18fef963f33750c2133b5178cc7903967c7a8", + "name": "Find Every Tier", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/expressions/regexMatch", + "title": "$regexMatch and Its Options", + "actionSha256": "e71976556699627cfcb553fa9797bd3cb851b76d2b6228ca80ed3d85fed44eb6", + "name": "Match Line or Link", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/expressions/round", "title": "main", - "actionSha256": "40df131bf80452fa7ae8ae5bbeec3d865ce04bea7d77f5ca1bbe484d81c26e11", - "name": "Collect the First Genre of Each Director's Movies", - "reason": "the page gives its only example no title; the name says what the pipeline does" + "actionSha256": "7a309af5d7e8414c924d39dde4efd2f1eaf4d9dac7f34fe37a251eb516a482d9", + "name": "Round to the Nearest Ten", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/expressions/round", + "title": "main", + "actionSha256": "c99f1f78637050f6d44a1b6e75e1702eff73d5070d5fcfcb84bf60a8a959e5ef", + "name": "Round to a Whole Number", + "reason": "the section shows several examples under one title" }, { "page": "aggregation/expressions/rtrim", @@ -162,6 +211,27 @@ "name": "Count a Random Sample", "reason": "the page gives its only example no title; the name says what the example does" }, + { + "page": "aggregation/expressions/setField", + "title": "Remove Fields that Contain Periods (.)", + "actionSha256": "65b4bbe2c01fb04c1d545d70153703e261dc6bf4113e027abd56e51e10f113bc", + "name": "Remove a Field with a Period Using $unsetField", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/expressions/setField", + "title": "Remove Fields that Start with a Dollar Sign ($)", + "actionSha256": "e9d87a42974717b0aaf85b7560e1dea855a5f9f67e2de26a48ec8ef8f06c886a", + "name": "Remove a Dollar-Prefixed Field with $unsetField", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/expressions/setField", + "title": "Remove Fields that Start with a Dollar Sign ($)", + "actionSha256": "f2e9f9c7161b780ad19d31d3e0fde654012a50bb4b7e177de5a7c1ae44ccfec6", + "name": "Remove a Dollar-Prefixed Field with $setField", + "reason": "the section shows several examples under one title" + }, { "page": "aggregation/expressions/sigmoid", "title": "main", @@ -193,38 +263,31 @@ { "page": "aggregation/expressions/stdDevPop", "title": "main", - "actionSha256": "afdb393803aae8254cfbcf2ab0a54f7e819668ef5fefe646095b360ba9262b1e", + "actionSha256": "97b389aad0872aa5aba9904db093b1b5836d7e7e0439dd05c537d67e3f431a07", "name": "Find the Directors with the Most Varied Ratings", "reason": "the page gives its only example no title; the name says what the pipeline does" }, { "page": "aggregation/expressions/stdDevSamp", "title": "main", - "actionSha256": "da5aa827655931d1df76e3118176e51f7d4da003dc04a20eb1d6311fabb3afa0", + "actionSha256": "4b5801d1d06f8a15b1728cc4d91f204188c911ae13fb157f6119e05f2f2e2b1e", "name": "Find the Directors with the Most Varied Sampled Ratings", "reason": "the page gives its only example no title; the name says what the pipeline does" }, { "page": "aggregation/expressions/substr", "title": "main", - "actionSha256": "2b76bac3b7a35957d453ce8f7ec257a9fecb726124b44b6226e312981cdf3aaa", + "actionSha256": "ccf8881fbc74bf2bcb5aa4933e1b43ccbf2990fe6e9bddb16a9593e1fff9532c", "name": "Split Titles into Two Parts", "reason": "the page gives its only example no title; the name says what the pipeline does" }, { "page": "aggregation/expressions/sum", "title": "main", - "actionSha256": "71390247d6d31ae4b9cbf51c29648ee2bb46e43474602550df84e0c08b5225ff", + "actionSha256": "8ab0a79d619ee161ed1fc77568652b6cc43b36183c23e55e80efafb2e4ebb0f8", "name": "Total the Votes by Rating", "reason": "the page gives its only example no title; the name says what the pipeline does" }, - { - "page": "aggregation/expressions/toHashedIndexKey", - "title": "main", - "actionSha256": "799d9684b84aac32629867f268a98d012b4426c697157b36769341364b88e174", - "name": "Hash a String Value", - "reason": "the page gives its only example no title; the name says what the pipeline does" - }, { "page": "aggregation/expressions/trim", "title": "main", @@ -233,109 +296,249 @@ "reason": "the page gives its only example no title; the name says what the example does" }, { - "page": "aggregation/stages/bucketAuto", - "title": "Multi-Faceted Aggregation", - "actionSha256": "49c497fa22b49783b1df464f3eb1938f1e8ca2f690771b7bb759cf6042ca1313", - "owner": "aggregation/stages/bucketAuto/multiFacetedAggregation", - "reason": "the AsPipeline fixture tests the same example as a pipeline list" + "page": "aggregation/expressions/trunc", + "title": "main", + "actionSha256": "79f7d9c090a22304aa9eab96018c85298ab2939d45d9119f82675fafed32ab80", + "name": "Truncate to Tens", + "reason": "the section shows several examples under one title" }, { - "page": "aggregation/stages/changeStream", + "page": "aggregation/expressions/trunc", "title": "main", - "actionSha256": "c7b41eadb79149ce317163d6e02efa3551551fd91e9c2e61d40544733f4bfee4", - "name": "Open a Change Stream", - "reason": "the page gives its only example no title; the name says what the pipeline does" + "actionSha256": "dd795ae32c1afe8dfa1213eb899da281c63541ef88308249a20aabfce8931fa1", + "name": "Truncate to a Whole Number", + "reason": "the section shows several examples under one title" }, { - "page": "aggregation/stages/changeStreamSplitLargeEvent", - "title": "main", - "actionSha256": "93f73aef6deac8d63fb3888a36b4d1013b7a438b16b710b9f2fc61364bb10276", - "name": "Split a Large Change Event", - "reason": "the page gives its only example no title; the name says what the pipeline does" + "page": "aggregation/stages/addFields", + "title": "Overwriting an Existing Field", + "actionSha256": "89993056e3ee816d2a66650430801b9323e422be1ac9ed843c585c4af5b46d5d", + "name": "Add Fifteen Minutes to the Runtime", + "reason": "the section shows several examples under one title" }, { - "page": "aggregation/stages/currentOp", - "title": "main", - "actionSha256": "030833abe66b5010e1ad768cb461b4434d7d3289c5a83e2ccd388a7ff74a2964", - "name": "Find Inactive Sessions with Open Transactions", - "reason": "the page gives its only example no title; the name says what the example does" + "page": "aggregation/stages/addFields", + "title": "Overwriting an Existing Field", + "actionSha256": "ce9390daa8cef8eeb28c3f171f03c8bc90b900b64edd09203230f9f85f216479", + "name": "Replace the Id and Title", + "reason": "the section shows several examples under one title" }, { - "page": "aggregation/stages/facet", - "title": "main", - "actionSha256": "fcee9241e8de20239e50ec66b3b6e6f3750ded612a7b056d338cc482eafd3c28", - "name": "Categorize Movies Several Ways", - "reason": "the page gives its only example no title; the name says what the example does" + "page": "aggregation/stages/addFields", + "title": "Remove Fields", + "actionSha256": "88447f5cea6ecee25abd4c19418487c1421cc00485371800894545a10ebcb51f", + "name": "Remove the Plot", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/stages/addFields", + "title": "Remove Fields", + "actionSha256": "9eecd139e361e16def8d11fd536b36868ed36842300bae2a3b56259d16d79b8f", + "name": "Remove a Missing Rating", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/stages/bucketAuto", + "title": "Multi-Faceted Aggregation", + "actionSha256": "49c497fa22b49783b1df464f3eb1938f1e8ca2f690771b7bb759cf6042ca1313", + "owner": "aggregation/stages/bucketAuto/multiFacetedAggregation", + "reason": "the AsPipeline fixture tests the same example as a pipeline list" }, { - "page": "aggregation/stages/indexStats", + "page": "aggregation/stages/facet", "title": "main", - "actionSha256": "8d21b466c0c58f823addf3ce810309f8b8304b70fa2ef98bc05206ae2d270810", - "name": "Return Index Usage Statistics", + "actionSha256": "acad323ef8f2bdea722a8a0908b578b88e6f87364f865e6276d188cd56b7ee51", + "name": "Categorize Movies Several Ways", "reason": "the page gives its only example no title; the name says what the example does" }, { "page": "aggregation/stages/limit", "title": "main", - "actionSha256": "71aa6e659a61188b24e2de7b027a3f264ba0eab0f1d75977d049c89e8f474e62", + "actionSha256": "0d9a3c4499ee595a0a63b9a4088cec3be70a9d0d4ddc6c8b66d6650c94d089ec", "name": "Return the First Five Movies", "reason": "the page gives its only example no title; the name says what the example does" }, + { + "page": "aggregation/stages/lookup", + "title": "Perform a Concise Correlated Subquery with $lookup", + "actionSha256": "52a9b7a58a3cd5157bcce4f87531b2779238a7a7cbc2f97b2fc7c2d48e42feda", + "name": "Correlate with Variables Only", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/stages/lookup", + "title": "Perform a Concise Correlated Subquery with $lookup", + "actionSha256": "ea6a4bd51f0bf6b368429b16ad4969761587d7b89a34300a7febf37132915a33", + "name": "Correlate with Local and Foreign Fields", + "reason": "the section shows several examples under one title" + }, { "page": "aggregation/stages/merge", - "title": "main", - "actionSha256": "0b8c38bc0cb8bfa1dd7d46446a1a31898fb3e717d9b0525158fe3eabd7657b61", + "title": "On-Demand Materialized View: Initial Creation", + "actionSha256": "3e1b19c5bba77b08ea6a2736e8d91b31e58aa4ac5fea7a9fd981133791c93752", "name": "Summarize Ratings into Another Collection", "reason": "the page gives its only example no title; the name says what the pipeline does" }, { - "page": "aggregation/stages/planCacheStats", - "title": "main", - "actionSha256": "765ee31913796b69459dc41e9283d927ced627ebb30433792b28a79a25507816", - "name": "Populate the Plan Cache", - "reason": "the page gives its only example no title; the name says what the pipeline does" + "page": "aggregation/stages/project", + "title": "Exclude Fields from Embedded Documents", + "actionSha256": "bc9e5846612ed185f1e844e17bf3b7b56bd9765ec58c0b2c340ddc5402f37d7e", + "name": "Exclude an Embedded Field with Dot Notation", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/stages/project", + "title": "Exclude Fields from Embedded Documents", + "actionSha256": "ffa88523b3f7a9f1cdd3bf100024fd67c73c882ddd76643cd809df5719138deb", + "name": "Exclude an Embedded Field with a Nested Document", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/stages/project", + "title": "Include Specific Fields from Embedded Documents", + "actionSha256": "9c35dfd848afeb3ec171c245311bc786d7927a67e8ad276d557faa52d15f4b0c", + "name": "Include an Embedded Field with Dot Notation", + "reason": "the section shows several examples under one title" }, { "page": "aggregation/stages/project", "title": "Include Specific Fields from Embedded Documents", - "actionSha256": "f398fb4337ec993a21c9853230ee5bb28aa545539addcee0262f18fc0d54f80d", - "owner": "aggregation/stages/project/includeSpecificFieldsFromEmbeddedDocuments", - "reason": "the AsStage fixture tests the same example built as a stage" + "actionSha256": "e47aeb3bb067f2c7ec12485123b4181d97b1972439d92492693b5c44db88dfed", + "name": "Include an Embedded Field with a Nested Document", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/stages/project", + "title": "Project New Array Fields", + "actionSha256": "645c17272ec42fa05029805ee61247e40a8272b2bb4b9321f32c7a9f9120a0eb", + "name": "Project an Array of Fields", + "reason": "the section shows several examples under one title" + }, + { + "page": "aggregation/stages/project", + "title": "Project New Array Fields", + "actionSha256": "b35cf2bed3d12a030f02661715b377c64960b89b179a918ce60965b55abb45fe", + "name": "Project an Array with a Missing Field", + "reason": "the section shows several examples under one title" }, { - "page": "aggregation/stages/querySettings", + "page": "aggregation/stages/replaceWith", "title": "main", - "actionSha256": "415e2de99a5204c0b349852f37c78b452b6017228665df712c7c4f28b639bce9", - "name": "Show the Debug Query Shape", - "reason": "the page gives its only example no title; the name says what the pipeline does" + "actionSha256": "bcb7cb77b65de38c219114b6a2748f3e91d440a108fc44ba4166b29cb19dbad7", + "name": "Pivot Sales by Quarter", + "reason": "the section shows several examples under one title" }, { - "page": "aggregation/stages/queryStats", + "page": "aggregation/stages/unset", + "title": "Remove a Single Field", + "actionSha256": "ece2a983c98fad3ac7eb876b2c7aaa0af140051a35199fe2bb04dc065d310903", + "name": "Remove a Field Listed in an Array", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/all", + "title": "Use $all with $elemMatch", + "actionSha256": "9df4c250c25187aa89ed3bc35a07830b6b2270c5145c56113b22a02d72913ec8", + "name": "Match an Embedded Value with $all", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/all", + "title": "Use $all with $elemMatch", + "actionSha256": "db71c785bd9d2b8cc50cfeaa1354b9a5cc0c115cd28b3f187c33c55d4f01f023", + "name": "Match an Embedded Value by Equality", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/and", "title": "main", - "actionSha256": "288929e2472bc93b5617f57e3401f5ce3a9b8579aba823372f815ba922f01cdc", - "name": "Return Query Statistics", - "reason": "the page gives its only example no title; the name says what the pipeline does" + "actionSha256": "01c4c2bdf27ece8ae1c7fb76cb7a4e391da68e3504fb218451945f2e0a05fb23", + "name": "Exclude Values with $nin", + "reason": "the section shows several examples under one title" }, { - "page": "aggregation/stages/rankFusion", + "page": "query/filters/and", "title": "main", - "actionSha256": "c4871e0499a25d9f92545f72679122a16ef1d2a2cd514d387b5a72018b4a611e", - "name": "Combine Vector and Text Search Ranks", - "reason": "the page gives its only example no title; the name says what the pipeline does" + "actionSha256": "28a99f0a8e170bca63b8ffa9b9d3b8ab8dff105974ae92ec3e5e8d7c4fae3f39", + "name": "Combine Conditions on One Field", + "reason": "the section shows several examples under one title" }, { - "page": "aggregation/stages/scoreFusion", + "page": "query/filters/and", "title": "main", - "actionSha256": "2d6d65f7de803401276c55fbb86f847215ae51a080176a56dcaab7302d331433", - "name": "Combine Vector and Text Search Scores", - "reason": "the page gives its only example no title; the name says what the pipeline does" + "actionSha256": "45bbfcbf2f4dc2eefa58e9b3c891291e8263ae66eedc3d9bde2cadba67e731b7", + "name": "Require Two Values of One Field", + "reason": "the section shows several examples under one title" }, { - "page": "query/filters/centerSphere", + "page": "query/filters/and", "title": "main", - "actionSha256": "963bdeceb39203228430f08c78f97836836db783f61a56b4a82fbef8d8efdbe0", - "name": "Find Places Within a Spherical Radius", - "reason": "the page gives its only example no title; the name says what the example does" + "actionSha256": "52f711d8006cd8dd53d6e04cf64af1c390ef6a4b323b8e139a84dc1354d57a83", + "name": "Match Either Value with $in", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/and", + "title": "main", + "actionSha256": "d8d657b3619f44da4b125870bb74e8a29c2af06aa1da887a4f42ab3f4619fa53", + "name": "Require Both Values with $all", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/elemMatch", + "title": "main", + "actionSha256": "b40eaf38890d9f3c8b3e2f425bb8a0a034addeb69019e1f92100e25e63c0f398", + "name": "Match an Element with $elemMatch", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/elemMatch", + "title": "main", + "actionSha256": "d4ee8e7e028a7949ac7541f34ed9d3c5df6fd510697da063ee7950c872233c40", + "name": "Match When No Element Is xyz", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/elemMatch", + "title": "main", + "actionSha256": "d5529215930ae1f790336fcfd9dda0a8fa427a734b279be5b9798da979ae396d", + "name": "Match an Element That Isn't xyz", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/elemMatch", + "title": "main", + "actionSha256": "e0d42a14f07c83ab23e2dc5ce14829ab9984fa6f2ddf734b6d36e8f65d89bf5f", + "name": "Match an Element with Dot Notation", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/eq", + "title": "Array Element Equals a Value", + "actionSha256": "cec796547f5dedb0a18f94df5235860d4e5a48bd9dd47188ca8b8a4d2e7c472f", + "name": "Match One Array Element", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/eq", + "title": "Equals a Specified Value", + "actionSha256": "e1ffe9129e84a91107a98566d5c0ac064cf528a52979b8b5dd5e4d3ef986e143", + "name": "Match a Quantity Exactly", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/eq", + "title": "Equals an Array Value", + "actionSha256": "0ce698bb9952fdaac5d2408b468a47e287157a7df3a6a17d7d635ed2fefab7df", + "name": "Match an Array Exactly", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/eq", + "title": "Field in Embedded Document Equals a Value", + "actionSha256": "c6d631398ae13f757366fbf1e152f3eae1ce476102154fceca2b6749a93945dc", + "name": "Match an Embedded Field with Dot Notation", + "reason": "the section shows several examples under one title" }, { "page": "query/filters/maxDistance", @@ -345,11 +548,95 @@ "reason": "the page gives its only example no title; the name says what the example does" }, { - "page": "query/filters/where", - "title": "main", - "actionSha256": "1ffbada99df79d71a262d2349b6dbafe8af883829c09db0b5eafe2651a6a1be4", - "name": "Match with a JavaScript Function", - "reason": "the page gives its only example no title; the name says what the example does" + "page": "query/filters/mod", + "title": "Floating Point Arguments", + "actionSha256": "b13dab4c8fe93e0961a7fe82edaee694d6dffd44f261fcc548158bdcec5dfaa5", + "name": "Divide by 4.99", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/mod", + "title": "Floating Point Arguments", + "actionSha256": "f5a5fdbfcabd816d91a158316ecea5e4d19992cba29d0441c9d3c8680c7bf128", + "name": "Divide by 4.5", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/regex", + "title": "Extend Regex Options to Match Characters Outside of ASCII", + "actionSha256": "3429e1aa070529af34a8b0eb137b3a2ceb84768a1ab75362e9c55979f6ffc92e", + "name": "Match Unicode Word Boundaries", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/regex", + "title": "Multiline Match for Lines Starting with Specified Pattern", + "actionSha256": "1acd8d3a1163dfe5b84c15df570ab9bdcb091914a04c08e699599ed78483d337", + "name": "Match S Anywhere", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/regex", + "title": "Multiline Match for Lines Starting with Specified Pattern", + "actionSha256": "eb02ab366f7905689b11d7ad68b88a1af9fc4bb4b4ee6cd88cd8064b3b994455", + "name": "Match Lines That Start with S", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/text", + "title": "Search for an Exact String", + "actionSha256": "7eba1d3738880c9b3088f906cb063bebcb2621d3c4680220935d330161141dcd", + "name": "Search for Two Exact Phrases", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/text", + "title": "Search for an Exact String", + "actionSha256": "8250e19f1852c00634324e88654e165a8cc4c4b6255cfcbeb8861d845bda945d", + "name": "Search for One Exact Phrase", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/text", + "title": "Sort by Relevance Score", + "actionSha256": "f4d0c0955b7346d657c3064678dea3cfe5168f5c242bdb85eeab69df2ff16c85", + "name": "Sort Articles by Their Text Score", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/type", + "title": "Querying by Data Type", + "actionSha256": "84685dfc533e691999db75301acb565b6a2fc8a01b20b43b693da7a4a4895320", + "name": "Match String Ratings by Type Alias", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/type", + "title": "Querying by Data Type", + "actionSha256": "99d54bcc38b997f26cf339b3870c9f5d19d2cae4aaf12fa56b3bbc500a01efa5", + "name": "Match String Ratings by Type Number", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/type", + "title": "Querying by Data Type", + "actionSha256": "cf5ce41e809c86ef9cc77e0f38db84a35b5c48ab443502f8c044eb6061d72ad9", + "name": "Match Numeric Ratings", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/type", + "title": "Querying by Multiple Data Types", + "actionSha256": "82ad4fb869ecad965f29dd67a368136d45754148039a9186787933f83f036a96", + "name": "Match Several Types by Number", + "reason": "the section shows several examples under one title" + }, + { + "page": "query/filters/type", + "title": "Querying by Multiple Data Types", + "actionSha256": "9eb1d96bcd464f0204a39dac12f6b245d764915699b0dadf8f4b1b27f65c424f", + "name": "Match Several Types by Alias", + "reason": "the section shows several examples under one title" }, { "page": "query/updates/setOnInsert", @@ -361,7 +648,7 @@ { "page": "query/updates/unset", "title": "main", - "actionSha256": "831321a579a72ec49aceedef98d06e413c9c1efa02fd077c61b252977f1fdf1b", + "actionSha256": "3f133162ba5d24e43586fa330c54726ac13e7c0a655413a1ff74eaa686cf27cc", "name": "Remove Fields from a Document", "reason": "the page gives its only example no title; the name says what the example does" } diff --git a/audits/catalog/generation-review.json b/audits/catalog/generation-review.json index 9a5e53538ae..dbc9e6d49f5 100644 --- a/audits/catalog/generation-review.json +++ b/audits/catalog/generation-review.json @@ -19,6 +19,10 @@ "name": "aggregation/expressions/filter/useIdxToAccessTheIndex", "reason": "$$IDX is newer than the tests' MongoDB 8.2, which rejects it (Use of undefined variable: IDX); 8.3 cannot run on the test hosts' kernels (SERVER-121912)." }, + { + "name": "aggregation/expressions/reduce/probability", + "reason": "The page inserts its events into db.events but aggregates db.probability, an empty collection, so the printed results can't be reproduced. Lift once the page uses one collection." + }, { "name": "query/updates/positional-all/updateArraysSpecifiedUsingANegationQueryOperator", "reason": "The page prints the whole collection after the update; the runner's update results are the documents its filter still matches, as the legacy tests read them. Serialization and behavior pass." diff --git a/audits/catalog/scenario-plan.json b/audits/catalog/scenario-plan.json new file mode 100644 index 00000000000..b249af78293 --- /dev/null +++ b/audits/catalog/scenario-plan.json @@ -0,0 +1,9865 @@ +{ + "catalogSha256" : "99f9c13831a4b5827cd718ef91439712305c2cfb779562f84dd90d54a4d98f56", + "pages" : [ { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/abs", + "testClass" : "TestAbs" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/abs", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/abs.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$abs" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/accumulator", + "testClass" : "TestAccumulator" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/accumulator", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/accumulator.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$accumulator" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/acos", + "testClass" : "TestAcos" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/acos", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/acos.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$acos" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/acosh", + "testClass" : "TestAcosh" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/acosh", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/acosh.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$acosh" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/add", + "testClass" : "TestAdd" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/add", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/add.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$add" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/addToSet", + "testClass" : "TestAddToSet" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/addToSet", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/addToSet.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$addToSet" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/allElementsTrue", + "testClass" : "TestAllElementsTrue" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/allElementsTrue", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/allElementsTrue.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$allElementsTrue" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/and", + "testClass" : "TestAnd" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/and", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/and.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$and" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/anyElementTrue", + "testClass" : "TestAnyElementTrue" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/anyElementTrue", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/anyElementTrue.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$anyElementTrue" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/arrayElemAt", + "testClass" : "TestArrayElemAt" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/arrayElemAt", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/arrayElemAt.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$arrayElemAt" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/arrayToObject", + "testClass" : "TestArrayToObject" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/arrayToObject", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/arrayToObject.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$arrayToObject" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/asin", + "testClass" : "TestAsin" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/asin", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/asin.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$asin" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/asinh", + "testClass" : "TestAsinh" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/asinh", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/asinh.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$asinh" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/atan", + "testClass" : "TestAtan" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/atan", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/atan.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$atan" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/atan2", + "testClass" : "TestAtan2" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/atan2", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/atan2.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$atan2" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/atanh", + "testClass" : "TestAtanh" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/atanh", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/atanh.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$atanh" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/avg", + "testClass" : "TestAvg" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/avg", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/avg.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$avg" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/binarySize", + "testClass" : "TestBinarySize" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/binarySize", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/binarySize.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$binarySize" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "example" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/bitAnd", + "testClass" : "TestBitAnd" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/bitAnd", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/bitAnd.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$bitAnd" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/bitNot", + "testClass" : "TestBitNot" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/bitNot", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/bitNot.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$bitNot" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/bitOr", + "testClass" : "TestBitOr" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/bitOr", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/bitOr.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$bitOr" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/bitXor", + "testClass" : "TestBitXor" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/bitXor", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/bitXor.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$bitXor" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/bottom", + "testClass" : "TestBottom" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/bottom", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/bottom.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$bottom" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/bottomN", + "testClass" : "TestBottomN" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/bottomN", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/bottomN.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$bottomN" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/bsonSize", + "testClass" : "TestBsonSize" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/bsonSize", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/bsonSize.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$bsonSize" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/ceil", + "testClass" : "TestCeil" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/ceil", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/ceil.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$ceil" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/cmp", + "testClass" : "TestCmp" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/cmp", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/cmp.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$cmp" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/concat", + "testClass" : "TestConcat" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/concat", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/concat.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$concat" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/concatArrays", + "testClass" : "TestConcatArrays" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/concatArrays", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/concatArrays.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$concatArrays" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/cond", + "testClass" : "TestCond" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/cond", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/cond.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$cond" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/convert", + "testClass" : "TestConvert" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/convert", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/convert.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$convert" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/cos", + "testClass" : "TestCos" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/cos", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/cos.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$cos" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/cosh", + "testClass" : "TestCosh" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/cosh", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/cosh.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$cosh" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/count-accumulator", + "testClass" : "TestCountAccumulator" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/count-accumulator", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/count-accumulator.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$count" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/covariancePop", + "testClass" : "TestCovariancePop" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/covariancePop", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/covariancePop.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$covariancePop" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/covarianceSamp", + "testClass" : "TestCovarianceSamp" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/covarianceSamp", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/covarianceSamp.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$covarianceSamp" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/createObjectId", + "testClass" : "TestCreateObjectId" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/createObjectId", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/createObjectId.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$createObjectId" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/dateAdd", + "testClass" : "TestDateAdd" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/dateAdd", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/dateAdd.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$dateAdd" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/dateDiff", + "testClass" : "TestDateDiff" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/dateDiff", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/dateDiff.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$dateDiff" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/dateFromParts", + "testClass" : "TestDateFromParts" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/dateFromParts", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/dateFromParts.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$dateFromParts" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/dateFromString", + "testClass" : "TestDateFromString" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/dateFromString", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/dateFromString.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$dateFromString" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/dateSubtract", + "testClass" : "TestDateSubtract" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/dateSubtract", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/dateSubtract.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$dateSubtract" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/dateToParts", + "testClass" : "TestDateToParts" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/dateToParts", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/dateToParts.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$dateToParts" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/dateToString", + "testClass" : "TestDateToString" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/dateToString", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/dateToString.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$dateToString" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/dateTrunc", + "testClass" : "TestDateTrunc" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/dateTrunc", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/dateTrunc.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$dateTrunc" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/dayOfMonth", + "testClass" : "TestDayOfMonth" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/dayOfMonth", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/dayOfMonth.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$dayOfMonth" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/dayOfWeek", + "testClass" : "TestDayOfWeek" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/dayOfWeek", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/dayOfWeek.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$dayOfWeek" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/dayOfYear", + "testClass" : "TestDayOfYear" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/dayOfYear", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/dayOfYear.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$dayOfYear" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/degreesToRadians", + "testClass" : "TestDegreesToRadians" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/degreesToRadians", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/degreesToRadians.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$degreesToRadians" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/denseRank", + "testClass" : "TestDenseRank" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/denseRank", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/denseRank.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$denseRank" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/derivative", + "testClass" : "TestDerivative" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/derivative", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/derivative.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$derivative" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/deserializeEJSON", + "testClass" : "TestDeserializeEJSON" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/deserializeEJSON", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/deserializeEJSON.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$deserializeEJSON" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/divide", + "testClass" : "TestDivide" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/divide", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/divide.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$divide" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/documentNumber", + "testClass" : "TestDocumentNumber" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/documentNumber", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/documentNumber.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$documentNumber" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/encStrContains", + "testClass" : "TestEncStrContains" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/encStrContains", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/encStrContains.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$encStrContains" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/encStrEndsWith", + "testClass" : "TestEncStrEndsWith" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/encStrEndsWith", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/encStrEndsWith.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$encStrEndsWith" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/encStrNormalizedEq", + "testClass" : "TestEncStrNormalizedEq" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/encStrNormalizedEq", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/encStrNormalizedEq.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$encStrNormalizedEq" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/encStrStartsWith", + "testClass" : "TestEncStrStartsWith" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/encStrStartsWith", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/encStrStartsWith.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$encStrStartsWith" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/eq", + "testClass" : "TestEq" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/eq", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/eq.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$eq" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/exp", + "testClass" : "TestExp" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/exp", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/exp.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$exp" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/expMovingAvg", + "testClass" : "TestExpMovingAvg" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/expMovingAvg", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/expMovingAvg.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$expMovingAvg" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/filter", + "testClass" : "TestFilter" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/filter", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/filter.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$filter" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/first", + "testClass" : "TestFirst" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/first", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/first.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$first" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/firstN", + "testClass" : "TestFirstN" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/firstN", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/firstN.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$firstN" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/floor", + "testClass" : "TestFloor" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/floor", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/floor.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$floor" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/function", + "testClass" : "TestFunction" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/function", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/function.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$function" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/getField", + "testClass" : "TestGetField" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/getField", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/getField.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$getField" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/gt", + "testClass" : "TestGt" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/gt", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/gt.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$gt" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/gte", + "testClass" : "TestGte" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/gte", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/gte.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$gte" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/hash", + "testClass" : "TestHash" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/hash", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/hash.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$hash" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/hexHash", + "testClass" : "TestHexHash" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/hexHash", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/hexHash.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$hexHash" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/hour", + "testClass" : "TestHour" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/hour", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/hour.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$hour" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/ifNull", + "testClass" : "TestIfNull" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/ifNull", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/ifNull.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$ifNull" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/in", + "testClass" : "TestIn" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/in", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/in.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$in" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/indexOfArray", + "testClass" : "TestIndexOfArray" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/indexOfArray", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/indexOfArray.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$indexOfArray" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/indexOfBytes", + "testClass" : "TestIndexOfBytes" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/indexOfBytes", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/indexOfBytes.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$indexOfBytes" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/indexOfCP", + "testClass" : "TestIndexOfCP" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/indexOfCP", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/indexOfCP.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$indexOfCP" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/integral", + "testClass" : "TestIntegral" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/integral", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/integral.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$integral" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/isArray", + "testClass" : "TestIsArray" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/isArray", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/isArray.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$isArray" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/isNumber", + "testClass" : "TestIsNumber" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/isNumber", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/isNumber.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$isNumber" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/isoDayOfWeek", + "testClass" : "TestIsoDayOfWeek" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/isoDayOfWeek", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/isoDayOfWeek.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$isoDayOfWeek" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/isoWeek", + "testClass" : "TestIsoWeek" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/isoWeek", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/isoWeek.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$isoWeek" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/isoWeekYear", + "testClass" : "TestIsoWeekYear" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/isoWeekYear", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/isoWeekYear.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$isoWeekYear" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/last", + "testClass" : "TestLast" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/last", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/last.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$last" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/lastN", + "testClass" : "TestLastN" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/lastN", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/lastN.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$lastN" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/let", + "testClass" : "TestLet" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/let", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/let.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$let" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/linearFill", + "testClass" : "TestLinearFill" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/linearFill", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/linearFill.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$linearFill" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/literal", + "testClass" : "TestLiteral" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/literal", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/literal.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$literal" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/ln", + "testClass" : "TestLn" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/ln", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/ln.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$ln" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/locf", + "testClass" : "TestLocf" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/locf", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/locf.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$locf" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/log", + "testClass" : "TestLog" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/log", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/log.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$log" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/log10", + "testClass" : "TestLog10" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/log10", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/log10.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$log10" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/lt", + "testClass" : "TestLt" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/lt", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/lt.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$lt" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/lte", + "testClass" : "TestLte" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/lte", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/lte.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$lte" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/ltrim", + "testClass" : "TestLtrim" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/ltrim", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/ltrim.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$ltrim" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/map", + "testClass" : "TestMap" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/map", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/map.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$map" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/maxN", + "testClass" : "TestMaxN" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/maxN", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/maxN.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$maxN" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/maxN-array-element", + "testClass" : "TestMaxNArrayElement" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/maxN-array-element", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/maxN-array-element.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$maxN" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/median", + "testClass" : "TestMedian" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/median", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/median.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$median" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/mergeObjects", + "testClass" : "TestMergeObjects" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/mergeObjects", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/mergeObjects.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$mergeObjects" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/meta", + "testClass" : "TestMeta" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/meta", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/meta.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$meta" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/millisecond", + "testClass" : "TestMillisecond" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/millisecond", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/millisecond.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$millisecond" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/min", + "testClass" : "TestMin" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/min", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/min.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$min" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/minMaxScaler", + "testClass" : "TestMinMaxScaler" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/minMaxScaler", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/minMaxScaler.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$minMaxScaler" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/minN", + "testClass" : "TestMinN" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/minN", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/minN.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$minN" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/minute", + "testClass" : "TestMinute" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/minute", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/minute.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$minute" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/mod", + "testClass" : "TestMod" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/mod", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/mod.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$mod" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "example" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/month", + "testClass" : "TestMonth" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/month", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/month.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$month" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/multiply", + "testClass" : "TestMultiply" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/multiply", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/multiply.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$multiply" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/ne", + "testClass" : "TestNe" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/ne", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/ne.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$ne" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/not", + "testClass" : "TestNot" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/not", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/not.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$not" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/objectToArray", + "testClass" : "TestObjectToArray" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/objectToArray", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/objectToArray.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$objectToArray" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/or", + "testClass" : "TestOr" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/or", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/or.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$or" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/percentile", + "testClass" : "TestPercentile" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/percentile", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/percentile.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$percentile" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/pow", + "testClass" : "TestPow" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/pow", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/pow.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$pow" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/push", + "testClass" : "TestPush" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/push", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/push.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$push" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/radiansToDegrees", + "testClass" : "TestRadiansToDegrees" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/radiansToDegrees", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/radiansToDegrees.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$radiansToDegrees" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/rand", + "testClass" : "TestRand" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/rand", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/rand.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$rand" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/range", + "testClass" : "TestRange" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/range", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/range.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$range" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/rank", + "testClass" : "TestRank" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/rank", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/rank.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$rank" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/reduce", + "testClass" : "TestReduce" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/reduce", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/reduce.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$reduce" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/regexFind", + "testClass" : "TestRegexFind" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/regexFind", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/regexFind.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$regexFind" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/regexFindAll", + "testClass" : "TestRegexFindAll" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/regexFindAll", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/regexFindAll.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$regexFindAll" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/regexMatch", + "testClass" : "TestRegexMatch" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/regexMatch", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/regexMatch.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$regexMatch" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/replaceAll", + "testClass" : "TestReplaceAll" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/replaceAll", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/replaceAll.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$replaceAll" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/replaceOne", + "testClass" : "TestReplaceOne" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/replaceOne", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/replaceOne.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$replaceOne" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/reverseArray", + "testClass" : "TestReverseArray" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/reverseArray", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/reverseArray.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$reverseArray" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/round", + "testClass" : "TestRound" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/round", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/round.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$round" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/rtrim", + "testClass" : "TestRtrim" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/rtrim", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/rtrim.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$rtrim" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/sampleRate", + "testClass" : "TestSampleRate" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/sampleRate", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/sampleRate.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$sampleRate" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/second", + "testClass" : "TestSecond" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/second", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/second.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$second" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/serializeEJSON", + "testClass" : "TestSerializeEJSON" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/serializeEJSON", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/serializeEJSON.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$serializeEJSON" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/setDifference", + "testClass" : "TestSetDifference" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/setDifference", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/setDifference.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$setDifference" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/setEquals", + "testClass" : "TestSetEquals" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/setEquals", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/setEquals.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$setEquals" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/setField", + "testClass" : "TestSetField" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/setField", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/setField.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$setField" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/setIntersection", + "testClass" : "TestSetIntersection" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/setIntersection", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/setIntersection.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$setIntersection" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/setIsSubset", + "testClass" : "TestSetIsSubset" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/setIsSubset", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/setIsSubset.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$setIsSubset" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/setUnion", + "testClass" : "TestSetUnion" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/setUnion", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/setUnion.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$setUnion" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/shift", + "testClass" : "TestShift" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/shift", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/shift.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$shift" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/sigmoid", + "testClass" : "TestSigmoid" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/sigmoid", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/sigmoid.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$sigmoid" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/similarityCosine", + "testClass" : "TestSimilarityCosine" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/similarityCosine", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/similarityCosine.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$similarityCosine" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/similarityDotProduct", + "testClass" : "TestSimilarityDotProduct" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/similarityDotProduct", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/similarityDotProduct.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$similarityDotProduct" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/similarityEuclidean", + "testClass" : "TestSimilarityEuclidean" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/similarityEuclidean", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/similarityEuclidean.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$similarityEuclidean" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/sin", + "testClass" : "TestSin" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/sin", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/sin.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$sin" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/sinh", + "testClass" : "TestSinh" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/sinh", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/sinh.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$sinh" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/size", + "testClass" : "TestSize" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/size", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/size.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$size" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/slice", + "testClass" : "TestSlice" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/slice", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/slice.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$slice" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/sortArray", + "testClass" : "TestSortArray" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/sortArray", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/sortArray.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$sortArray" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/split", + "testClass" : "TestSplit" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/split", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/split.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$split" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/sqrt", + "testClass" : "TestSqrt" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/sqrt", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/sqrt.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$sqrt" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/stdDevPop", + "testClass" : "TestStdDevPop" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/stdDevPop", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/stdDevPop.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$stdDevPop" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/stdDevSamp", + "testClass" : "TestStdDevSamp" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/stdDevSamp", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/stdDevSamp.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$stdDevSamp" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/strLenBytes", + "testClass" : "TestStrLenBytes" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/strLenBytes", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/strLenBytes.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$strLenBytes" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/strLenCP", + "testClass" : "TestStrLenCP" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/strLenCP", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/strLenCP.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$strLenCP" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/strcasecmp", + "testClass" : "TestStrcasecmp" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/strcasecmp", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/strcasecmp.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$strcasecmp" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/substr", + "testClass" : "TestSubstr" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/substr", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/substr.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$substr" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/substrBytes", + "testClass" : "TestSubstrBytes" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/substrBytes", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/substrBytes.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$substrBytes" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/substrCP", + "testClass" : "TestSubstrCP" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/substrCP", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/substrCP.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$substrCP" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/subtract", + "testClass" : "TestSubtract" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/subtract", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/subtract.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$subtract" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/subtype", + "testClass" : "TestSubtype" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/subtype", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/subtype.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$subtype" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/sum", + "testClass" : "TestSum" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/sum", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/sum.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$sum" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/switch", + "testClass" : "TestSwitch" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/switch", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/switch.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$switch" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/tan", + "testClass" : "TestTan" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/tan", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/tan.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$tan" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/tanh", + "testClass" : "TestTanh" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/tanh", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/tanh.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$tanh" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "degrees", "radians" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toArray", + "testClass" : "TestToArray" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toArray", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toArray.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toArray" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toBool", + "testClass" : "TestToBool" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toBool", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toBool.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toBool" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toDate", + "testClass" : "TestToDate" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toDate", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toDate.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toDate" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toDecimal", + "testClass" : "TestToDecimal" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toDecimal", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toDecimal.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toDecimal" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toDouble", + "testClass" : "TestToDouble" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toDouble", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toDouble.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toDouble" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toHashedIndexKey", + "testClass" : "TestToHashedIndexKey" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toHashedIndexKey", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toHashedIndexKey.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toHashedIndexKey" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toInt", + "testClass" : "TestToInt" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toInt", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toInt.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toInt" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toLong", + "testClass" : "TestToLong" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toLong", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toLong.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toLong" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toLower", + "testClass" : "TestToLower" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toLower", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toLower.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toLower" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toObject", + "testClass" : "TestToObject" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toObject", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toObject.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toObject" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toObjectId", + "testClass" : "TestToObjectId" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toObjectId", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toObjectId.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toObjectId" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toString", + "testClass" : "TestToString" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toString", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toString.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toString" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toUUID", + "testClass" : "TestToUUID" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toUUID", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toUUID.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toUUID" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/toUpper", + "testClass" : "TestToUpper" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/toUpper", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/toUpper.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$toUpper" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/top", + "testClass" : "TestTop" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/top", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/top.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$top" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/topN", + "testClass" : "TestTopN" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/topN", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/topN.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "GROUP_ACCUMULATOR", + "product" : "mongodb", + "token" : "$topN" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/trim", + "testClass" : "TestTrim" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/trim", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/trim.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$trim" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/trunc", + "testClass" : "TestTrunc" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/trunc", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/trunc.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$trunc" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/tsIncrement", + "testClass" : "TestTsIncrement" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/tsIncrement", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/tsIncrement.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$tsIncrement" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/tsSecond", + "testClass" : "TestTsSecond" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/tsSecond", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/tsSecond.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$tsSecond" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/type", + "testClass" : "TestType" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/type", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/type.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$type" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "example" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/unsetField", + "testClass" : "TestUnsetField" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/unsetField", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/unsetField.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$unsetField" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/week", + "testClass" : "TestWeek" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/week", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/week.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$week" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/year", + "testClass" : "TestYear" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/year", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/year.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$year" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/expressions/zip", + "testClass" : "TestZip" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/expressions/zip", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/zip.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "AGGREGATION_EXPRESSION", + "product" : "mongodb", + "token" : "$zip" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/addFields", + "testClass" : "TestAddFields" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/addFields", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/addFields.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$addFields" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/bucket", + "testClass" : "TestBucket" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/bucket", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/bucket.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$bucket" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/bucketAuto", + "testClass" : "TestBucketAuto" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/bucketAuto", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/bucketAuto.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$bucketAuto" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/changeStream", + "testClass" : "TestChangeStream" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/changeStream", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/changeStream.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$changeStream" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/changeStreamSplitLargeEvent", + "testClass" : "TestChangeStreamSplitLargeEvent" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/changeStreamSplitLargeEvent", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/changeStreamSplitLargeEvent.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$changeStreamSplitLargeEvent" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/collStats", + "testClass" : "TestCollStats" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/collStats", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/collStats.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$collStats" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/count", + "testClass" : "TestCount" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/count", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/count.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$count" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/currentOp", + "testClass" : "TestCurrentOp" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/currentOp", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/currentOp.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$currentOp" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/densify", + "testClass" : "TestDensify" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/densify", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/densify.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$densify" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/documents", + "testClass" : "TestDocuments" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/documents", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/documents.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$documents" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/facet", + "testClass" : "TestFacet" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/facet", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/facet.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$facet" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/fill", + "testClass" : "TestFill" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/fill", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/fill.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$fill" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/geoNear", + "testClass" : "TestGeoNear" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/geoNear", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/geoNear.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$geoNear" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/graphLookup", + "testClass" : "TestGraphLookup" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/graphLookup", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/graphLookup.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$graphLookup" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/group", + "testClass" : "TestGroup" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/group", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/group.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$group" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/indexStats", + "testClass" : "TestIndexStats" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/indexStats", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/indexStats.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$indexStats" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/limit", + "testClass" : "TestLimit" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/limit", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/limit.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$limit" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/listClusterCatalog", + "testClass" : "TestListClusterCatalog" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/listClusterCatalog", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/listClusterCatalog.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$listClusterCatalog" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/listLocalSessions", + "testClass" : "TestListLocalSessions" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/listLocalSessions", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/listLocalSessions.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$listLocalSessions" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/listSampledQueries", + "testClass" : "TestListSampledQueries" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/listSampledQueries", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/listSampledQueries.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$listSampledQueries" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/listSearchIndexes", + "testClass" : "TestListSearchIndexes" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/listSearchIndexes", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/listSearchIndexes.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$listSearchIndexes" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/listSessions", + "testClass" : "TestListSessions" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/listSessions", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/listSessions.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$listSessions" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/lookup", + "testClass" : "TestLookup" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/lookup", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/lookup.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$lookup" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "search", "searchmeta" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/match", + "testClass" : "TestMatch" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/match", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/match.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$match" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/merge", + "testClass" : "TestMerge" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/merge", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/merge.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$merge" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/out", + "testClass" : "TestOut" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/out", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/out.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$out" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/planCacheStats", + "testClass" : "TestPlanCacheStats" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/planCacheStats", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/planCacheStats.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$planCacheStats" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "classic-sample-output", "sbe-sample-output" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/project", + "testClass" : "TestProject" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/project", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/project.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$project" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/querySettings", + "testClass" : "TestQuerySettings" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/querySettings", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/querySettings.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$querySettings" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/queryStats", + "testClass" : "TestQueryStats" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/queryStats", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/queryStats.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$queryStats" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/rankFusion", + "testClass" : "TestRankFusion" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/rankFusion", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/rankFusion.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$rankFusion" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/redact", + "testClass" : "TestRedact" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/redact", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/redact.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$redact" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/replaceRoot", + "testClass" : "TestReplaceRoot" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/replaceRoot", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/replaceRoot.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$replaceRoot" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/replaceWith", + "testClass" : "TestReplaceWith" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/replaceWith", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/replaceWith.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$replaceWith" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/sample", + "testClass" : "TestSample" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/sample", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/sample.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$sample" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/scoreFusion", + "testClass" : "TestScoreFusion" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/scoreFusion", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/scoreFusion.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$scoreFusion" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/set", + "testClass" : "TestSet" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/set", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/set.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$set" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/setWindowFields", + "testClass" : "TestSetWindowFields" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/setWindowFields", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/setWindowFields.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$setWindowFields" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/shardedDataDistribution", + "testClass" : "TestShardedDataDistribution" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/shardedDataDistribution", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/shardedDataDistribution.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$shardedDataDistribution" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/skip", + "testClass" : "TestSkip" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/skip", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/skip.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$skip" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/sort", + "testClass" : "TestSort" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/sort", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/sort.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$sort" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/sortByCount", + "testClass" : "TestSortByCount" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/sortByCount", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/sortByCount.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$sortByCount" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/unionWith", + "testClass" : "TestUnionWith" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/unionWith", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/unionWith.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$unionWith" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ "search", "searchmeta" ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/unset", + "testClass" : "TestUnset" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/unset", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/unset.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$unset" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/aggregation/stages/unwind", + "testClass" : "TestUnwind" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "aggregation/stages/unwind", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/aggregation/unwind.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "PIPELINE_STAGE", + "product" : "mongodb", + "token" : "$unwind" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/all", + "testClass" : "TestAll" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/all", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/all.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$all" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/and", + "testClass" : "TestAnd" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/and", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/and.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$and" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/bitsAllClear", + "testClass" : "TestBitsAllClear" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/bitsAllClear", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/bitsAllClear.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$bitsAllClear" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/bitsAllSet", + "testClass" : "TestBitsAllSet" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/bitsAllSet", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/bitsAllSet.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$bitsAllSet" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/bitsAnyClear", + "testClass" : "TestBitsAnyClear" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/bitsAnyClear", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/bitsAnyClear.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$bitsAnyClear" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/bitsAnySet", + "testClass" : "TestBitsAnySet" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/bitsAnySet", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/bitsAnySet.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$bitsAnySet" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/box", + "testClass" : "TestBox" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/box", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/box.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$box" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/center", + "testClass" : "TestCenter" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/center", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/center.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$center" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/centerSphere", + "testClass" : "TestCenterSphere" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/centerSphere", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/centerSphere.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$centerSphere" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/elemMatch", + "testClass" : "TestElemMatch" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/elemMatch", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/elemMatch.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$elemMatch" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/eq", + "testClass" : "TestEq" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/eq", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/eq.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$eq" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/exists", + "testClass" : "TestExists" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/exists", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/exists.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$exists" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/expr", + "testClass" : "TestExpr" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/expr", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/expr.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$expr" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/geoIntersects", + "testClass" : "TestGeoIntersects" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/geoIntersects", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/geoIntersects.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$geoIntersects" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/geoWithin", + "testClass" : "TestGeoWithin" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/geoWithin", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/geoWithin.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$geoWithin" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/gt", + "testClass" : "TestGt" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/gt", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/gt.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$gt" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/gte", + "testClass" : "TestGte" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/gte", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/gte.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$gte" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/in", + "testClass" : "TestIn" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/in", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/in.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$in" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/jsonSchema", + "testClass" : "TestJsonSchema" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/jsonSchema", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/jsonSchema.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$jsonSchema" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/lt", + "testClass" : "TestLt" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/lt", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/lt.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$lt" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/lte", + "testClass" : "TestLte" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/lte", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/lte.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$lte" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/maxDistance", + "testClass" : "TestMaxDistance" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/maxDistance", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/maxDistance.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$maxDistance" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/minDistance", + "testClass" : "TestMinDistance" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/minDistance", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/minDistance.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$minDistance" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/mod", + "testClass" : "TestMod" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/mod", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/mod.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$mod" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/ne", + "testClass" : "TestNe" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/ne", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/ne.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$ne" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/near", + "testClass" : "TestNear" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/near", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/near.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$near" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/nearSphere", + "testClass" : "TestNearSphere" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/nearSphere", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/nearSphere.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$nearSphere" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/nin", + "testClass" : "TestNin" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/nin", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/nin.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$nin" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/nor", + "testClass" : "TestNor" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/nor", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/nor.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$nor" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/polygon", + "testClass" : "TestPolygon" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/polygon", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/polygon.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$polygon" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/regex", + "testClass" : "TestRegex" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/regex", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/regex.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$regex" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "sh" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/text", + "testClass" : "TestText" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/text", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/text.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$text" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/type", + "testClass" : "TestType" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/type", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/type.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$type" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/filters/where", + "testClass" : "TestWhere" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/filters/where", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/query/where.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "QUERY_PREDICATE", + "product" : "mongodb", + "token" : "$where" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ "bash" ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/addToSet", + "testClass" : "TestAddToSet" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/addToSet", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/addToSet.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$addToSet" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/bit", + "testClass" : "TestBit" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/bit", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/bit.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$bit" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/currentDate", + "testClass" : "TestCurrentDate" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/currentDate", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/currentDate.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$currentDate" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "example" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/each", + "testClass" : "TestEach" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/each", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/each.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$each" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/inc", + "testClass" : "TestInc" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/inc", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/inc.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$inc" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/max", + "testClass" : "TestMax" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/max", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/max.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$max" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/min", + "testClass" : "TestMin" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/min", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/min.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$min" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/mul", + "testClass" : "TestMul" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/mul", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/mul.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$mul" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/pop", + "testClass" : "TestPop" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/pop", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/pop.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$pop" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/position", + "testClass" : "TestPosition" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/position", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/position.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$position" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/positional", + "testClass" : "TestPositional" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/positional", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/positional.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/positional-all", + "testClass" : "TestPositionalAll" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/positional-all", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/positional-all.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$[]" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/positional-filtered", + "testClass" : "TestPositionalFiltered" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/positional-filtered", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/positional-filtered.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$[]" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/pull", + "testClass" : "TestPull" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/pull", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/pull.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$pull" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/pullAll", + "testClass" : "TestPullAll" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/pullAll", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/pullAll.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$pullAll" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/push", + "testClass" : "TestPush" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/push", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/push.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$push" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/rename", + "testClass" : "TestRename" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/rename", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/rename.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$rename" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ "examples" ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/set", + "testClass" : "TestSet" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/set", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/set.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$set" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/setOnInsert", + "testClass" : "TestSetOnInsert" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/setOnInsert", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/setOnInsert.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$setOnInsert" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/slice", + "testClass" : "TestSlice" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/slice", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/slice.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$slice" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/sort", + "testClass" : "TestSort" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/sort", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/sort.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$sort" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "examples" ] + }, { + "destination" : { + "resourceDirectory" : "dev/morphia/test/generated/query/updates/unset", + "testClass" : "TestUnset" + }, + "dialect" : "MONGOSH", + "excludedSections" : [ ], + "foreignLanguages" : [ "csharp", "python", "java", "go", "rust", "kotlin", "php", "ruby", "swift", "c", "cpp", "sql" ], + "foreignTabs" : [ "csharp", "nodejs", "python", "java-sync", "go", "php", "ruby", "rust", "kotlin", "swift", "c", "cpp", "motor", "scala", "perl", "compass" ], + "id" : "query/updates/unset", + "minimumReferenceGroups" : 1, + "page" : "reference/operator/update/unset.txt", + "referenceLanguages" : [ "javascript", "shell" ], + "referenceTabs" : [ "shell" ], + "resultOrder" : "ORDERED", + "scope" : { + "capability" : { + "facet" : null, + "key" : { + "context" : "UPDATE_OPERATOR", + "product" : "mongodb", + "token" : "$unset" + } + }, + "language" : "mongosh" + }, + "sectionAssembly" : { + "additionalShellLanguages" : [ ], + "layout" : "COMMANDS_THEN_RESULT", + "scenarioTabs" : [ ], + "sharedSetupSections" : [ ], + "unlabeledLanguage" : "javascript" + }, + "sections" : [ "example" ] + } ], + "schemaVersion" : 1 +} diff --git a/audits/discover.sh b/audits/discover.sh index 6c6206855bd..3cbc6982c75 100755 --- a/audits/discover.sh +++ b/audits/discover.sh @@ -2,7 +2,8 @@ # Usage: audits/discover.sh [--integrate] # # Report-only discovery of documented operator examples. In a throwaway worktree of HEAD it -# inventories the checkout's operator pages, diffs that inventory against the committed one, +# parses the checkout's operator pages with the pinned parser, inventories them under the committed +# scenario plan, diffs that inventory and a freshly drafted plan against the committed ones, # generates a candidate with its gaps and, with --integrate, runs the candidate's tests under both # mappers. It then compares the manual's capabilities with the accepted baseline (coverage.json). # Everything lands in , with summary.md on top; nothing in this checkout changes and @@ -28,24 +29,13 @@ generate() { -Dexec.args="$*" } -python3 audits/probes/form-sources/fetch.py local "$docs" "$out/current.json" "$out/pages" mvn install -pl :morphia-core -am -DskipTests -Ddeploy.skip=true -Dinvoker.skip=true mvn -Daudits -pl :morphia-audits compile -generate inventory "$tree" "$out/pages" "$out/current.json" -cp audits/catalog/documented-examples.json "$out/" -git diff -- audits/catalog/documented-examples.json > "$out/inventory.diff" - -mvn dependency:build-classpath -pl :morphia-core -Dmdep.outputFile="$out/core-classpath.txt" -generate candidate "$tree" "$out/candidate" "$out/core-classpath.txt" -status=0 -if [ "$integrate" = "--integrate" ]; then - generate integrate "$tree" "$out/candidate" || status=$? -fi +uv sync --frozen --project audits/parser -q +audit() { mvn -Daudits -pl :morphia-audits exec:java -Daudits.mainClass="$1" -Dexec.args="$2"; } +export MAVEN_OPTS=-Xmx8g -# Capability coverage against the accepted baseline: the operators, contexts and versions the -# manual declares at the checkout's commit, compared with audits/catalog/coverage-plan.json and -# core's API. Exit status 3 (PARTIAL) still writes a report; discovery problems are in it. -partial() { "$@" || [ $? -eq 3 ]; } +# The pinned source bundle of the checkout's manual, shared by the inventory and the coverage. python3 -I - "$docs" "$out/sources-request.json" <<'EOF' import json, subprocess, sys request = json.load(open("audits/config/manual-baseline-sources.json")) @@ -55,12 +45,41 @@ request["id"] = "manual-weekly" request["label"] = "weekly" json.dump(request, open(sys.argv[2], "w"), indent=2) EOF -uv sync --frozen --project audits/parser -q -audit() { mvn -Daudits -pl :morphia-audits exec:java -Daudits.mainClass="$1" -Dexec.args="$2"; } audit dev.morphia.audits.sources.SourcesMainKt "$out/sources-request.json $out/bundle --repository $docs" \ > "$out/sources.json" content=$(python3 -I -c 'import json,sys; print(json.load(open(sys.argv[1]))["manifest"]["contentSha256"])' "$out/sources.json") -export MAVEN_OPTS=-Xmx6g + +# The operator pages, parsed, then inventoried under the committed plan. A drafted plan that +# differs names pages the committed one lacks or reads differently. +pages=$(python3 -I - "$out/sources.json" <<'EOF' +import json, re, sys +manifest = json.load(open(sys.argv[1]))["manifest"] +source = manifest["request"]["projectRoot"] + "/source/" +print(" ".join(sorted(r["path"][len(source):] for r in manifest["resources"] + if re.fullmatch(re.escape(source) + r"reference/operator/(aggregation|query|update)/[^/]+\.txt", r["path"])))) +EOF +) +partial() { "$@" || [ $? -eq 3 ]; } +# shellcheck disable=SC2086 +partial audit dev.morphia.audits.documents.DocumentsMainKt \ + "$out/bundle $content $tree/audits/parser/.venv/bin/python $tree/audits/parser/adapter.py $pages" \ + > "$out/documents.json" +generate inventory "$tree" "$out/bundle" "$content" "$out/documents.json" +generate plan "$tree" "$out/bundle" "$content" "$out/documents.json" +cp audits/catalog/documented-examples.json audits/catalog/scenario-plan.json "$out/" +git diff -- audits/catalog/documented-examples.json > "$out/inventory.diff" +git diff -- audits/catalog/scenario-plan.json > "$out/plan.diff" + +mvn dependency:build-classpath -pl :morphia-core -Dmdep.outputFile="$out/core-classpath.txt" +generate candidate "$tree" "$out/candidate" "$out/core-classpath.txt" +status=0 +if [ "$integrate" = "--integrate" ]; then + generate integrate "$tree" "$out/candidate" || status=$? +fi + +# Capability coverage against the accepted baseline: the operators, contexts and versions the +# manual declares at the checkout's commit, compared with audits/catalog/coverage-plan.json and +# core's API. Exit status 3 (PARTIAL) still writes a report; discovery problems are in it. partial audit dev.morphia.audits.discovery.DiscoveryMainKt \ "$out/bundle $content --parse $tree/audits/parser/.venv/bin/python $tree/audits/parser/adapter.py $tree/audits/catalog/discovery-plan.json" \ > "$out/discovery.json" @@ -91,6 +110,9 @@ lines += [f"| {key} | {value} |" for key, value in sorted(inventory["summary"].i changed = os.path.getsize(os.path.join(out, "inventory.diff")) > 0 lines += ["", "The inventory " + ("**differs** from the committed one; see `inventory.diff`." if changed else "matches the committed one.")] +drafted = os.path.getsize(os.path.join(out, "plan.diff")) > 0 +lines += ["", "A drafted scenario plan " + ("**differs** from the committed one; see `plan.diff`." + if drafted else "matches the committed one.")] skipped = collections.Counter(page["detail"].split(":")[0] for page in inventory["skipped"]) lines += ["", "## Skipped pages", ""] + [f"- {count}: {reason}" for reason, count in skipped.most_common()] lines += ["", "## Gaps", ""] diff --git a/audits/src/main/kotlin/dev/morphia/audits/coverage/AuditJson.kt b/audits/src/main/kotlin/dev/morphia/audits/coverage/AuditJson.kt index f6ab908dc7e..b5740b7439c 100644 --- a/audits/src/main/kotlin/dev/morphia/audits/coverage/AuditJson.kt +++ b/audits/src/main/kotlin/dev/morphia/audits/coverage/AuditJson.kt @@ -22,7 +22,6 @@ import dev.morphia.audits.discovery.DiscoveryReport import dev.morphia.audits.documents.DocumentReport import dev.morphia.audits.generate.Attestation import dev.morphia.audits.generate.Candidate -import dev.morphia.audits.generate.CurrentPages import dev.morphia.audits.generate.DslBindingCatalog import dev.morphia.audits.generate.ExampleInventory import dev.morphia.audits.generate.GenerationGaps @@ -195,8 +194,6 @@ object AuditJson { fun attestation(json: String): Attestation = read(json, Attestation::class.java) - fun currentPages(json: String): CurrentPages = read(json, CurrentPages::class.java) - fun dslBindings(json: String): DslBindingCatalog = read(json, DslBindingCatalog::class.java) fun generationReview(json: String): GenerationReview = read(json, GenerationReview::class.java) diff --git a/audits/src/main/kotlin/dev/morphia/audits/documents/DocumentsMain.kt b/audits/src/main/kotlin/dev/morphia/audits/documents/DocumentsMain.kt index ea0383c80d3..0ba1ddddf31 100644 --- a/audits/src/main/kotlin/dev/morphia/audits/documents/DocumentsMain.kt +++ b/audits/src/main/kotlin/dev/morphia/audits/documents/DocumentsMain.kt @@ -17,6 +17,9 @@ fun main(args: Array) { args.drop(4), Path.of(args[2]), Path.of(args[3]), + // Every operator page parses in one run of a few minutes. + timeoutSeconds = 600, + maximumOutputBytes = 128L * 1024 * 1024, ) System.out.write(AuditJson.write(report).toByteArray(Charsets.UTF_8)) System.out.flush() diff --git a/audits/src/main/kotlin/dev/morphia/audits/generate/CaseGenerator.kt b/audits/src/main/kotlin/dev/morphia/audits/generate/CaseGenerator.kt index d2e255a04da..88f12f9aa12 100644 --- a/audits/src/main/kotlin/dev/morphia/audits/generate/CaseGenerator.kt +++ b/audits/src/main/kotlin/dev/morphia/audits/generate/CaseGenerator.kt @@ -130,7 +130,13 @@ object CaseGenerator { page.examples.forEach { example -> fun gap(kind: GapKind, detail: String) { gaps += - GenerationGap(page.context, page.operator, example.title, kind, detail) + GenerationGap( + page.context, + page.operator, + example.name ?: example.title, + kind, + detail, + ) } when (example.status) { ExampleStatus.OWNED -> return@forEach @@ -138,6 +144,8 @@ object CaseGenerator { return@forEach gap(GapKind.UNNAMED, example.detail ?: "") ExampleStatus.AMBIGUOUS -> return@forEach gap(GapKind.AMBIGUOUS, example.detail ?: "") + ExampleStatus.UNSUPPORTED -> + return@forEach gap(GapKind.SOURCE_UNSUPPORTED, example.detail ?: "") ExampleStatus.UNOWNED -> Unit } val stem = example.stem!! @@ -467,6 +475,9 @@ object CaseGenerator { BindingForm.PROJECTION -> { if (!argument.isDocument) throw Unbound("$path: ${binding.operator} takes a document") + // The projection writes a suppressed _id first, wherever the page put it. + if (argument.asDocument().keys.indexOf("_id") > 0) + rules += FormRule.PROJECT_ID_FIRST factory.format("") + argument.asDocument().entries.joinToString("") { (field, each) -> val flag = flag(each) diff --git a/audits/src/main/kotlin/dev/morphia/audits/generate/DocumentedExamples.kt b/audits/src/main/kotlin/dev/morphia/audits/generate/DocumentedExamples.kt index 7a47b5f62bc..47c26f46846 100644 --- a/audits/src/main/kotlin/dev/morphia/audits/generate/DocumentedExamples.kt +++ b/audits/src/main/kotlin/dev/morphia/audits/generate/DocumentedExamples.kt @@ -2,13 +2,22 @@ package dev.morphia.audits.generate import com.fasterxml.jackson.annotation.JsonInclude import dev.morphia.audits.coverage.AuditJson -import dev.morphia.audits.model.OperatorType +import dev.morphia.audits.documents.DocumentReport import dev.morphia.audits.naming.DescriptiveNames import dev.morphia.audits.repairs.BlockRole +import dev.morphia.audits.repairs.CaseManifests import dev.morphia.audits.repairs.FormInclude -import dev.morphia.audits.repairs.FormMigration import dev.morphia.audits.repairs.FormSource import dev.morphia.audits.repairs.SourceBlock +import dev.morphia.audits.scenarios.ExtractedScenario +import dev.morphia.audits.scenarios.ScenarioCode +import dev.morphia.audits.scenarios.ScenarioExtraction +import dev.morphia.audits.scenarios.ScenarioExtractionPlan +import dev.morphia.audits.scenarios.ScenarioPageRule +import dev.morphia.audits.scenarios.ScenarioVariant +import dev.morphia.audits.shell.ProgramRole +import dev.morphia.audits.shell.ShellLiteralState +import dev.morphia.audits.sources.VerifiedSourceBundle import java.nio.file.Files import java.nio.file.Path import kotlin.io.path.isDirectory @@ -28,6 +37,8 @@ enum class ExampleStatus { * its source blocks for the review that resolves it. */ AMBIGUOUS, + /** No test owns the example, and the extractor found no program to generate it from. */ + UNSUPPORTED, } /** @@ -98,26 +109,20 @@ object DocumentedExamples { private const val RESOURCES = "core/src/test/resources/dev/morphia/test" private const val LEDGER = "audits/catalog/fixture-migration.json" const val REVIEWED = "audits/catalog/example-names.json" - private val DIRECTIVES = - mapOf( - "expression" to "aggregation/expressions", - // Accumulator and window operator pages; Morphia's tests keep them with the - // expressions. - "group" to "aggregation/expressions", - "pipeline" to "aggregation/stages", - "query" to "query/filters", - "update" to "query/updates", - ) - private val directive = Regex("""^\.\. (expression|group|pipeline|query|update):: \$\S*\s*$""") /** An owned example: its fixture, its title when recorded, and its action text. */ private data class Owned(val fixture: String, val title: String?, val action: String?) /** - * Reads every page of [sources] (a `fetch.py current` file) from [pages] and matches each - * example with the fixtures of [repository]'s legacy packages and migration ledger. + * Extracts every operator page [plan] names from the parsed [document] of [bundle], and matches + * each example with the fixtures of [repository]'s legacy packages and migration ledger. */ - fun capture(repository: Path, pages: Path, sources: CurrentPages): ExampleInventory { + fun capture( + repository: Path, + bundle: VerifiedSourceBundle, + document: DocumentReport, + plan: ScenarioExtractionPlan, + ): ExampleInventory { val root = repository.toRealPath() val owned = owned(root).groupBy { it.fixture.substringBeforeLast('/') } val reviewed = @@ -131,51 +136,53 @@ object DocumentedExamples { "${it.page} ${it.title}: a review names an example or its owner, with a reason" } } + val manifest = bundle.manifest + val commit = manifest.request.revision + val blobs = manifest.resources.associate { it.path to it.gitObject } + val report = ScenarioExtraction.extract(bundle, document, plan) + val rules = plan.pages.associateBy { it.id } val used = mutableSetOf() val documented = mutableListOf() - val skipped = mutableListOf() - sources.pages.forEach { entry -> - val source = entry.source - require(source.commit == sources.commit) { - "${source.path} is not at ${sources.commit}" - } - val file = pages.resolve(source.commit).resolve(source.path) - val declared = - file.readText().lines().firstNotNullOfOrNull { directive.matchEntire(it.trimEnd()) } - if (declared == null) { - skipped += SkippedPage(source.path, "no operator directive") + val operators = ScenarioPlans.operatorPages(document) + val skipped = + document.pages + .filter { page -> operators.none { it.page.id == page.id } } + .map { SkippedPage(it.id, "no operator directive") } + .toMutableList() + operators.forEach { operator -> + val rule = rules[operator.id] + val path = operator.page.expanded?.origin?.path + if (rule == null || path == null) { + skipped += SkippedPage(operator.page.id, "no examples section") return@forEach } - val context = DIRECTIVES.getValue(declared.groupValues[1]) - // The page's file name, as the legacy fixture directories use it: `$[]` is - // `positional-all`. - val operator = source.path.substringAfterLast('/').removeSuffix(".txt") - val type = - when (context) { - "aggregation/expressions" -> OperatorType.EXPRESSION - "aggregation/stages" -> OperatorType.STAGE - "query/filters" -> OperatorType.FILTER - else -> OperatorType.UPDATE - } - val read = - try { - FormMigration.pageExamples(pages, source, type) - } catch (failure: RuntimeException) { - skipped += SkippedPage(source.path, failure.message ?: "$failure") - return@forEach - } - val candidates = owned["$context/$operator"].orEmpty() + val scenarios = + report.scenarios + .filter { it.rule == rule.id && it.variant == ScenarioVariant.REFERENCE } + .sortedWith { a, b -> compareLocators(position(a), position(b)) } documented += DocumentedPage( - context, - operator, - source, - read.pageBlob, - read.includes, + operator.context, + operator.operator, + FormSource(commit, path), + blobs.getValue(path), + operator.page.dependencies + .mapNotNull { it.origin.path } + .distinct() + .filter { it in blobs } + .map { FormInclude(it, blobs.getValue(it)) }, examples( - read.examples.map { it.name to it.blocks }, - candidates, - reviewed.filter { it.page == "$context/$operator" }, + // A page that repeats an example, say for a second user, shows it once. + scenarios + .map { title(it, rule) to blocks(it) } + .distinctBy { (title, example) -> + // The same example: the same title, source and state. Examples + // without an action are never the same one. + if (example.blocks.none { it.role == BlockRole.ACTION }) Any() + else Triple(title, example.blocks, example.problem) + }, + owned[operator.id].orEmpty(), + reviewed.filter { it.page == operator.id }, used, ), ) @@ -183,7 +190,7 @@ object DocumentedExamples { val examples = documented.flatMap { it.examples } return ExampleInventory( sourceRepository = "mongodb/docs", - commit = sources.commit, + commit = commit, pages = documented.sortedWith(compareBy({ it.context }, { it.operator })), skipped = skipped.sortedBy { it.path }, summary = @@ -199,18 +206,113 @@ object DocumentedExamples { ) } + /** + * An example's title as the legacy inventory spelled it: its section's, `main` for a generic + * one, and `
:: ` for an example a scenario tab shows. + */ + private fun title(scenario: ExtractedScenario, rule: ScenarioPageRule): String { + // The first section is the page's own. + val section = + scenario.sections + .drop(1) + .lastOrNull() + ?.title + ?.trim() + ?.takeUnless(DescriptiveNames::isGeneric) ?: "main" + val tab = + scenario.containers.lastOrNull { + it.name == "tab" && + it.options["tabid"]?.let(AuditJson::textValue) in + rule.sectionAssembly?.scenarioTabs.orEmpty() + } + return if (tab == null) section else "$section :: ${tab.argument.trim()}" + } + + /** + * The scenario's blocks as generation reads them, or none when it has no program to generate: + * inserts and seeds are data, index builds are indexes, and declarations travel with the action + * they serve. + */ + private fun blocks(scenario: ExtractedScenario): Unrunnable { + val problem = + scenario.normalizationProblem + ?: scenario.program + ?.takeIf { it.state != ShellLiteralState.NORMALIZED } + ?.let { program -> program.problems.joinToString { it.code } } + fun declaration(code: ScenarioCode) = + code.role == ProgramRole.SETUP && + code.format == null && + ".insert" !in code.source && + ".createIndex" !in code.source + // Each declaration travels with the next block that runs, in page order: the insert or + // action that reads it. + val pending = mutableListOf() + val blocks = + scenario.blocks + .filter { it.role != null } + .mapNotNull { code -> + if (declaration(code)) { + pending += code.source + return@mapNotNull null + } + val role = + when (code.role) { + ProgramRole.ACTION -> BlockRole.ACTION + ProgramRole.EXPECTED -> BlockRole.EXPECTED + else -> + if (code.format == null && ".createIndex" in code.source) + BlockRole.INDEX + else BlockRole.DATA + } + val runs = role != BlockRole.EXPECTED && code.format == null + val text = + if (runs && pending.isNotEmpty()) + (pending + code.source).joinToString("\n").also { pending.clear() } + else code.source + SourceBlock(role, text, CaseManifests.sha256(text.toByteArray())) + } + // Until an update's case runs the page's own read, generation keeps the legacy reading of + // what the page prints after it: an acknowledgement, or the documents the filter matches. + val printed = + scenario.skipped + .firstOrNull { it.reason == "UPDATE_RESULT" } + ?.code + ?.source + ?.takeIf { scenario.blocks.any { it.role == ProgramRole.ACTION } } + ?.let { + SourceBlock(BlockRole.EXPECTED, it, CaseManifests.sha256(it.toByteArray())) + } + return Unrunnable( + blocks + listOfNotNull(printed), + problem ?: "no program".takeIf { scenario.program == null }, + ) + } + + /** A scenario's source blocks, and why it has no program when it hasn't. */ + private data class Unrunnable(val blocks: List, val problem: String?) + + /** Where a scenario's action sits on its page, so examples keep the page's order. */ + private fun position(scenario: ExtractedScenario): List = + (scenario.blocks.firstOrNull { it.role == ProgramRole.ACTION } ?: scenario.blocks.first()) + .locator + + private fun compareLocators(a: List, b: List): Int { + a.zip(b).forEach { (x, y) -> if (x != y) return x.compareTo(y) } + return a.size.compareTo(b.size) + } + /** * Assigns each of a page's examples its owner or status; first by title, then by action text. */ private fun examples( - read: List>>, + read: List>, owners: List, reviewed: List, used: MutableSet, ): List { val reviews = - read.map { (title, blocks) -> - val action = blocks.firstOrNull { it.role == BlockRole.ACTION }?.sha256 + read.map { (title, example) -> + val action = example.blocks.firstOrNull { it.role == BlockRole.ACTION }?.sha256 reviewed.singleOrNull { it.title == title && it.actionSha256 == action } } used += reviews.filterNotNull() @@ -221,87 +323,143 @@ object DocumentedExamples { if (DescriptiveNames.isGeneric(title)) null else runCatching { DescriptiveNames.stem(title) }.getOrNull() } - return read.mapIndexed { index, (title, blocks) -> - val review = reviews[index] - val name = review?.name - val action = blocks.firstOrNull { it.role == BlockRole.ACTION }?.text?.let(::squeeze) - val byTitle = owners.filter { it.title == title || name != null && it.title == name } - val byAction = - if (byTitle.isNotEmpty() || action == null) emptyList() - else owners.filter { it.action != null && it.action in action } - val stem = stems[index] - // The descriptive-name backport named each fixture for its example, so a fixture with - // the example's name owns it even when the title or action text has changed since. - val byName = - if (byTitle.isNotEmpty() || byAction.isNotEmpty() || stem == null) emptyList() - else owners.filter { it.fixture.substringAfterLast('/') == stem } - val matched = byTitle.ifEmpty { byAction }.ifEmpty { byName } - when { - review?.owner != null -> - if (matched.any { it.fixture == review.owner }) + val matched = + read.mapIndexed { index, (title, example) -> + val blocks = example.blocks + val review = reviews[index] + val name = review?.name + val action = + blocks.firstOrNull { it.role == BlockRole.ACTION }?.text?.let(::squeeze) + // Examples that share a section's title are told apart by their action text alone. + // Another runnable example with the title takes it from this one, runnable or not. + val shared = + names.indices.any { + it != index && names[it] == names[index] && read[it].second.problem == null + } + // A title several runnable examples share names none of them, even once reviewed + // names tell them apart. + // An example without a program yields the title to any other. + val titled = + read.indices.none { + it != index && + read[it].first == title && + (read[it].second.problem == null || example.problem != null) + } + val byTitle = + if (shared) emptyList() + else + owners.filter { + titled && it.title == title || name != null && it.title == name + } + val byAction = + if (byTitle.isNotEmpty() || action == null) emptyList() + else owners.filter { it.action != null && it.action in action } + val stem = stems[index] + // The descriptive-name backport named each fixture for its example, so a fixture + // with + // the example's name owns it even when the title or action text has changed since. + val byName = + if (byTitle.isNotEmpty() || byAction.isNotEmpty() || stem == null || shared) + emptyList() + else owners.filter { it.fixture.substringAfterLast('/') == stem } + val matched = byTitle.ifEmpty { byAction }.ifEmpty { byName } + when { + review?.owner != null -> + if (matched.any { it.fixture == review.owner }) + DocumentedExample( + title, + ExampleStatus.OWNED, + owner = review.owner, + detail = "reviewed owner: ${review.reason}", + ) + else + DocumentedExample( + title, + ExampleStatus.AMBIGUOUS, + detail = "the reviewed owner ${review.owner} no longer matches", + ) + matched.size > 1 -> + DocumentedExample( + title, + ExampleStatus.AMBIGUOUS, + detail = "matches ${matched.joinToString { it.fixture }}", + blocks = blocks, + ) + matched.size == 1 -> DocumentedExample( title, ExampleStatus.OWNED, - owner = review.owner, - detail = "reviewed owner: ${review.reason}", + owner = matched.single().fixture, + detail = + when { + byTitle.isNotEmpty() -> null + byAction.isNotEmpty() -> "matched by action text" + else -> "matched by name" + }, + name = name, ) - else + example.problem != null -> + DocumentedExample( + title, + ExampleStatus.UNSUPPORTED, + stem, + detail = example.problem, + blocks = blocks, + name = name, + ) + shared -> DocumentedExample( title, ExampleStatus.AMBIGUOUS, - detail = "the reviewed owner ${review.owner} no longer matches", + detail = "the page has several examples titled \"$title\"", + blocks = blocks, ) - names.count { it == names[index] } > 1 -> - DocumentedExample( - title, - ExampleStatus.AMBIGUOUS, - detail = "the page has several examples titled \"$title\"", - blocks = blocks, - ) - matched.size > 1 -> - DocumentedExample( - title, - ExampleStatus.AMBIGUOUS, - detail = "matches ${matched.joinToString { it.fixture }}", - blocks = blocks, - ) - matched.size == 1 -> - DocumentedExample( - title, - ExampleStatus.OWNED, - owner = matched.single().fixture, - detail = - when { - byTitle.isNotEmpty() -> null - byAction.isNotEmpty() -> "matched by action text" - else -> "matched by name" - }, - name = name, - ) - stem == null -> - DocumentedExample( - title, - ExampleStatus.UNNAMED, - detail = "a generic title needs a reviewed name", - blocks = blocks, - ) - stems.count { it == stem } > 1 -> - DocumentedExample( - title, - ExampleStatus.AMBIGUOUS, - stem, - detail = "another example on the page has the name $stem", - name = name, - ) - else -> - DocumentedExample( - title, - ExampleStatus.UNOWNED, - stem, - blocks = blocks, - name = name, - ) + stem == null -> + DocumentedExample( + title, + ExampleStatus.UNNAMED, + detail = "a generic title needs a reviewed name", + blocks = blocks, + ) + stems.indices.any { + it != index && stems[it] == stem && read[it].second.problem == null + } -> + DocumentedExample( + title, + ExampleStatus.AMBIGUOUS, + stem, + detail = "another example on the page has the name $stem", + name = name, + ) + else -> + DocumentedExample( + title, + ExampleStatus.UNOWNED, + stem, + blocks = blocks, + name = name, + ) + } } + // One fixture can't own two examples; the review decides which, as for any other match. + val claimed = + matched + .filter { it.detail?.startsWith("reviewed owner") != true } + .mapNotNull { it.owner } + .groupingBy { it } + .eachCount() + .filterValues { it > 1 } + .keys + return matched.mapIndexed { index, example -> + if (example.owner !in claimed || example.detail?.startsWith("reviewed owner") == true) + example + else + DocumentedExample( + example.title, + ExampleStatus.AMBIGUOUS, + detail = "${example.owner} matches several examples", + blocks = read[index].second.blocks, + ) } } @@ -324,7 +482,7 @@ object DocumentedExamples { } val known = migrated.map { it.fixture }.toSet() val legacy = - DIRECTIVES.values.distinct().flatMap { context -> + OperatorPage.CONTEXTS.values.distinct().flatMap { context -> val base = root.resolve("$RESOURCES/$context") if (!base.isDirectory()) emptyList() else @@ -365,10 +523,3 @@ object DocumentedExamples { } /** A `fetch.py current` sources file: every operator page at one commit. */ -data class CurrentPages( - val schemaVersion: Int = 1, - val commit: String, - val pages: List, -) - -data class CurrentPage(val source: FormSource) diff --git a/audits/src/main/kotlin/dev/morphia/audits/generate/GenerateMain.kt b/audits/src/main/kotlin/dev/morphia/audits/generate/GenerateMain.kt index dcbd6c4ceae..8f2b7b73bae 100644 --- a/audits/src/main/kotlin/dev/morphia/audits/generate/GenerateMain.kt +++ b/audits/src/main/kotlin/dev/morphia/audits/generate/GenerateMain.kt @@ -2,12 +2,17 @@ package dev.morphia.audits.generate import dev.morphia.audits.api.MorphiaApiInventory import dev.morphia.audits.coverage.AuditJson +import dev.morphia.audits.repairs.CaseManifests +import dev.morphia.audits.sources.SourceBundle import java.io.File import java.nio.file.Files import java.nio.file.Path +private const val CAPABILITY_CATALOG = "audits/catalog/capability-catalog.json" + private const val USAGE = - """Usage: GenerateMainKt inventory + """Usage: GenerateMainKt plan + GenerateMainKt inventory GenerateMainKt candidate GenerateMainKt integrate GenerateMainKt promote """ @@ -36,23 +41,28 @@ private fun verifyBindings(root: Path, revision: String, classpath: Path) { } /** - * Inventories the documented examples of fetched pages (`fetch.py current`, then `fetch.py pages`) - * into `audits/catalog/documented-examples.json`. Checks the DSL bindings, then generates a + * Drafts the scenario plan of parsed operator pages (`DocumentsMainKt` over a source bundle) into + * `audits/catalog/scenario-plan.json`, or inventories their documented examples under the committed + * plan into `audits/catalog/documented-examples.json`. Checks the DSL bindings, then generates a * candidate of the operator-case namespace into ``, integrates it in a temporary worktree * (writing `/attestation.json` and `/integration.log`), and promotes an attested * candidate into a checkout that still matches its base. */ fun main(args: Array) { - if (args.firstOrNull() == "inventory") { - require(args.size == 4) { USAGE } + if (args.firstOrNull() in setOf("plan", "inventory")) { + require(args.size == 5) { USAGE } val root = Path.of(args[1]) - val inventory = - DocumentedExamples.capture( - root, - Path.of(args[2]), - AuditJson.currentPages(Files.readString(Path.of(args[3]))), - ) - Files.writeString(root.resolve(DocumentedExamples.PATH), AuditJson.write(inventory)) + val bundle = SourceBundle.open(Path.of(args[2]), args[3]) + val document = AuditJson.documents(Files.readString(Path.of(args[4]))) + if (args[0] == "plan") { + val catalog = Files.readAllBytes(root.resolve(CAPABILITY_CATALOG)) + val plan = ScenarioPlans.draft(document, CaseManifests.sha256(catalog)) + Files.writeString(root.resolve(ScenarioPlans.PATH), AuditJson.write(plan)) + } else { + val plan = AuditJson.scenarioPlan(Files.readString(root.resolve(ScenarioPlans.PATH))) + val inventory = DocumentedExamples.capture(root, bundle, document, plan) + Files.writeString(root.resolve(DocumentedExamples.PATH), AuditJson.write(inventory)) + } return } require(args.size == if (args.firstOrNull() == "candidate") 4 else 3) { USAGE } diff --git a/audits/src/main/kotlin/dev/morphia/audits/generate/ScenarioPlans.kt b/audits/src/main/kotlin/dev/morphia/audits/generate/ScenarioPlans.kt new file mode 100644 index 00000000000..bed0d261c3d --- /dev/null +++ b/audits/src/main/kotlin/dev/morphia/audits/generate/ScenarioPlans.kt @@ -0,0 +1,220 @@ +package dev.morphia.audits.generate + +import dev.morphia.audits.coverage.AuditJson +import dev.morphia.audits.coverage.CapabilityKey +import dev.morphia.audits.coverage.CapabilityRef +import dev.morphia.audits.coverage.OperatorContext +import dev.morphia.audits.documents.DocumentNode +import dev.morphia.audits.documents.DocumentPage +import dev.morphia.audits.documents.DocumentReport +import dev.morphia.audits.naming.ExampleDestination +import dev.morphia.audits.naming.ScenarioScope +import dev.morphia.audits.scenarios.ScenarioExtractionPlan +import dev.morphia.audits.scenarios.ScenarioPageRule +import dev.morphia.audits.scenarios.SectionAssemblyPolicy +import dev.morphia.audits.scenarios.SectionLayout +import dev.morphia.audits.semantics.ResultOrder +import dev.morphia.audits.shell.ShellDialect + +/** + * An operator page as its parsed source declares it: the `.. expression:: $add` target gives the + * operator's [token] and [kind] (`expression`, `group`, `pipeline`, `query` or `update`). [context] + * is the legacy package Morphia's tests keep it in, and [operator] the page's file name. + */ +data class OperatorPage(val page: DocumentPage, val kind: String, val token: String) { + val context: String = CONTEXTS.getValue(kind) + val operator: String = page.id.substringAfterLast('/').removeSuffix(".txt") + val id: String = "$context/$operator" + + companion object { + val CONTEXTS = + mapOf( + "expression" to "aggregation/expressions", + // Accumulator and window operator pages; Morphia's tests keep them with the + // expressions. + "group" to "aggregation/expressions", + "pipeline" to "aggregation/stages", + "query" to "query/filters", + "update" to "query/updates", + ) + } +} + +/** + * Drafts the scenario extraction plan, `audits/catalog/scenario-plan.json`, from the parsed + * operator pages. The plan is reviewed policy: a draft is committed only after its diff is read, + * and the inventory extracts only the pages it names. + */ +object ScenarioPlans { + const val PATH = "audits/catalog/scenario-plan.json" + + private val SCOPES = + mapOf( + "expression" to OperatorContext.AGGREGATION_EXPRESSION, + "group" to OperatorContext.GROUP_ACCUMULATOR, + "pipeline" to OperatorContext.PIPELINE_STAGE, + "query" to OperatorContext.QUERY_PREDICATE, + "update" to OperatorContext.UPDATE_OPERATOR, + ) + private val REFERENCE_LANGUAGES = listOf("javascript", "shell") + private val REFERENCE_TABS = listOf("shell") + private val FOREIGN_LANGUAGES = + listOf( + "csharp", + "python", + "java", + "go", + "rust", + "kotlin", + "php", + "ruby", + "swift", + "c", + "cpp", + // Pages show a query's SQL equivalent beside the shell. + "sql", + ) + private val FOREIGN_TABS = + listOf( + "csharp", + "nodejs", + "python", + "java-sync", + "go", + "php", + "ruby", + "rust", + "kotlin", + "swift", + "c", + "cpp", + "motor", + "scala", + "perl", + "compass", + ) + + /** The pages of [document] that declare one operator, with the declaration. */ + fun operatorPages(document: DocumentReport): List = + document.pages.mapNotNull { page -> + val tree = page.expanded ?: return@mapNotNull null + val target = + descendants(tree).firstOrNull { + it.kind == "target" && it.domain == "mongodb" && it.name in SCOPES + } ?: return@mapNotNull null + val token = + descendants(target) + .firstOrNull { it.kind == "target_identifier" } + ?.let(::text) + ?.trim() + ?.takeIf { it.isNotEmpty() } ?: return@mapNotNull null + OperatorPage(page, target.name!!, token) + } + + /** A rule for each operator page with an examples section; the others have nothing to run. */ + fun draft(document: DocumentReport, catalogSha256: String): ScenarioExtractionPlan = + ScenarioExtractionPlan( + catalogSha256 = catalogSha256, + pages = operatorPages(document).sortedBy { it.id }.mapNotNull { rule(it) }, + ) + + private fun rule(operator: OperatorPage): ScenarioPageRule? { + val tree = operator.page.expanded!! + val examples = + sections(tree).firstOrNull { section -> + anchor(section).let { + it == "examples" || + it == "example" || + it.startsWith("example") && it.length < 12 + } + } ?: return null + val anchor = anchor(examples) + val codes = descendants(tree).filter { it.kind == "code" } + val tabs = + descendants(tree) + .filter { it.kind == "directive" && it.name == "tab" } + .mapNotNull { tab -> tab.options["tabid"]?.let(::textValue) } + .toSet() + val languages = codes.mapNotNull { it.attributes["lang"]?.let(::textValue) }.toSet() + return ScenarioPageRule( + id = operator.id, + page = operator.page.id, + scope = + ScenarioScope( + CapabilityRef( + CapabilityKey("mongodb", SCOPES.getValue(operator.kind), operator.token), + null, + ), + "mongosh", + ), + destination = + ExampleDestination( + "Test" + + operator.operator.split('-').joinToString("") { part -> + part.replaceFirstChar { it.uppercase() } + }, + "dev/morphia/test/generated/${operator.id}", + ), + sections = listOf(anchor), + excludedSections = emptyList(), + minimumReferenceGroups = 1, + referenceLanguages = REFERENCE_LANGUAGES, + referenceTabs = REFERENCE_TABS, + foreignLanguages = FOREIGN_LANGUAGES, + foreignTabs = FOREIGN_TABS, + dialect = ShellDialect.MONGOSH, + resultOrder = ResultOrder.ORDERED, + sectionAssembly = + SectionAssemblyPolicy( + SectionLayout.COMMANDS_THEN_RESULT, + // An examples section with its own code ahead of its subsections shares it; + // without subsections, its code is the example. + sharedSetupSections = + if (ownCode(examples) && sections(examples).count() > 1) listOf(anchor) + else emptyList(), + // Tabs other than the shell and the drivers are variants of one example, such + // as radians and degrees. + scenarioTabs = (tabs - FOREIGN_TABS.toSet() - REFERENCE_TABS.toSet()).sorted(), + // Pages that highlight shell code as bash or sh. + additionalShellLanguages = (languages intersect setOf("bash", "sh")).sorted(), + unlabeledLanguage = "javascript", + ), + ) + } + + private fun descendants(node: DocumentNode): Sequence = sequence { + yield(node) + node.children.forEach { yieldAll(descendants(it)) } + } + + private fun sections(node: DocumentNode) = descendants(node).filter { it.kind == "section" } + + private fun anchor(section: DocumentNode) = + section.children + .firstOrNull { it.kind == "heading" } + ?.attributes + ?.get("id") + ?.let(::textValue) + .orEmpty() + + /** Code a section shows itself, outside its subsections, tabs and input/output groups. */ + private fun ownCode(section: DocumentNode): Boolean { + fun own(node: DocumentNode): Boolean = + node.kind == "code" || + node.kind != "section" && + !(node.kind == "directive" && + node.name in setOf("io-code-block", "tabs", "tab")) && + node.children.any(::own) + return section.children.any(::own) + } + + private fun text(node: DocumentNode): String = + node.text ?: node.children.joinToString("") { text(it) } + + private fun textValue(json: String): String? = + try { + AuditJson.textValue(json) + } catch (_: Exception) { + null + } +} diff --git a/audits/src/main/kotlin/dev/morphia/audits/publish/DiscoveryFindings.kt b/audits/src/main/kotlin/dev/morphia/audits/publish/DiscoveryFindings.kt index 7f543bd53c8..eac6682f363 100644 --- a/audits/src/main/kotlin/dev/morphia/audits/publish/DiscoveryFindings.kt +++ b/audits/src/main/kotlin/dev/morphia/audits/publish/DiscoveryFindings.kt @@ -1,10 +1,12 @@ package dev.morphia.audits.publish import dev.morphia.audits.generate.Attestation +import dev.morphia.audits.generate.DocumentedPage import dev.morphia.audits.generate.ExampleInventory import dev.morphia.audits.generate.ExampleStatus import dev.morphia.audits.generate.GapKind import dev.morphia.audits.generate.GenerationGap +import dev.morphia.audits.repairs.CaseManifests /** * The publishable findings of one discovery run (`audits/discover.sh`): each binding the generated @@ -55,28 +57,49 @@ object DiscoveryFindings { ): List { fun key(context: String, operator: String, title: String) = "$context/$operator/${title.trim()}" - val known = - committed.pages - .flatMap { page -> - page.examples.map { key(page.context, page.operator, it.title) } - } - .toSet() + // An example is its reviewed name, else its title, which the inventory keeps unique for + // unowned examples. One in any other state adds a digest of its own source and detail, + // so its key doesn't depend on its siblings. + fun keys(page: DocumentedPage): List = + page.examples.map { example -> + val label = example.name ?: example.title + key( + page.context, + page.operator, + if (example.status == ExampleStatus.UNOWNED) label + else + "$label#" + + CaseManifests.sha256( + (example.blocks.map { it.sha256 } + example.detail.orEmpty()) + .joinToString("\n") + .toByteArray() + ) + .take(12), + ) + } + val known = committed.pages.flatMap(::keys).toSet() val gapOf = gaps.associateBy { key(it.context, it.operator, it.title) } return current.pages.flatMap { page -> page.examples - .filter { it.status != ExampleStatus.OWNED } - .filter { key(page.context, page.operator, it.title) !in known } - .map { example -> - val key = key(page.context, page.operator, example.title) + .zip(keys(page)) + // An example with no source has nothing to generate from or cover by hand yet. + .filter { (example, key) -> + example.status != ExampleStatus.OWNED && + (example.status == ExampleStatus.UNOWNED || example.blocks.isNotEmpty()) && + key !in known + } + .distinctBy { (_, key) -> key } + .map { (example, key) -> val state = - gapOf[key]?.let { "Generation reports ${it.kind}: ${it.detail}" } + gapOf[key(page.context, page.operator, example.name ?: example.title)] + ?.let { "Generation reports ${it.kind}: ${it.detail}" } ?: if (example.status == ExampleStatus.UNOWNED) "It is generated when its family is in `audits/catalog/generation-review.json`." else "It is ${example.status}: ${example.detail}" Finding( "${FindingType.NEW_EXAMPLE}:$key", FindingType.NEW_EXAMPLE, - "Cover the documented ${page.operator} example \"${example.title.trim()}\"", + "Cover the documented ${page.operator} example \"${(example.name ?: example.title).trim()}\"", "mongodb/docs `${current.commit.take(10)}` documents this ${page.context} example " + "at `${page.source.path}`, and no test covers it.\n\n$state\n\n" + "Accept the new inventory (see audits/README.md, Weekly discovery) and " + diff --git a/audits/src/main/kotlin/dev/morphia/audits/scenarios/ScenarioExtraction.kt b/audits/src/main/kotlin/dev/morphia/audits/scenarios/ScenarioExtraction.kt index 3f43fd285d5..97910f175f0 100644 --- a/audits/src/main/kotlin/dev/morphia/audits/scenarios/ScenarioExtraction.kt +++ b/audits/src/main/kotlin/dev/morphia/audits/scenarios/ScenarioExtraction.kt @@ -225,6 +225,12 @@ object ScenarioExtraction { } } + // Commands that change the data a later read sees. + private val write = + Regex( + """\.(?:update|replace|delete|bulkWrite|findOneAnd|findAndModify)\w*\s*\(|[{,]\s*["']?\$(?:merge|out)["']?\s*:""" + ) + private class Run( val bundle: VerifiedSourceBundle, val document: DocumentReport, @@ -682,6 +688,12 @@ object ScenarioExtraction { ) val owners = linkedMapOf, Owner>() val pendingIo = mutableListOf<() -> Unit>() + // Setup that only native groups consumed, for the page-wide inheritance. + val setupSources = mutableListOf>() + // Sections holding a native input/output group, and the setup their own code gives it. + val ioSections = mutableSetOf>() + val sectionSetup = mutableMapOf, List>() + val sectionSetupProblem = mutableMapOf, String>() var sharedSetup = emptyList() var sharedSetupSkipped = emptyList() var setupProblem: String? = null @@ -735,19 +747,27 @@ object ScenarioExtraction { attachedLabels, ) else - pendingIo += { - group( - rule, - page, - node, - locator, - nextSections, - nextContainers, - attachedLabels, - sharedSetup, - setupProblem, - ) - } + pendingIo += + { + group( + rule, + page, + node, + locator, + nextSections, + nextContainers, + attachedLabels, + // Only the section's setup that comes before the group. + sharedSetup + + sectionSetup[nextSections].orEmpty().filter { + locatorOrder.compare(it.locator, locator) < 0 + }, + // Setup of its own the grammar can't read leaves the + // group without its data. + setupProblem ?: sectionSetupProblem[nextSections], + ) + } + .also { ioSections += nextSections } return } if (node.kind == "code" && selected(rule, nextSections)) { @@ -844,6 +864,24 @@ object ScenarioExtraction { val setup = if (ownVariant == ScenarioVariant.REFERENCE) sharedSetup else emptyList() + // A section that inserts in plain code and queries in an input/output + // group gives its setup to that group, rather than running nothing. + if ( + ownVariant == ScenarioVariant.REFERENCE && + policy.layout == SectionLayout.COMMANDS_THEN_RESULT && + owner.sections in ioSections && + SectionPrograms.assign(setup, owner.blocks, rule.dialect).all { + it.problem == "MISSING_COMMAND_OR_RESULT" + } + ) { + val local = SectionPrograms.shared(owner.blocks, rule.dialect) + sectionSetup[owner.sections] = local.blocks + local.problem?.let { sectionSetupProblem[owner.sections] = it } + sharedSetupSkipped = sharedSetupSkipped + local.skipped + // Its inserts still reach the sections after it. + setupSources += owner.blocks + return@forEach + } val assignments = when { policy.layout == SectionLayout.SOURCE_ONLY -> @@ -898,6 +936,8 @@ object ScenarioExtraction { rule.sections .filter { it !in foundSections } .forEach { problem("MISSING_SECTION", rule, "Declared section $it is absent") } + inheritSetup(rule, start, setupSources) + afterWrites(start) val emitted = scenarios.drop(start) val reference = emitted.count { it.variant == ScenarioVariant.REFERENCE } if (reference < rule.minimumReferenceGroups) @@ -1000,6 +1040,175 @@ object ScenarioExtraction { ) } + /** + * A read that follows a write in the same section sees the write's effect, which its own + * program doesn't run, whether the write sits in its section's code or in another input/ + * output group. Such a read keeps its source and reports `AFTER_EARLIER_WRITE`. + */ + fun afterWrites(start: Int) { + fun action(scenario: ExtractedScenario) = + scenario.blocks.firstOrNull { it.role == ProgramRole.ACTION } + fun writes(scenario: ExtractedScenario) = + scenario.program + ?.commands + ?.filter { it.role == ProgramRole.ACTION } + ?.takeIf { it.isNotEmpty() } + ?.any { writes(it.operation) } + ?: (action(scenario)?.source?.let(write::containsMatchIn) == true) + fun position(scenario: ExtractedScenario) = + (action(scenario) ?: scenario.blocks.firstOrNull())?.locator.orEmpty() + val order = + Comparator> { a, b -> + a.zip(b).firstOrNull { (x, y) -> x != y }?.let { (x, y) -> x.compareTo(y) } + ?: a.size.compareTo(b.size) + } + val written = mutableSetOf>() + (start until scenarios.size) + .filter { scenarios[it].variant == ScenarioVariant.REFERENCE } + .sortedWith(compareBy(order) { position(scenarios[it]) }) + .forEach { index -> + val scenario = scenarios[index] + val section = scenario.sections.map { it.anchor ?: it.title } + // A write the page shows but no scenario runs, such as a bulkWrite in a try + // block, still changes what the read after it sees. + val skippedWrite = + scenario.skipped.any { + write.containsMatchIn(it.code.source) && + order.compare(it.code.locator, position(scenario)) < 0 + } + if ( + (section in written || skippedWrite) && + !writes(scenario) && + action(scenario) != null + ) + scenarios[index] = + scenario.copy( + program = null, + normalizationProblem = "AFTER_EARLIER_WRITE", + ) + if (writes(scenario)) written += section + } + } + + fun program(rule: ScenarioPageRule, blocks: List) = + ShellPrograms.normalize( + ShellProgramRequest( + dialect = rule.dialect, + blocks = + blocks.mapIndexed { i, b -> + ProgramBlock( + "block-$i", + b.source, + requireNotNull(b.role), + format = + b.format + ?: if (b.role == ProgramRole.EXPECTED) + ProgramFormat.SHELL_RESULTS + else ProgramFormat.SHELL, + namespace = b.namespace, + ) + }, + resultOrder = rule.resultOrder, + ) + ) + + /** + * A scenario that inserts nothing into its action's collection runs against the documents + * the page inserted there most recently: a later section's query on "the survey collection + * above" gets that section's inserts. Only inserts carry over, never another example's + * action. + */ + fun inheritSetup( + rule: ScenarioPageRule, + start: Int, + sources: List> = emptyList(), + ) { + fun position(blocks: List) = + (blocks.firstOrNull { it.role == ProgramRole.ACTION } ?: blocks.firstOrNull()) + ?.locator + .orEmpty() + val inserted = mutableMapOf>() + // Setup the page loads but no example runs: its inserts carry on, and one the grammar + // can't read leaves no older data to inherit, since it may have replaced it. + fun load(blocks: List) { + if (SectionPrograms.shared(blocks, rule.dialect).problem != null) inserted.clear() + else inserted.putAll(SectionPrograms.inserts(blocks, rule.dialect)) + } + val events = + (start until scenarios.size) + .filter { scenarios[it].variant == ScenarioVariant.REFERENCE } + .map { index -> position(scenarios[index].blocks) to index } + + sources.mapIndexed { i, source -> position(source) to -1 - i } + events.sortedWith(compareBy(locatorOrder) { it.first }).forEach { (_, event) -> + if (event < 0) return@forEach load(sources[-1 - event]) + val index = event + val scenario = scenarios[index] + if (scenario.normalizationProblem == "MISSING_COMMAND_OR_RESULT") + return@forEach load(scenario.blocks) + if (scenario.normalizationProblem == "UNSUPPORTED_SETUP") + return@forEach inserted.clear() + val program = + scenario.program?.takeIf { it.state == ShellLiteralState.NORMALIZED } + ?: return@forEach + // The setup through the last insert into each collection: an insert's + // declarations come before it. + val inserts = + program.commands + .filter { it.operation.kind == ShellOperationKind.INSERT } + .groupBy({ it.namespace }) { block(it.id.block) } + .mapValues { (_, indexes) -> + scenario.blocks.take(indexes.max() + 1).filter { + it.role == ProgramRole.SETUP + } + } + val namespace = + program.commands.lastOrNull { it.role == ProgramRole.ACTION }?.namespace + val inherited = namespace?.let { inserted[it] } + if (namespace != null && namespace !in inserts && inherited != null) { + // The copied setup counts against the budgets like any other. + chargeSetup(inherited) + val blocks = inherited + scenario.blocks + val replaced = program(rule, blocks) + programBytes += + AuditJson.requireMaximumSize(replaced, limits.maximumReportBytes) + require(programBytes <= limits.maximumReportBytes) { + "Embedded programs exceed scenario report budget" + } + scenarios[index] = + if (replaced.state == ShellLiteralState.NORMALIZED) + scenario.copy(blocks = blocks, program = replaced) + // Without its data the example can't run as documented. + else + scenario.copy( + program = null, + normalizationProblem = "UNSUPPORTED_INHERITED_SETUP", + ) + } + inserted.putAll(inserts) + } + } + + private fun block(id: String) = id.removePrefix("block-").toInt() + + /** An update, or a pipeline whose last stage writes its output. */ + private fun writes(operation: ShellOperation) = + when (operation) { + is UpdateOperation -> true + is AggregateOperation -> + operation.pipeline.value().asArray().lastOrNull()?.let { stage -> + stage.isDocument && + stage.asDocument().keys.firstOrNull() in setOf("\$merge", "\$out") + } == true + else -> false + } + + /** Page order of two locators. */ + val locatorOrder = + Comparator> { a, b -> + a.zip(b).firstOrNull { (x, y) -> x != y }?.let { (x, y) -> x.compareTo(y) } + ?: a.size.compareTo(b.size) + } + fun chargeSetup(blocks: List) { characters += blocks.sumOf { it.source.length.toLong() } require(characters <= limits.maximumCodeCharacters) { @@ -1154,42 +1363,28 @@ object ScenarioExtraction { rule.sectionAssembly?.additionalShellLanguages.orEmpty() + listOf(null, "json", "none") } - fun normalize(blocks: List) = - ShellPrograms.normalize( - ShellProgramRequest( - dialect = rule.dialect, - blocks = - blocks.mapIndexed { i, b -> - ProgramBlock( - "block-$i", - b.source, - requireNotNull(b.role), - format = - b.format - ?: if (b.role == ProgramRole.EXPECTED) - ProgramFormat.SHELL_RESULTS - else ProgramFormat.SHELL, - namespace = b.namespace, - ) - }, - resultOrder = rule.resultOrder, - ) - ) + fun normalize(blocks: List) = program(rule, blocks) var program = if (canNormalize) normalize(blocks) else null // A printed result the grammar can't read (a truncated `...` listing) leaves the - // example serialization-only rather than losing it. + // example serialization-only rather than losing it. What an update prints, its + // acknowledgement or a later read's documents, isn't a read result either. val result = blocks.lastOrNull()?.takeIf { it.role == ProgramRole.EXPECTED } if ( - sectionOwned && - result != null && - program != null && - program.state != ShellLiteralState.NORMALIZED + result != null && program != null && program.state != ShellLiteralState.NORMALIZED ) { - val without = normalize(blocks.dropLast(1)) - if (without.state == ShellLiteralState.NORMALIZED) { - program = without - blocks = blocks.dropLast(1) - skippedCode = skippedCode + SkippedCode(result, "UNREADABLE_RESULT") + val update = program.problems.any { it.code == "PUBLISHED_PROFILE" } + if (sectionOwned || update) { + val without = normalize(blocks.dropLast(1)) + if (without.state == ShellLiteralState.NORMALIZED) { + program = without + blocks = blocks.dropLast(1) + skippedCode = + skippedCode + + SkippedCode( + result, + if (update) "UPDATE_RESULT" else "UNREADABLE_RESULT", + ) + } } } program?.let { diff --git a/audits/src/main/kotlin/dev/morphia/audits/scenarios/SectionPrograms.kt b/audits/src/main/kotlin/dev/morphia/audits/scenarios/SectionPrograms.kt index b3afd129634..f385c4b8a87 100644 --- a/audits/src/main/kotlin/dev/morphia/audits/scenarios/SectionPrograms.kt +++ b/audits/src/main/kotlin/dev/morphia/audits/scenarios/SectionPrograms.kt @@ -30,7 +30,14 @@ internal object SectionPrograms { private sealed interface Kind { data class Setup(val inserts: Boolean) : Kind - data class Action(val update: Boolean, val namespace: LogicalNamespace) : Kind + /** + * [update] is an update command; [writes] also covers a pipeline that writes its output. + */ + data class Action( + val update: Boolean, + val namespace: LogicalNamespace, + val writes: Boolean = update, + ) : Kind data object Document : Kind @@ -60,7 +67,13 @@ internal object SectionPrograms { else -> null } } - return Assignment(setup, null, skipped) + // Shared data the grammar can't read leaves every consumer without it. + return Assignment( + setup, + if (kinds.any { it == Kind.Skip("UNSUPPORTED_SETUP") }) "UNSUPPORTED_SHARED_SETUP" + else null, + skipped, + ) } /** @@ -86,7 +99,8 @@ internal object SectionPrograms { is Kind.Skip -> SkippedCode(block, kind.reason) Kind.Document -> when { - updated(i) -> SkippedCode(block, "UPDATE_RESULT") + // The update's own scenario records what it printed. + updated(i) -> null result(i) -> null trailing(i) -> SkippedCode(block, "SAMPLE_DOCUMENT") else -> null @@ -118,14 +132,24 @@ internal object SectionPrograms { ?.copy(role = ProgramRole.EXPECTED) // A read after an update in the same section sees the update's effect, which this // scenario doesn't run; the update's own read will cover it. - val afterWrite = actions.any { it < action && (kinds[it] as Kind.Action).update } + val afterWrite = actions.any { it < action && (kinds[it] as Kind.Action).writes } + val lostSetup = (0 until action).any { kinds[it] == Kind.Skip("UNSUPPORTED_SETUP") } Assignment( shared + setup + own[action].copy(role = ProgramRole.ACTION) + listOfNotNull(result), - if (afterWrite) "AFTER_EARLIER_WRITE" else null, - skipped, + when { + lostSetup -> "UNSUPPORTED_SETUP" + afterWrite -> "AFTER_EARLIER_WRITE" + else -> null + }, + skipped + + listOfNotNull( + own.getOrNull(action + 1) + ?.takeIf { result(action + 1) && updated(action + 1) } + ?.let { SkippedCode(it, "UPDATE_RESULT") } + ), ) } } @@ -174,6 +198,9 @@ internal object SectionPrograms { template(block.source) -> Kind.Skip("SYNTAX_TEMPLATE") expression(block) -> Kind.Skip("OPERATOR_EXPRESSION") isDocument(block) -> Kind.Document + // Data the page loads but the grammar can't read: what runs after it + // would run without it. + setupCall.containsMatchIn(block.source) -> Kind.Skip("UNSUPPORTED_SETUP") else -> Kind.Skip("UNSUPPORTED_SOURCE") } own.isEmpty() -> @@ -189,10 +216,14 @@ internal object SectionPrograms { own.any { it.second in setupKinds } -> Kind.Skip("MIXED_SECTION_ROLES") // An action isn't setup for the actions after it, which are other scenarios. else -> - Kind.Action( - own.any { it.second == ShellOperationKind.UPDATE }, - inspection.namespaces.last { it.first == id }.second, - ) + own.any { it.second == ShellOperationKind.UPDATE } + .let { update -> + Kind.Action( + update, + inspection.namespaces.last { it.first == id }.second, + update || output.containsMatchIn(block.source), + ) + } } } } @@ -201,6 +232,30 @@ internal object SectionPrograms { private val documentLanguages = setOf(null, "none", "json", "javascript", "js", "shell", "mongosh", "bash", "sh") + private val setupCall = Regex("""\.(?:insert\w*|createIndex\w*)\s*\(""") + + /** The setup in [blocks] through the last insert into each collection, by collection. */ + fun inserts( + blocks: List, + dialect: ShellDialect, + ): Map> { + val setup = shared(blocks, dialect).blocks.filter { it.format == null } + if (setup.isEmpty()) return emptyMap() + val inspection = inspect(setup, dialect) + if (inspection.state != ShellLiteralState.NORMALIZED) return emptyMap() + return inspection.operations + .filter { it.second == ShellOperationKind.INSERT } + .groupBy({ (id, _) -> inspection.namespaces.first { it.first == id }.second }) { (id, _) + -> + id.removePrefix("block-").toInt() + } + .mapValues { (_, indexes) -> setup.take(indexes.max() + 1) } + } + + // A `$merge` or `$out` stage writes a pipeline's output for a later read; a `'$out'` string + // doesn't. + private val output = Regex("""[{,]\s*["']?\$(?:merge|out)["']?\s*:""") + /** A document or document list in a data or shell language: data, not program code. */ fun isDocument(block: ScenarioCode) = block.language in documentLanguages && diff --git a/audits/src/test/kotlin/dev/morphia/audits/offline/DiscoveryFindingsTest.kt b/audits/src/test/kotlin/dev/morphia/audits/offline/DiscoveryFindingsTest.kt index 6a58bd61154..7cac5fe00f9 100644 --- a/audits/src/test/kotlin/dev/morphia/audits/offline/DiscoveryFindingsTest.kt +++ b/audits/src/test/kotlin/dev/morphia/audits/offline/DiscoveryFindingsTest.kt @@ -11,7 +11,9 @@ import dev.morphia.audits.generate.GenerationGap import dev.morphia.audits.generate.GenerationGaps import dev.morphia.audits.publish.DiscoveryFindings import dev.morphia.audits.publish.FindingType +import dev.morphia.audits.repairs.BlockRole import dev.morphia.audits.repairs.FormSource +import dev.morphia.audits.repairs.SourceBlock import java.nio.file.Files import java.nio.file.Path import org.junit.jupiter.api.Assertions.assertEquals @@ -55,6 +57,33 @@ class DiscoveryFindingsTest { private fun gap(title: String, detail: String) = GenerationGap("aggregation/expressions", "bitOr", title, GapKind.UNBOUND, detail) + /** Examples that share a section's title are found by their names, or else their actions. */ + @Test + fun siblingsUnderOneTitleAreSeparateFindings() { + fun block(text: String) = SourceBlock(BlockRole.ACTION, text, text.repeat(64).take(64)) + val one = + DocumentedExample("Two Ways", ExampleStatus.UNOWNED, "orWithOne", name = "OR with One") + val two = + DocumentedExample("Two Ways", ExampleStatus.UNOWNED, "orWithTwo", name = "OR with Two") + val third = + DocumentedExample("Two Ways", ExampleStatus.AMBIGUOUS, blocks = listOf(block("a"))) + val fourth = + DocumentedExample("Two Ways", ExampleStatus.AMBIGUOUS, blocks = listOf(block("b"))) + fun keys(committed: ExampleInventory, current: ExampleInventory) = + DiscoveryFindings.findings(committed, current, emptyList(), null, null).map { it.key } + val found = keys(inventory(one), inventory(one, two, third, fourth)) + assertEquals(3, found.distinct().size, found.toString()) + assertTrue( + "NEW_EXAMPLE:aggregation/expressions/bitOr/OR with Two" in found, + found.toString(), + ) + // A sibling added later leaves an example's key alone, so it isn't found again. + assertEquals( + keys(inventory(one), inventory(one, fourth)), + keys(inventory(one, third), inventory(one, third, fourth)), + ) + } + @Test fun findingsNameMissingBindingsNewExamplesAndFailedIntegration() { val gaps = diff --git a/audits/src/test/kotlin/dev/morphia/audits/offline/GeneratorTest.kt b/audits/src/test/kotlin/dev/morphia/audits/offline/GeneratorTest.kt index e1fc8ce4f7b..c36807453bd 100644 --- a/audits/src/test/kotlin/dev/morphia/audits/offline/GeneratorTest.kt +++ b/audits/src/test/kotlin/dev/morphia/audits/offline/GeneratorTest.kt @@ -5,8 +5,6 @@ import dev.morphia.audits.coverage.AuditJson import dev.morphia.audits.generate.BindingForm import dev.morphia.audits.generate.BindingPosition import dev.morphia.audits.generate.CaseGenerator -import dev.morphia.audits.generate.CurrentPage -import dev.morphia.audits.generate.CurrentPages import dev.morphia.audits.generate.DocumentedExamples import dev.morphia.audits.generate.DslBinding import dev.morphia.audits.generate.DslBindingCatalog @@ -19,9 +17,9 @@ import dev.morphia.audits.generate.GenerationReview import dev.morphia.audits.generate.MethodRef import dev.morphia.audits.generate.ReviewedExample import dev.morphia.audits.generate.ReviewedExamples +import dev.morphia.audits.generate.ScenarioPlans import dev.morphia.audits.repairs.BlockRole import dev.morphia.audits.repairs.FixtureMigrationLedger -import dev.morphia.audits.repairs.FormSource import java.nio.file.Files import java.nio.file.Path import kotlin.io.path.createDirectories @@ -30,43 +28,40 @@ import org.bson.BsonDocument import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertThrows import org.junit.jupiter.api.Assertions.assertTrue +import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.io.TempDir class GeneratorTest { @TempDir lateinit var directory: Path - private val commit = "c".repeat(40) - private val folder = "content/manual/manual/source/reference/operator/aggregation" - private fun write(path: Path, text: String) { path.parent.createDirectories() path.writeText(text) } - private fun page(operator: String, directive: String, examples: String) { - write( - directory.resolve("pages/$commit/$folder/$operator.txt"), - """ - |======= - |$operator - |======= - | - |.. $directive:: ${'$'}$operator - | - |$examples - |""" - .trimMargin(), - ) + private lateinit var pages: ParsedPages + + @BeforeEach + fun pages() { + pages = ParsedPages(directory) } - private fun block(code: String) = - ".. code-block:: javascript\n\n" + code.trimIndent().prependIndent(" ") + "\n" + /** The inventory of [pages] under the plan drafted from them. */ + private fun capture(root: Path): ExampleInventory { + val (bundle, document) = pages.build() + return DocumentedExamples.capture( + root, + bundle, + document, + ScenarioPlans.draft(document, "a".repeat(64)), + ) + } - private val data = block("db.switches.insertMany( [ { _id: 0, a: Int32(3) } ] )") + private val data = "db.switches.insertMany( [ { _id: 0, a: Int32(3) } ] )" private fun aggregate(expression: String) = - block("db.switches.aggregate( [ { \$project: { result: $expression } } ] )") + "db.switches.aggregate( [ { \$project: { result: $expression } } ] )" /** * A repository with two legacy `$bitOr` fixtures, one owning its example by title and one by @@ -86,62 +81,47 @@ class GeneratorTest { legacy.resolve("moved/action.json"), "{ \$project: {\n result: { \$bitOr: [ \"\$a\", 7 ] } } }", ) - page( - "bitOr", - "expression", - """ - |Examples - |-------- - | - |$data - |Bitwise ``OR`` with Two Integers - |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - | - |${aggregate("{ \$bitOr: [ \"\$a\", \"\$a\" ] }")} - |Renamed Since the Fixture - |~~~~~~~~~~~~~~~~~~~~~~~~~ - | - |${aggregate("{ \$bitOr: [ \"\$a\", 7 ] }")} - |Bitwise ``OR`` with a Long and Integer - |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - | - |${aggregate("{ \$bitOr: [ \"\$a\", Long(\"63\") ] }")} - |${block("[ { _id: 0, result: Long(\"63\") } ]")}""" - .trimMargin(), - ) - page( - "bitAnd", - "expression", - "Example\n-------\n\n$data\n${aggregate("{ \$bitAnd: [ \"\$a\", 1 ] }")}", - ) - page( - "bitXor", - "expression", - """ - |Examples - |-------- - | - |$data - |Use Two - |~~~~~~~ - | - |${aggregate("{ \$bitXor: [ \"\$a\", 1 ] }")} - |Use two - |~~~~~~~ - | - |${aggregate("{ \$bitXor: [ \"\$a\", 2 ] }")}""" - .trimMargin(), - ) - write(directory.resolve("pages/$commit/$folder/interface.txt"), "No directive here.\n") - val sources = - CurrentPages( - commit = commit, - pages = - listOf("bitAnd", "bitOr", "bitXor", "interface").map { - CurrentPage(FormSource(commit, "$folder/$it.txt")) - }, + pages.operator("bitOr", "expression") { + listOf( + section( + "Examples", + code(data), + section( + "Bitwise ``OR`` with Two Integers", + code(aggregate("{ \$bitOr: [ \"\$a\", \"\$a\" ] }")), + ), + section( + "Renamed Since the Fixture", + code(aggregate("{ \$bitOr: [ \"\$a\", 7 ] }")), + ), + section( + "Bitwise ``OR`` with a Long and Integer", + code(aggregate("{ \$bitOr: [ \"\$a\", Long(\"63\") ] }")), + code("[ { _id: 0, result: Long(\"63\") } ]"), + ), + ) + ) + } + pages.operator("bitAnd", "expression") { + listOf(section("Example", code(data), code(aggregate("{ \$bitAnd: [ \"\$a\", 1 ] }")))) + } + pages.operator("bitXor", "expression") { + listOf( + section( + "Examples", + code(data), + section("Use Two", code(aggregate("{ \$bitXor: [ \"\$a\", 1 ] }"))), + section("Use two", code(aggregate("{ \$bitXor: [ \"\$a\", 2 ] }"))), + ) ) - return DocumentedExamples.capture(root, directory.resolve("pages"), sources) + } + pages.page("aggregation", "interface") { + node( + "root", + children = listOf(section("Interface", node("text", text = "No directive here."))), + ) + } + return capture(root) } @Test @@ -188,57 +168,43 @@ class GeneratorTest { root.resolve("audits/catalog/fixture-migration.json"), AuditJson.write(FixtureMigrationLedger()), ) - val seed = - block("db.inventory.insertMany( [ { _id: 1, qty: Int32(25), tags: [ \"a\" ] } ] )") - page( - "gt", - "query", - """ - |Examples - |-------- - | - |$seed - |Match Larger Quantities - |~~~~~~~~~~~~~~~~~~~~~~~ - | - |${block("db.inventory.createIndex( { qty: 1 }, { name: \"byQty\" } )")} - |${block("db.inventory.find( { qty: { ${'$'}gt: 20 } } )")} - |Project the Quantity - |~~~~~~~~~~~~~~~~~~~~ - | - |${block("db.inventory.find( { qty: { ${'$'}gt: 20 } }, { qty: 1 } )")}""" - .trimMargin(), - ) - page( - "inc", - "update", - """ - |Examples - |-------- - | - |$seed - |Increment and Tag - |~~~~~~~~~~~~~~~~~ - | - |${block("db.inventory.updateOne( { _id: 1 }, { ${'$'}inc: { qty: 2 }, ${'$'}set: { tags: [ \"b\" ] } } )")} - |Increment in a Pipeline - |~~~~~~~~~~~~~~~~~~~~~~~ - | - |${block("db.inventory.updateOne( { _id: 1 }, [ { ${'$'}set: { qty: 2 } } ] )")}""" - .trimMargin(), - ) - val inventory = - DocumentedExamples.capture( - root, - directory.resolve("pages"), - CurrentPages( - commit = commit, - pages = - listOf("gt", "inc").map { - CurrentPage(FormSource(commit, "$folder/$it.txt")) - }, - ), + val seed = "db.inventory.insertMany( [ { _id: 1, qty: Int32(25), tags: [ \"a\" ] } ] )" + pages.operator("gt", "query", "query") { + listOf( + section( + "Examples", + code(seed), + section( + "Match Larger Quantities", + code("db.inventory.createIndex( { qty: 1 }, { name: \"byQty\" } )"), + code("db.inventory.find( { qty: { \$gt: 20 } } )"), + ), + section( + "Project the Quantity", + code("db.inventory.find( { qty: { \$gt: 20 } }, { qty: 1 } )"), + ), + ) ) + } + pages.operator("inc", "update", "update") { + listOf( + section( + "Examples", + code(seed), + section( + "Increment and Tag", + code( + "db.inventory.updateOne( { _id: 1 }, { \$inc: { qty: 2 }, \$set: { tags: [ \"b\" ] } } )" + ), + ), + section( + "Increment in a Pipeline", + code("db.inventory.updateOne( { _id: 1 }, [ { \$set: { qty: 2 } } ] )"), + ), + ) + ) + } + val inventory = capture(root) val repository = generateSequence(Path.of("").toAbsolutePath()) { it.parent } .first { Files.isDirectory(it.resolve("audits/catalog")) } @@ -316,6 +282,139 @@ class GeneratorTest { ) } + /** A page that repeats an example shows it once; the same action on other data is another. */ + @Test + fun onlyIdenticalExamplesCollapse() { + val root = directory.resolve("repository") + write( + root.resolve("audits/catalog/fixture-migration.json"), + AuditJson.write(FixtureMigrationLedger()), + ) + val query = aggregate("{ \$bitOr: [ \"\$a\", 1 ] }") + pages.operator("bitOr", "expression") { + listOf( + section( + "Examples", + section("Same Name", code(data), code(query)), + section("Same Name", code(data), code(query)), + section( + "Same Name", + code("db.switches.insertMany( [ { _id: 1, a: Int32(5) } ] )"), + code(query), + ), + ) + ) + } + assertEquals(2, capture(root).pages.single().examples.size) + } + + /** A drafted plan reads each operator page's examples section, tabs and highlighting. */ + @Test + fun theDraftedPlanFollowsEachPage() { + pages.operator("acos", "expression") { + listOf( + section( + "Examples", + code(data), + section( + "Inverse Cosine", + node( + "directive", + name = "tab", + options = mapOf("tabid" to "\"degrees\""), + children = listOf(code(aggregate("{ \$acos: \"\$a\" }"), "bash")), + ), + ), + ) + ) + } + pages.operator("abs", "expression") { + listOf(section("Example", code(data), code(aggregate("{ \$abs: \"\$a\" }")))) + } + pages.operator("cos", "expression") { listOf(section("Behavior", code(data))) } + val (_, document) = pages.build() + val plan = ScenarioPlans.draft(document, "a".repeat(64)) + val rules = plan.pages.associateBy { it.id } + assertEquals( + setOf("aggregation/expressions/acos", "aggregation/expressions/abs"), + rules.keys, + ) + val acos = rules.getValue("aggregation/expressions/acos") + assertEquals("\$acos", acos.scope.capability.key.token) + assertEquals(listOf("examples"), acos.sections) + val policy = acos.sectionAssembly!! + // The examples section's own code is shared setup only when subsections follow it. + assertEquals(listOf("examples"), policy.sharedSetupSections) + assertEquals(listOf("degrees"), policy.scenarioTabs) + assertEquals(listOf("bash"), policy.additionalShellLanguages) + val abs = rules.getValue("aggregation/expressions/abs") + assertEquals(listOf("example"), abs.sections) + assertTrue(abs.sectionAssembly!!.sharedSetupSections.isEmpty()) + } + + /** + * Examples that share their section's title take reviewed names; the title then names no owner, + * so a fixture with that title owns neither of them. + */ + @Test + fun siblingsSharingATitleTakeReviewedNames() { + val root = directory.resolve("repository") + write( + root.resolve("audits/catalog/fixture-migration.json"), + AuditJson.write(FixtureMigrationLedger()), + ) + write( + root.resolve( + "core/src/test/resources/dev/morphia/test/aggregation/expressions/bitOr/twoWays/name" + ), + "Two Ways\n", + ) + pages.operator("bitOr", "expression") { + listOf( + section( + "Examples", + code(data), + section( + "Two Ways", + code(aggregate("{ \$bitOr: [ \"\$a\", 1 ] }")), + code(aggregate("{ \$bitOr: [ \"\$a\", 2 ] }")), + ), + ) + ) + } + val shared = capture(root).pages.single().examples + assertEquals( + listOf(ExampleStatus.AMBIGUOUS, ExampleStatus.AMBIGUOUS), + shared.map { it.status }, + ) + write( + directory.resolve("repository/${DocumentedExamples.REVIEWED}"), + AuditJson.write( + ReviewedExamples( + examples = + shared.mapIndexed { index, example -> + ReviewedExample( + "aggregation/expressions/bitOr", + "Two Ways", + example.blocks.single { it.role == BlockRole.ACTION }.sha256, + name = listOf("OR with One", "OR with Two")[index], + reason = "the section shows two examples", + ) + } + ) + ), + ) + val named = capture(root).pages.single().examples + assertEquals( + listOf( + Triple(ExampleStatus.UNOWNED, "orWithOne", null), + Triple(ExampleStatus.UNOWNED, "orWithTwo", null), + ), + named.map { Triple(it.status, it.stem, it.owner) }, + named.toString(), + ) + } + /** A reviewed name stands in for a generic title; a stale review is counted, not applied. */ @Test fun reviewedNamesResolveGenericTitles() { @@ -529,44 +628,37 @@ class GeneratorTest { root.resolve("audits/catalog/fixture-migration.json"), AuditJson.write(FixtureMigrationLedger()), ) - fun movies(pipeline: String) = block("db.movies.aggregate( [ $pipeline ] )") - page( - "top", - "group", - """ - |Examples - |-------- - | - |Top Rated by Year - |~~~~~~~~~~~~~~~~~ - | - |${movies("""{ ${'$'}match: { genres: "Comedy", year: { ${'$'}gte: 2010, ${'$'}lte: 2012 }, rated: { ${'$'}in: [ "G", "PG" ] }, "imdb.rating": { ${'$'}exists: true } } }, - | { ${'$'}group: { _id: "${'$'}year", best: { ${'$'}top: { output: [ "${'$'}title", "${'$'}imdb.rating" ], sortBy: { "imdb.rating": -1, title: 1 } } } } }, - | { ${'$'}sort: { _id: 1 } }""")} - |${block("[ { _id: 2010, best: [ 'A', 9 ] } ]")} - |Grouped by Two Fields - |~~~~~~~~~~~~~~~~~~~~~ - | - |${movies("""{ ${'$'}group: { _id: { y: "${'$'}year" }, best: { ${'$'}top: { output: "${'$'}title", sortBy: { year: 1 } } } } }""")} - |Without a Rating - |~~~~~~~~~~~~~~~~ - | - |${movies("""{ ${'$'}match: { "imdb.rating": { ${'$'}exists: false } } }""")} - |Typed Years - |~~~~~~~~~~~ - | - |${movies("""{ ${'$'}match: { year: { ${'$'}type: "int" } } }""")}""" - .trimMargin(), - ) - val inventory = - DocumentedExamples.capture( - root, - directory.resolve("pages"), - CurrentPages( - commit = commit, - pages = listOf(CurrentPage(FormSource(commit, "$folder/top.txt"))), - ), + fun ParsedPages.Page.movies(pipeline: String) = code("db.movies.aggregate( [ $pipeline ] )") + val topRated = + "{ \$match: { genres: \"Comedy\", year: { \$gte: 2010, \$lte: 2012 }, " + + "rated: { \$in: [ \"G\", \"PG\" ] }, \"imdb.rating\": { \$exists: true } } },\n" + + " { \$group: { _id: \"\$year\", best: { \$top: { output: [ \"\$title\", " + + "\"\$imdb.rating\" ], sortBy: { \"imdb.rating\": -1, title: 1 } } } } },\n" + + " { \$sort: { _id: 1 } }" + pages.operator("top", "group") { + listOf( + section( + "Examples", + section( + "Top Rated by Year", + movies(topRated), + code("[ { _id: 2010, best: [ 'A', 9 ] } ]"), + ), + section( + "Grouped by Two Fields", + movies( + "{ \$group: { _id: { y: \"\$year\" }, best: { \$top: { output: \"\$title\", sortBy: { year: 1 } } } } }" + ), + ), + section( + "Without a Rating", + movies("{ \$match: { \"imdb.rating\": { \$exists: false } } }"), + ), + section("Typed Years", movies("{ \$match: { year: { \$type: \"int\" } } }")), + ) ) + } + val inventory = capture(root) val repository = generateSequence(Path.of("").toAbsolutePath()) { it.parent } .first { Files.isDirectory(it.resolve("audits/catalog")) } diff --git a/audits/src/test/kotlin/dev/morphia/audits/offline/ParsedPages.kt b/audits/src/test/kotlin/dev/morphia/audits/offline/ParsedPages.kt new file mode 100644 index 00000000000..7f91cdc90cc --- /dev/null +++ b/audits/src/test/kotlin/dev/morphia/audits/offline/ParsedPages.kt @@ -0,0 +1,214 @@ +package dev.morphia.audits.offline + +import dev.morphia.audits.coverage.AuditJson +import dev.morphia.audits.coverage.SourceChannel +import dev.morphia.audits.coverage.SourceRole +import dev.morphia.audits.documents.DocumentNode +import dev.morphia.audits.documents.DocumentOrigin +import dev.morphia.audits.documents.DocumentPage +import dev.morphia.audits.documents.DocumentParser +import dev.morphia.audits.documents.DocumentParsing +import dev.morphia.audits.documents.DocumentPrecision +import dev.morphia.audits.documents.DocumentReport +import dev.morphia.audits.documents.DocumentState +import dev.morphia.audits.sources.GitResource +import dev.morphia.audits.sources.GitResourceKind +import dev.morphia.audits.sources.GitSnapshot +import dev.morphia.audits.sources.GitSourceManifest +import dev.morphia.audits.sources.GitSourceRequest +import dev.morphia.audits.sources.SourceBundle +import dev.morphia.audits.sources.SourceState +import dev.morphia.audits.sources.VerifiedSourceBundle +import java.nio.file.Files +import java.nio.file.Path +import java.security.MessageDigest +import java.util.HexFormat + +/** + * Synthetic parsed manual pages in a verified source bundle, as `DocumentsMainKt` reports real + * ones: each page is a tree of sections and code blocks, optionally declaring an operator. + */ +class ParsedPages(private val directory: Path, val commit: String = "c".repeat(40)) { + private val pages = linkedMapOf DocumentNode>() + + /** Builds one page's nodes, each carrying the page's origin. */ + class Page(val origin: DocumentOrigin) { + fun node( + kind: String, + text: String? = null, + name: String? = null, + domain: String? = null, + children: List = emptyList(), + options: Map = emptyMap(), + attributes: Map = emptyMap(), + ) = + DocumentNode( + kind, + origin, + text, + name, + domain, + emptyList(), + options, + attributes, + emptyList(), + children, + ) + + fun section(title: String, vararg children: DocumentNode) = + node( + "section", + children = + listOf( + node( + "heading", + children = listOf(node("text", text = title)), + attributes = mapOf("id" to json(anchor(title))), + ) + ) + children, + ) + + fun code(source: String, language: String = "javascript") = + node("code", text = source.trimIndent(), attributes = mapOf("lang" to json(language))) + + /** The `.. expression:: $token` declaration of an operator page. */ + fun target(kind: String, token: String) = + node( + "target", + name = kind, + domain = "mongodb", + children = + listOf(node("target_identifier", children = listOf(node("text", text = token)))), + ) + + private fun anchor(title: String) = + title.lowercase().replace(Regex("[^a-z0-9]+"), "-").trim('-') + + private fun json(value: String) = AuditJson.write(value).trim() + } + + /** Adds the page `reference/operator//.txt` built by [tree]. */ + fun page(folder: String, name: String, tree: Page.() -> DocumentNode) { + pages["reference/operator/$folder/$name.txt"] = { it.tree() } + } + + /** An operator page: its title section holds the declaration and then [sections]. */ + fun operator( + name: String, + kind: String, + folder: String = "aggregation", + sections: Page.() -> List, + ) = + page(folder, name) { + node( + "root", + children = + listOf( + section( + name, + *(listOf(target(kind, "\$$name")) + sections()).toTypedArray(), + ) + ), + ) + } + + fun build(): Pair { + val bundleDirectory = Files.createTempDirectory(directory, "bundle-") + Files.createDirectory(bundleDirectory.resolve("blobs")) + val contents = + pages.keys.associate { "$ROOT/source/$it" to "Synthetic page $it\n" } + + mapOf("$ROOT/snooty.toml" to "name='fixture'\n") + val resources = + contents.map { (path, text) -> + val content = text.toByteArray() + val digest = sha(content) + Files.write(bundleDirectory.resolve("blobs/$digest"), content) + val git = MessageDigest.getInstance("SHA-1") + git.update("blob ${content.size}\u0000".toByteArray(Charsets.US_ASCII)) + git.update(content) + GitResource( + path, + GitResourceKind.FILE, + HexFormat.of().formatHex(git.digest()), + digest, + content.size.toLong(), + null, + ) + } + val request = + GitSourceRequest( + id = "fixture", + uri = "https://example.invalid/docs.git", + revision = commit, + projectRoot = ROOT, + label = "8.0", + role = SourceRole.CURRENT, + channel = SourceChannel.RELEASED, + roots = listOf(ROOT), + allowedSymlinkRoots = emptyList(), + maximumFiles = 1000, + maximumFileBytes = 262144, + maximumTotalBytes = 1048576, + timeoutSeconds = 10, + ) + val bundle = + VerifiedSourceBundle( + bundleDirectory, + GitSourceManifest( + request = request, + tree = "0".repeat(40), + gitVersion = "fixture", + contentSha256 = GitSnapshot.contentHash(request, "0".repeat(40), resources), + state = SourceState.READY, + resources = resources, + problems = emptyList(), + ), + ) + Files.writeString( + bundleDirectory.resolve(SourceBundle.MANIFEST), + AuditJson.write(bundle.manifest), + ) + val verified = SourceBundle.open(bundleDirectory, bundle.manifest.contentSha256) + val parsed = + pages.map { (id, tree) -> + val path = "$ROOT/source/$id" + val origin = + DocumentOrigin( + path, + resources.single { it.path == path }.sha256, + 1, + DocumentPrecision.PARSER_REPORTED, + listOf(path), + ) + val root = tree(Page(origin)) + DocumentPage(id, root, root, emptyList(), true) + } + val report = + DocumentReport( + sourceSha256 = verified.manifest.contentSha256, + inputSha256 = AuditJson.hash(DocumentParsing.export(verified, pages.keys.toList())), + parser = + DocumentParser( + "snooty", + DocumentParsing.PARSER_REVISION, + "fixture", + "3.12.16", + "d".repeat(64), + "e".repeat(64), + emptyMap(), + ), + state = DocumentState.READY, + pages = parsed, + diagnostics = emptyList(), + unresolvedUrls = emptyList(), + ) + return verified to report + } + + companion object { + const val ROOT = "content/manual/manual" + + private fun sha(bytes: ByteArray) = + HexFormat.of().formatHex(MessageDigest.getInstance("SHA-256").digest(bytes)) + } +} diff --git a/audits/src/test/kotlin/dev/morphia/audits/offline/ScenarioExtractionTest.kt b/audits/src/test/kotlin/dev/morphia/audits/offline/ScenarioExtractionTest.kt index 1f8ee71fb6e..b6327dfc48c 100644 --- a/audits/src/test/kotlin/dev/morphia/audits/offline/ScenarioExtractionTest.kt +++ b/audits/src/test/kotlin/dev/morphia/audits/offline/ScenarioExtractionTest.kt @@ -1110,12 +1110,16 @@ class ScenarioExtractionTest { ) assertEquals("const n=2;", it.blocks.first().source) } + // Without a declared share, a query inherits only the inserts an earlier section made + // into its collection, with the declarations they read. val without = extract(root(setup, first, second), assembledRule()) - assertTrue( + assertEquals( + listOf("const n=2;", "db.items.insertOne({v:n});"), without.scenarios .single { it.sections.last().anchor == "second" } .blocks - .none { it.source.contains("insertOne") } + .filter { it.role == ProgramRole.SETUP } + .map { it.source }, ) assertNull(without.scenarios.single { it.sections.last().anchor == "first" }.program) } @@ -1324,6 +1328,24 @@ class ScenarioExtractionTest { val read = reads.single { it.blocks.any { b -> b.source == "db.items.find({});" } } assertEquals("AFTER_EARLIER_WRITE", read.normalizationProblem) assertNull(read.program) + // So does a read in another input/output group after a write in an earlier one. + val groups = + extract( + root( + section( + "Merge Totals", + "merge", + io("db.items.aggregate([{${'$'}merge: {into: \"totals\"}}]);", "[]"), + io("db.totals.find({});", "[{v:1}]"), + ) + ), + assembledRule(), + ) + .scenarios + assertEquals( + setOf(null, "AFTER_EARLIER_WRITE"), + groups.map { it.normalizationProblem }.toSet(), + ) } @Test @@ -1386,6 +1408,184 @@ class ScenarioExtractionTest { .single() assertEquals("items", seeds(native).single().namespace!!.collection) assertEquals(ShellLiteralState.NORMALIZED, native.program!!.state) + // A section that inserts in plain code and queries in an input/output group runs its + // insert before that query, and leaves no insert-only scenario behind. + val inSection = + extracted(section("Match Values", "values", code("db.items.insertOne({v:1});"), io())) + .scenarios + .single() + assertEquals( + listOf(ProgramRole.SETUP, ProgramRole.ACTION, ProgramRole.EXPECTED), + inSection.blocks.map { it.role }, + ) + assertEquals(ShellLiteralState.NORMALIZED, inSection.program!!.state) + // Setup the section shows after the group isn't the group's. + val after = + extracted(section("Match Values", "values", io(), code("db.items.insertOne({v:1});"))) + .scenarios + .single { it.blocks.any { b -> b.role == ProgramRole.ACTION } } + assertTrue(after.blocks.none { it.role == ProgramRole.SETUP }, after.blocks.toString()) + } + + @Test + fun aQueryOnAnEarlierSectionsCollectionRunsAgainstItsInserts() { + val scenarios = + extract( + root( + standalone( + "Seed Items", + "seed", + "db.items.insertOne({v:1});", + "db.items.find({v:1});", + ), + standalone("Match Again", "again", "db.items.find({});", "[{v:1}]"), + standalone("Other Data", "other", "db.others.find({});"), + ), + assembledRule(), + ) + .scenarios + fun setup(action: String) = + scenarios + .single { + it.blocks.any { b -> b.role == ProgramRole.ACTION && b.source == action } + } + .let { it.blocks.filter { b -> b.role == ProgramRole.SETUP }.map { b -> b.source } } + // The later section's query gets the earlier section's insert, but not its action. + assertEquals(listOf("db.items.insertOne({v:1});"), setup("db.items.find({});")) + // A query on another collection inherits nothing. + assertEquals(emptyList(), setup("db.others.find({});")) + // A write the page shows but no scenario runs still changes what the next read sees. + val bulk = + extract( + root( + standalone( + "Bulk", + "bulk", + "db.items.insertOne({v:1});", + "try { db.items.bulkWrite([]) } catch (e) { print(e) }", + "db.items.find({});", + "[]", + ) + ), + assembledRule(), + ) + .scenarios + .single() + assertEquals("AFTER_EARLIER_WRITE", bulk.normalizationProblem) + // An inherited insert brings the declarations it reads. + val declared = + extract( + root( + standalone( + "Seed Items", + "seed", + "const docs = [{v:1}];", + "db.items.insertMany(docs);", + "db.items.find({v:1});", + ), + standalone("Match Again", "again", "db.items.find({});"), + ), + assembledRule(), + ) + .scenarios + .single { it.blocks.any { b -> b.source == "db.items.find({});" } } + assertEquals(ShellLiteralState.NORMALIZED, declared.program!!.state) + assertEquals( + listOf("const docs = [{v:1}];", "db.items.insertMany(docs);"), + declared.blocks.filter { it.role == ProgramRole.SETUP }.map { it.source }, + ) + // A pipeline that only mentions '$out' in a string writes nothing. + val reads = + extract( + root( + standalone( + "Project", + "project", + "db.items.insertOne({v:1});", + "db.items.aggregate([{${'$'}project: {v: '${'$'}out'}}]);", + "db.items.find({});", + ) + ), + assembledRule(), + ) + .scenarios + assertTrue( + reads.none { it.normalizationProblem == "AFTER_EARLIER_WRITE" }, + reads.toString(), + ) + } + + @Test + fun inheritedDataFollowsWhatThePageLastLoaded() { + fun query(vararg nodes: DocumentNode) = + extract(root(*nodes), assembledRule()).scenarios.single { + it.blocks.any { b -> b.source == "db.items.find({});" } + } + // An insert the grammar can't read may have replaced the older data: nothing carries over. + val replaced = + query( + standalone("First", "first", "db.items.insertOne({v:1});", "db.items.find({v:1});"), + standalone("Second", "second", "db.items.insertMany(makeDocuments());"), + standalone("Third", "third", "db.items.find({});"), + ) + assertTrue( + replaced.blocks.none { it.role == ProgramRole.SETUP }, + replaced.blocks.toString(), + ) + // An insert after a section's last input/output group still reaches the next section. + val later = + query( + section( + "Group", + "group", + io("db.others.find({});", "[]"), + code("db.items.insertOne({v:1});"), + ), + standalone("Third", "third", "db.items.find({});"), + ) + assertEquals( + listOf("db.items.insertOne({v:1});"), + later.blocks.filter { it.role == ProgramRole.SETUP }.map { it.source }, + ) + // A group after setup of its own the grammar can't read doesn't run without its data. + val group = + extract( + root( + section( + "Group", + "group", + code("db.items.insertMany(makeDocuments());"), + io(), + ) + ), + assembledRule(), + ) + .scenarios + .single { it.blocks.any { b -> b.role == ProgramRole.ACTION } } + assertNull(group.program) + // Inherited setup counts against the source budget. + val (bundle, document) = + fixture( + root( + standalone( + "Seed", + "seed", + "db.items.insertOne({v:1});", + "db.items.find({v:1});", + ), + *(1..5) + .map { standalone("Query $it", "q$it", "db.items.find({});") } + .toTypedArray(), + ) + ) + assertThrows(IllegalArgumentException::class.java) { + ScenarioExtraction.extract( + bundle, + document, + plan(assembledRule()), + ScenarioExtractionLimits(maximumCodeCharacters = 150), + ) + } } @Test @@ -1702,7 +1902,7 @@ class ScenarioExtractionTest { ) // In the other order the insert reads a binding not yet declared, so it isn't setup. assertEquals( - listOf("db.items.insertOne({v:n});" to "UNSUPPORTED_SOURCE"), + listOf("db.items.insertOne({v:n});" to "UNSUPPORTED_SETUP"), reversed.pages.single().sharedSetupSkipped.map { it.code.source to it.reason }, ) } diff --git a/core/src/test/java/dev/morphia/test/generated/expressions/TestBitAnd.java b/core/src/test/java/dev/morphia/test/generated/expressions/TestBitAnd.java new file mode 100644 index 00000000000..5716820b302 --- /dev/null +++ b/core/src/test/java/dev/morphia/test/generated/expressions/TestBitAnd.java @@ -0,0 +1,36 @@ +// spotless:off +package dev.morphia.test.generated.expressions; + +import dev.morphia.test.OperatorCase; +import dev.morphia.test.OperatorCaseRunner; +import dev.morphia.test.TestBase; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +import static dev.morphia.aggregation.expressions.MathExpressions.bitAnd; +import static dev.morphia.aggregation.stages.Projection.project; + +/** Generated by GenerateMainKt from audits/catalog/documented-examples.json; do not edit. */ +public class TestBitAnd extends TestBase { + private final OperatorCaseRunner runner = new OperatorCaseRunner(this); + + @Test + @DisplayName("Bitwise AND with a Long and Integer") + public void bitwiseAndWithALongAndInteger() { + runner.aggregate( + OperatorCase.of("/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithALongAndInteger/scenario.json"), + (aggregation) -> aggregation.pipeline( + project().include("result", bitAnd("$a", 63L)))); + } + + @Test + @DisplayName("Bitwise AND with Two Integers") + public void bitwiseAndWithTwoIntegers() { + runner.aggregate( + OperatorCase.of("/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithTwoIntegers/scenario.json"), + (aggregation) -> aggregation.pipeline( + project().include("result", bitAnd("$a", "$b")))); + } +} +// spotless:on diff --git a/core/src/test/java/dev/morphia/test/generated/expressions/TestBitOr.java b/core/src/test/java/dev/morphia/test/generated/expressions/TestBitOr.java index 2aa3785a369..741ecd02010 100644 --- a/core/src/test/java/dev/morphia/test/generated/expressions/TestBitOr.java +++ b/core/src/test/java/dev/morphia/test/generated/expressions/TestBitOr.java @@ -16,7 +16,7 @@ public class TestBitOr extends TestBase { private final OperatorCaseRunner runner = new OperatorCaseRunner(this); @Test - @DisplayName("Bitwise ``OR`` with Two Integers ") + @DisplayName("Bitwise OR with Two Integers") public void bitwiseOrWithTwoIntegers() { runner.aggregate( OperatorCase.of("/dev/morphia/test/generated/fixtures/expressions/bitOr/bitwiseOrWithTwoIntegers/scenario.json"), diff --git a/core/src/test/java/dev/morphia/test/generated/filters/TestAnd.java b/core/src/test/java/dev/morphia/test/generated/filters/TestAnd.java new file mode 100644 index 00000000000..383ed2e3eca --- /dev/null +++ b/core/src/test/java/dev/morphia/test/generated/filters/TestAnd.java @@ -0,0 +1,37 @@ +// spotless:off +package dev.morphia.test.generated.filters; + +import java.util.List; + +import dev.morphia.test.OperatorCase; +import dev.morphia.test.OperatorCaseRunner; +import dev.morphia.test.TestBase; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +import static dev.morphia.query.filters.Filters.exists; +import static dev.morphia.query.filters.Filters.in; +import static dev.morphia.query.filters.Filters.ne; + +/** Generated by GenerateMainKt from audits/catalog/documented-examples.json; do not edit. */ +public class TestAnd extends TestBase { + private final OperatorCaseRunner runner = new OperatorCaseRunner(this); + + @Test + @DisplayName("Combine Conditions on One Field") + public void combineConditionsOnOneField() { + runner.find( + OperatorCase.of("/dev/morphia/test/generated/fixtures/filters/and/combineConditionsOnOneField/scenario.json"), + (query) -> query.filter(ne("price", 1.99), exists("price"))); + } + + @Test + @DisplayName("Match Either Value with $in") + public void matchEitherValueWithIn() { + runner.find( + OperatorCase.of("/dev/morphia/test/generated/fixtures/filters/and/matchEitherValueWithIn/scenario.json"), + (query) -> query.filter(in("status", List.of("new", "processing")))); + } +} +// spotless:on diff --git a/core/src/test/java/dev/morphia/test/generated/filters/TestElemMatch.java b/core/src/test/java/dev/morphia/test/generated/filters/TestElemMatch.java new file mode 100644 index 00000000000..efdd900f011 --- /dev/null +++ b/core/src/test/java/dev/morphia/test/generated/filters/TestElemMatch.java @@ -0,0 +1,34 @@ +// spotless:off +package dev.morphia.test.generated.filters; + +import dev.morphia.test.OperatorCase; +import dev.morphia.test.OperatorCaseRunner; +import dev.morphia.test.TestBase; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +import static dev.morphia.query.filters.Filters.eq; +import static dev.morphia.query.filters.Filters.ne; + +/** Generated by GenerateMainKt from audits/catalog/documented-examples.json; do not edit. */ +public class TestElemMatch extends TestBase { + private final OperatorCaseRunner runner = new OperatorCaseRunner(this); + + @Test + @DisplayName("Match an Element with Dot Notation") + public void matchAnElementWithDotNotation() { + runner.find( + OperatorCase.of("/dev/morphia/test/generated/fixtures/filters/elemMatch/matchAnElementWithDotNotation/scenario.json"), + (query) -> query.filter(eq("results.product", "xyz"))); + } + + @Test + @DisplayName("Match When No Element Is xyz") + public void matchWhenNoElementIsXyz() { + runner.find( + OperatorCase.of("/dev/morphia/test/generated/fixtures/filters/elemMatch/matchWhenNoElementIsXyz/scenario.json"), + (query) -> query.filter(ne("results.product", "xyz"))); + } +} +// spotless:on diff --git a/core/src/test/java/dev/morphia/test/generated/filters/TestEq.java b/core/src/test/java/dev/morphia/test/generated/filters/TestEq.java new file mode 100644 index 00000000000..3230c340df5 --- /dev/null +++ b/core/src/test/java/dev/morphia/test/generated/filters/TestEq.java @@ -0,0 +1,51 @@ +// spotless:off +package dev.morphia.test.generated.filters; + +import java.util.List; + +import dev.morphia.test.OperatorCase; +import dev.morphia.test.OperatorCaseRunner; +import dev.morphia.test.TestBase; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +import static dev.morphia.query.filters.Filters.eq; + +/** Generated by GenerateMainKt from audits/catalog/documented-examples.json; do not edit. */ +public class TestEq extends TestBase { + private final OperatorCaseRunner runner = new OperatorCaseRunner(this); + + @Test + @DisplayName("Match a Quantity Exactly") + public void matchAQuantityExactly() { + runner.find( + OperatorCase.of("/dev/morphia/test/generated/fixtures/filters/eq/matchAQuantityExactly/scenario.json"), + (query) -> query.filter(eq("qty", 20))); + } + + @Test + @DisplayName("Match an Array Exactly") + public void matchAnArrayExactly() { + runner.find( + OperatorCase.of("/dev/morphia/test/generated/fixtures/filters/eq/matchAnArrayExactly/scenario.json"), + (query) -> query.filter(eq("tags", List.of("A", "B")))); + } + + @Test + @DisplayName("Match an Embedded Field with Dot Notation") + public void matchAnEmbeddedFieldWithDotNotation() { + runner.find( + OperatorCase.of("/dev/morphia/test/generated/fixtures/filters/eq/matchAnEmbeddedFieldWithDotNotation/scenario.json"), + (query) -> query.filter(eq("item.name", "ab"))); + } + + @Test + @DisplayName("Match One Array Element") + public void matchOneArrayElement() { + runner.find( + OperatorCase.of("/dev/morphia/test/generated/fixtures/filters/eq/matchOneArrayElement/scenario.json"), + (query) -> query.filter(eq("tags", "B"))); + } +} +// spotless:on diff --git a/core/src/test/java/dev/morphia/test/generated/stages/TestGroup.java b/core/src/test/java/dev/morphia/test/generated/stages/TestGroup.java index 18f6150be5d..4ca56cd41ad 100644 --- a/core/src/test/java/dev/morphia/test/generated/stages/TestGroup.java +++ b/core/src/test/java/dev/morphia/test/generated/stages/TestGroup.java @@ -9,7 +9,9 @@ import org.junit.jupiter.api.Test; import static dev.morphia.aggregation.expressions.AccumulatorExpressions.avg; +import static dev.morphia.aggregation.expressions.AccumulatorExpressions.push; import static dev.morphia.aggregation.expressions.AccumulatorExpressions.sum; +import static dev.morphia.aggregation.stages.AddFields.addFields; import static dev.morphia.aggregation.stages.Group.group; import static dev.morphia.aggregation.stages.Group.id; import static dev.morphia.aggregation.stages.Match.match; @@ -22,14 +24,12 @@ public class TestGroup extends TestBase { private final OperatorCaseRunner runner = new OperatorCaseRunner(this); @Test - @DisplayName("Calculate Count, Sum, and Average") - public void calculateCountSumAndAverage() { + @DisplayName("Group by null") + public void groupByNull() { runner.aggregate( - OperatorCase.of("/dev/morphia/test/generated/fixtures/stages/group/calculateCountSumAndAverage/scenario.json"), + OperatorCase.of("/dev/morphia/test/generated/fixtures/stages/group/groupByNull/scenario.json"), (aggregation) -> aggregation.pipeline( - match(lt("year", 1910)), - group(id("$year")).field("totalRuntime", sum("$runtime")).field("averageRuntime", avg("$runtime")).field("count", sum(1)), - sort().descending("totalRuntime"))); + group(id(null)).field("totalRuntime", sum("$runtime")).field("averageRuntime", avg("$runtime")).field("count", sum(1)))); } @Test @@ -42,6 +42,40 @@ public void groupByRating() { match(gte("totalRuntime", 100000)))); } + @Test + @DisplayName("Group by Year") + public void groupByYear() { + runner.aggregate( + OperatorCase.of("/dev/morphia/test/generated/fixtures/stages/group/groupByYear/scenario.json"), + (aggregation) -> aggregation.pipeline( + match(lt("year", 1910)), + group(id("$year")).field("totalRuntime", sum("$runtime")).field("averageRuntime", avg("$runtime")).field("count", sum(1)), + sort().descending("totalRuntime"))); + } + + @Test + @DisplayName("Group Documents by Year") + public void groupDocumentsByYear() { + runner.aggregate( + OperatorCase.of("/dev/morphia/test/generated/fixtures/stages/group/groupDocumentsByYear/scenario.json"), + (aggregation) -> aggregation.pipeline( + match(lt("year", 1910)), + group(id("$year")).field("movies", push("$$ROOT")), + addFields().field("totalRuntime", sum("$movies.runtime")), + sort().ascending("_id"))); + } + + @Test + @DisplayName("Group Titles by Year") + public void groupTitlesByYear() { + runner.aggregate( + OperatorCase.of("/dev/morphia/test/generated/fixtures/stages/group/groupTitlesByYear/scenario.json"), + (aggregation) -> aggregation.pipeline( + match(lt("year", 1910)), + group(id("$year")).field("titles", push("$title")), + sort().ascending("_id"))); + } + @Test @DisplayName("Retrieve Distinct Values") public void retrieveDistinctValues() { diff --git a/core/src/test/java/dev/morphia/test/generated/stages/TestProject.java b/core/src/test/java/dev/morphia/test/generated/stages/TestProject.java index 9ebe982dae1..302787526c7 100644 --- a/core/src/test/java/dev/morphia/test/generated/stages/TestProject.java +++ b/core/src/test/java/dev/morphia/test/generated/stages/TestProject.java @@ -19,10 +19,10 @@ public class TestProject extends TestBase { private final OperatorCaseRunner runner = new OperatorCaseRunner(this); @Test - @DisplayName("Exclude Fields from Embedded Documents") - public void excludeFieldsFromEmbeddedDocuments() { + @DisplayName("Exclude an Embedded Field with Dot Notation") + public void excludeAnEmbeddedFieldWithDotNotation() { runner.aggregate( - OperatorCase.of("/dev/morphia/test/generated/fixtures/stages/project/excludeFieldsFromEmbeddedDocuments/scenario.json"), + OperatorCase.of("/dev/morphia/test/generated/fixtures/stages/project/excludeAnEmbeddedFieldWithDotNotation/scenario.json"), (aggregation) -> aggregation.pipeline( match(eq("title", "The Great Train Robbery")), project().exclude("imdb.id").exclude("type"), @@ -41,14 +41,36 @@ public void excludeFieldsFromOutputDocuments() { } @Test - @DisplayName("Project New Array Fields") - public void projectNewArrayFields() { + @DisplayName("Include an Embedded Field with Dot Notation") + public void includeAnEmbeddedFieldWithDotNotation() { runner.aggregate( - OperatorCase.of("/dev/morphia/test/generated/fixtures/stages/project/projectNewArrayFields/scenario.json"), + OperatorCase.of("/dev/morphia/test/generated/fixtures/stages/project/includeAnEmbeddedFieldWithDotNotation/scenario.json"), + (aggregation) -> aggregation.pipeline( + match(eq("title", "The Great Train Robbery")), + project().include("imdb.rating"), + limit(1))); + } + + @Test + @DisplayName("Project an Array of Fields") + public void projectAnArrayOfFields() { + runner.aggregate( + OperatorCase.of("/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayOfFields/scenario.json"), (aggregation) -> aggregation.pipeline( match(eq("title", "The Great Train Robbery")), project().include("myArray", array("$year", "$runtime")), limit(1))); } + + @Test + @DisplayName("Project an Array with a Missing Field") + public void projectAnArrayWithAMissingField() { + runner.aggregate( + OperatorCase.of("/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayWithAMissingField/scenario.json"), + (aggregation) -> aggregation.pipeline( + match(eq("title", "The Great Train Robbery")), + project().include("myArray", array("$year", "$runtime", "$someField")), + limit(1))); + } } // spotless:on diff --git a/core/src/test/java/dev/morphia/test/generated/updates/TestPositionalAll.java b/core/src/test/java/dev/morphia/test/generated/updates/TestPositionalAll.java index 0f8feb2fdf5..39890f952e1 100644 --- a/core/src/test/java/dev/morphia/test/generated/updates/TestPositionalAll.java +++ b/core/src/test/java/dev/morphia/test/generated/updates/TestPositionalAll.java @@ -14,6 +14,15 @@ public class TestPositionalAll extends TestBase { private final OperatorCaseRunner runner = new OperatorCaseRunner(this); + @Test + @DisplayName("Update All Documents in an Array") + public void updateAllDocumentsInAnArray() { + runner.update( + OperatorCase.of("/dev/morphia/test/generated/fixtures/updates/positional-all/updateAllDocumentsInAnArray/scenario.json"), + (query) -> query, + inc("grades.$[].std", -2)); + } + @Test @DisplayName("Update All Elements in an Array") public void updateAllElementsInAnArray() { diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithALongAndInteger/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithALongAndInteger/scenario.json new file mode 100644 index 00000000000..a0f1b41c3e3 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithALongAndInteger/scenario.json @@ -0,0 +1,84 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "aggregation/expressions/bitAnd/bitwiseAndWithALongAndInteger", + "title": "Bitwise AND with a Long and Integer", + "context": "EXPRESSION", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/aggregation/bitAnd.txt", + "blob": "918a0950ee157f6a0a8a92f6df669181c959784d" + }, + "dataset": null, + "collections": { + "switches": [ + { + "_id": { + "$numberInt": "0" + }, + "a": { + "$numberInt": "0" + }, + "b": { + "$numberInt": "127" + } + }, + { + "_id": { + "$numberInt": "1" + }, + "a": { + "$numberInt": "2" + }, + "b": { + "$numberInt": "3" + } + }, + { + "_id": { + "$numberInt": "2" + }, + "a": { + "$numberInt": "3" + }, + "b": { + "$numberInt": "5" + } + } + ] + }, + "indexes": [], + "action": { + "kind": "aggregate", + "collection": "switches", + "pipeline": [ + { + "$project": { + "result": { + "$bitAnd": [ + "$a", + { + "$numberLong": "63" + } + ] + } + } + } + ] + }, + "expected": { + "none": "the page publishes no result" + }, + "comparison": { + "order": "ORDERED", + "rules": [], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithTwoIntegers/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithTwoIntegers/scenario.json new file mode 100644 index 00000000000..ae069200a44 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithTwoIntegers/scenario.json @@ -0,0 +1,82 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "aggregation/expressions/bitAnd/bitwiseAndWithTwoIntegers", + "title": "Bitwise AND with Two Integers", + "context": "EXPRESSION", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/aggregation/bitAnd.txt", + "blob": "918a0950ee157f6a0a8a92f6df669181c959784d" + }, + "dataset": null, + "collections": { + "switches": [ + { + "_id": { + "$numberInt": "0" + }, + "a": { + "$numberInt": "0" + }, + "b": { + "$numberInt": "127" + } + }, + { + "_id": { + "$numberInt": "1" + }, + "a": { + "$numberInt": "2" + }, + "b": { + "$numberInt": "3" + } + }, + { + "_id": { + "$numberInt": "2" + }, + "a": { + "$numberInt": "3" + }, + "b": { + "$numberInt": "5" + } + } + ] + }, + "indexes": [], + "action": { + "kind": "aggregate", + "collection": "switches", + "pipeline": [ + { + "$project": { + "result": { + "$bitAnd": [ + "$a", + "$b" + ] + } + } + } + ] + }, + "expected": { + "none": "the page publishes no result" + }, + "comparison": { + "order": "ORDERED", + "rules": [], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitOr/bitwiseOrWithTwoIntegers/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitOr/bitwiseOrWithTwoIntegers/scenario.json index a56ad155233..5ab62841295 100644 --- a/core/src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitOr/bitwiseOrWithTwoIntegers/scenario.json +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitOr/bitwiseOrWithTwoIntegers/scenario.json @@ -3,7 +3,7 @@ "$numberInt": "1" }, "name": "aggregation/expressions/bitOr/bitwiseOrWithTwoIntegers", - "title": "Bitwise ``OR`` with Two Integers ", + "title": "Bitwise OR with Two Integers", "context": "EXPRESSION", "source": { "repository": "mongodb/docs", diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/and/combineConditionsOnOneField/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/and/combineConditionsOnOneField/scenario.json new file mode 100644 index 00000000000..e2224876097 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/and/combineConditionsOnOneField/scenario.json @@ -0,0 +1,44 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "query/filters/and/combineConditionsOnOneField", + "title": "Combine Conditions on One Field", + "context": "FILTER", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/query/and.txt", + "blob": "1a640af206a5d59f2c0551c68869bb11ec14f504" + }, + "dataset": null, + "collections": {}, + "indexes": [], + "action": { + "kind": "find", + "collection": "inventory", + "filter": { + "price": { + "$ne": { + "$numberDouble": "1.99" + }, + "$exists": true + } + } + }, + "expected": { + "none": "the page publishes no result" + }, + "comparison": { + "order": "ORDERED", + "rules": [ + "FIELD_OPERATORS_AND" + ], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/and/matchEitherValueWithIn/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/and/matchEitherValueWithIn/scenario.json new file mode 100644 index 00000000000..70ad7aa60a9 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/and/matchEitherValueWithIn/scenario.json @@ -0,0 +1,42 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "query/filters/and/matchEitherValueWithIn", + "title": "Match Either Value with $in", + "context": "FILTER", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/query/and.txt", + "blob": "1a640af206a5d59f2c0551c68869bb11ec14f504" + }, + "dataset": null, + "collections": {}, + "indexes": [], + "action": { + "kind": "find", + "collection": "inventory", + "filter": { + "status": { + "$in": [ + "new", + "processing" + ] + } + } + }, + "expected": { + "none": "the page publishes no result" + }, + "comparison": { + "order": "ORDERED", + "rules": [], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/elemMatch/matchAnElementWithDotNotation/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/elemMatch/matchAnElementWithDotNotation/scenario.json new file mode 100644 index 00000000000..6b390b4381c --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/elemMatch/matchAnElementWithDotNotation/scenario.json @@ -0,0 +1,328 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "query/filters/elemMatch/matchAnElementWithDotNotation", + "title": "Match an Element with Dot Notation", + "context": "FILTER", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/query/elemMatch.txt", + "blob": "dad451e32460ad48e14e220c45c4c4cf2475eaf0" + }, + "dataset": null, + "collections": { + "survey": [ + { + "_id": { + "$numberInt": "1" + }, + "results": [ + { + "product": "abc", + "score": { + "$numberInt": "10" + } + }, + { + "product": "xyz", + "score": { + "$numberInt": "5" + } + } + ] + }, + { + "_id": { + "$numberInt": "2" + }, + "results": [ + { + "product": "abc", + "score": { + "$numberInt": "8" + } + }, + { + "product": "xyz", + "score": { + "$numberInt": "7" + } + } + ] + }, + { + "_id": { + "$numberInt": "3" + }, + "results": [ + { + "product": "abc", + "score": { + "$numberInt": "7" + } + }, + { + "product": "xyz", + "score": { + "$numberInt": "8" + } + } + ] + }, + { + "_id": { + "$numberInt": "4" + }, + "results": [ + { + "product": "abc", + "score": { + "$numberInt": "7" + } + }, + { + "product": "def", + "score": { + "$numberInt": "8" + } + } + ] + }, + { + "_id": { + "$numberInt": "5" + }, + "results": { + "product": "xyz", + "score": { + "$numberInt": "7" + } + } + } + ] + }, + "indexes": [], + "action": { + "kind": "find", + "collection": "survey", + "filter": { + "results.product": "xyz" + } + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "1" + } + } + }, + { + "name": "results", + "value": { + "array": [ + { + "document": [ + { + "name": "product", + "value": { + "text": "abc" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "10" + } + } + } + ] + }, + { + "document": [ + { + "name": "product", + "value": { + "text": "xyz" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "5" + } + } + } + ] + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "2" + } + } + }, + { + "name": "results", + "value": { + "array": [ + { + "document": [ + { + "name": "product", + "value": { + "text": "abc" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "8" + } + } + } + ] + }, + { + "document": [ + { + "name": "product", + "value": { + "text": "xyz" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "7" + } + } + } + ] + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "3" + } + } + }, + { + "name": "results", + "value": { + "array": [ + { + "document": [ + { + "name": "product", + "value": { + "text": "abc" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "7" + } + } + } + ] + }, + { + "document": [ + { + "name": "product", + "value": { + "text": "xyz" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "8" + } + } + } + ] + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "5" + } + } + }, + { + "name": "results", + "value": { + "document": [ + { + "name": "product", + "value": { + "text": "xyz" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "7" + } + } + } + ] + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [ + "EQ_SHORTHAND" + ], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/elemMatch/matchWhenNoElementIsXyz/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/elemMatch/matchWhenNoElementIsXyz/scenario.json new file mode 100644 index 00000000000..4e34e086266 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/elemMatch/matchWhenNoElementIsXyz/scenario.json @@ -0,0 +1,185 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "query/filters/elemMatch/matchWhenNoElementIsXyz", + "title": "Match When No Element Is xyz", + "context": "FILTER", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/query/elemMatch.txt", + "blob": "dad451e32460ad48e14e220c45c4c4cf2475eaf0" + }, + "dataset": null, + "collections": { + "survey": [ + { + "_id": { + "$numberInt": "1" + }, + "results": [ + { + "product": "abc", + "score": { + "$numberInt": "10" + } + }, + { + "product": "xyz", + "score": { + "$numberInt": "5" + } + } + ] + }, + { + "_id": { + "$numberInt": "2" + }, + "results": [ + { + "product": "abc", + "score": { + "$numberInt": "8" + } + }, + { + "product": "xyz", + "score": { + "$numberInt": "7" + } + } + ] + }, + { + "_id": { + "$numberInt": "3" + }, + "results": [ + { + "product": "abc", + "score": { + "$numberInt": "7" + } + }, + { + "product": "xyz", + "score": { + "$numberInt": "8" + } + } + ] + }, + { + "_id": { + "$numberInt": "4" + }, + "results": [ + { + "product": "abc", + "score": { + "$numberInt": "7" + } + }, + { + "product": "def", + "score": { + "$numberInt": "8" + } + } + ] + }, + { + "_id": { + "$numberInt": "5" + }, + "results": { + "product": "xyz", + "score": { + "$numberInt": "7" + } + } + } + ] + }, + "indexes": [], + "action": { + "kind": "find", + "collection": "survey", + "filter": { + "results.product": { + "$ne": "xyz" + } + } + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "4" + } + } + }, + { + "name": "results", + "value": { + "array": [ + { + "document": [ + { + "name": "product", + "value": { + "text": "abc" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "7" + } + } + } + ] + }, + { + "document": [ + { + "name": "product", + "value": { + "text": "def" + } + }, + { + "name": "score", + "value": { + "whole": { + "$numberInt": "8" + } + } + } + ] + } + ] + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAQuantityExactly/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAQuantityExactly/scenario.json new file mode 100644 index 00000000000..eb30540d897 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAQuantityExactly/scenario.json @@ -0,0 +1,236 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "query/filters/eq/matchAQuantityExactly", + "title": "Match a Quantity Exactly", + "context": "FILTER", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/query/eq.txt", + "blob": "833cb20778a655fe9152395c1bd33475ffe603e9" + }, + "dataset": null, + "collections": { + "inventory": [ + { + "_id": { + "$numberInt": "1" + }, + "item": { + "name": "ab", + "code": "123" + }, + "qty": { + "$numberInt": "15" + }, + "tags": [ + "A", + "B", + "C" + ] + }, + { + "_id": { + "$numberInt": "2" + }, + "item": { + "name": "cd", + "code": "123" + }, + "qty": { + "$numberInt": "20" + }, + "tags": [ + "B" + ] + }, + { + "_id": { + "$numberInt": "3" + }, + "item": { + "name": "ij", + "code": "456" + }, + "qty": { + "$numberInt": "25" + }, + "tags": [ + "A", + "B" + ] + }, + { + "_id": { + "$numberInt": "4" + }, + "item": { + "name": "xy", + "code": "456" + }, + "qty": { + "$numberInt": "30" + }, + "tags": [ + "B", + "A" + ] + }, + { + "_id": { + "$numberInt": "5" + }, + "item": { + "name": "mn", + "code": "000" + }, + "qty": { + "$numberInt": "20" + }, + "tags": [ + [ + "A", + "B" + ], + "C" + ] + } + ] + }, + "indexes": [], + "action": { + "kind": "find", + "collection": "inventory", + "filter": { + "qty": { + "$numberInt": "20" + } + } + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "2" + } + } + }, + { + "name": "item", + "value": { + "document": [ + { + "name": "name", + "value": { + "text": "cd" + } + }, + { + "name": "code", + "value": { + "text": "123" + } + } + ] + } + }, + { + "name": "qty", + "value": { + "whole": { + "$numberInt": "20" + } + } + }, + { + "name": "tags", + "value": { + "array": [ + { + "text": "B" + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "5" + } + } + }, + { + "name": "item", + "value": { + "document": [ + { + "name": "name", + "value": { + "text": "mn" + } + }, + { + "name": "code", + "value": { + "text": "000" + } + } + ] + } + }, + { + "name": "qty", + "value": { + "whole": { + "$numberInt": "20" + } + } + }, + { + "name": "tags", + "value": { + "array": [ + { + "array": [ + { + "text": "A" + }, + { + "text": "B" + } + ] + }, + { + "text": "C" + } + ] + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [ + "EQ_SHORTHAND" + ], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAnArrayExactly/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAnArrayExactly/scenario.json new file mode 100644 index 00000000000..0cf5b695ef0 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAnArrayExactly/scenario.json @@ -0,0 +1,240 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "query/filters/eq/matchAnArrayExactly", + "title": "Match an Array Exactly", + "context": "FILTER", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/query/eq.txt", + "blob": "833cb20778a655fe9152395c1bd33475ffe603e9" + }, + "dataset": null, + "collections": { + "inventory": [ + { + "_id": { + "$numberInt": "1" + }, + "item": { + "name": "ab", + "code": "123" + }, + "qty": { + "$numberInt": "15" + }, + "tags": [ + "A", + "B", + "C" + ] + }, + { + "_id": { + "$numberInt": "2" + }, + "item": { + "name": "cd", + "code": "123" + }, + "qty": { + "$numberInt": "20" + }, + "tags": [ + "B" + ] + }, + { + "_id": { + "$numberInt": "3" + }, + "item": { + "name": "ij", + "code": "456" + }, + "qty": { + "$numberInt": "25" + }, + "tags": [ + "A", + "B" + ] + }, + { + "_id": { + "$numberInt": "4" + }, + "item": { + "name": "xy", + "code": "456" + }, + "qty": { + "$numberInt": "30" + }, + "tags": [ + "B", + "A" + ] + }, + { + "_id": { + "$numberInt": "5" + }, + "item": { + "name": "mn", + "code": "000" + }, + "qty": { + "$numberInt": "20" + }, + "tags": [ + [ + "A", + "B" + ], + "C" + ] + } + ] + }, + "indexes": [], + "action": { + "kind": "find", + "collection": "inventory", + "filter": { + "tags": [ + "A", + "B" + ] + } + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "3" + } + } + }, + { + "name": "item", + "value": { + "document": [ + { + "name": "name", + "value": { + "text": "ij" + } + }, + { + "name": "code", + "value": { + "text": "456" + } + } + ] + } + }, + { + "name": "qty", + "value": { + "whole": { + "$numberInt": "25" + } + } + }, + { + "name": "tags", + "value": { + "array": [ + { + "text": "A" + }, + { + "text": "B" + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "5" + } + } + }, + { + "name": "item", + "value": { + "document": [ + { + "name": "name", + "value": { + "text": "mn" + } + }, + { + "name": "code", + "value": { + "text": "000" + } + } + ] + } + }, + { + "name": "qty", + "value": { + "whole": { + "$numberInt": "20" + } + } + }, + { + "name": "tags", + "value": { + "array": [ + { + "array": [ + { + "text": "A" + }, + { + "text": "B" + } + ] + }, + { + "text": "C" + } + ] + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [ + "EQ_SHORTHAND" + ], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAnEmbeddedFieldWithDotNotation/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAnEmbeddedFieldWithDotNotation/scenario.json new file mode 100644 index 00000000000..78d81ec66e5 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAnEmbeddedFieldWithDotNotation/scenario.json @@ -0,0 +1,181 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "query/filters/eq/matchAnEmbeddedFieldWithDotNotation", + "title": "Match an Embedded Field with Dot Notation", + "context": "FILTER", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/query/eq.txt", + "blob": "833cb20778a655fe9152395c1bd33475ffe603e9" + }, + "dataset": null, + "collections": { + "inventory": [ + { + "_id": { + "$numberInt": "1" + }, + "item": { + "name": "ab", + "code": "123" + }, + "qty": { + "$numberInt": "15" + }, + "tags": [ + "A", + "B", + "C" + ] + }, + { + "_id": { + "$numberInt": "2" + }, + "item": { + "name": "cd", + "code": "123" + }, + "qty": { + "$numberInt": "20" + }, + "tags": [ + "B" + ] + }, + { + "_id": { + "$numberInt": "3" + }, + "item": { + "name": "ij", + "code": "456" + }, + "qty": { + "$numberInt": "25" + }, + "tags": [ + "A", + "B" + ] + }, + { + "_id": { + "$numberInt": "4" + }, + "item": { + "name": "xy", + "code": "456" + }, + "qty": { + "$numberInt": "30" + }, + "tags": [ + "B", + "A" + ] + }, + { + "_id": { + "$numberInt": "5" + }, + "item": { + "name": "mn", + "code": "000" + }, + "qty": { + "$numberInt": "20" + }, + "tags": [ + [ + "A", + "B" + ], + "C" + ] + } + ] + }, + "indexes": [], + "action": { + "kind": "find", + "collection": "inventory", + "filter": { + "item.name": "ab" + } + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "1" + } + } + }, + { + "name": "item", + "value": { + "document": [ + { + "name": "name", + "value": { + "text": "ab" + } + }, + { + "name": "code", + "value": { + "text": "123" + } + } + ] + } + }, + { + "name": "qty", + "value": { + "whole": { + "$numberInt": "15" + } + } + }, + { + "name": "tags", + "value": { + "array": [ + { + "text": "A" + }, + { + "text": "B" + }, + { + "text": "C" + } + ] + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [ + "EQ_SHORTHAND" + ], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchOneArrayElement/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchOneArrayElement/scenario.json new file mode 100644 index 00000000000..28bd41eeb1e --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchOneArrayElement/scenario.json @@ -0,0 +1,334 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "query/filters/eq/matchOneArrayElement", + "title": "Match One Array Element", + "context": "FILTER", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/query/eq.txt", + "blob": "833cb20778a655fe9152395c1bd33475ffe603e9" + }, + "dataset": null, + "collections": { + "inventory": [ + { + "_id": { + "$numberInt": "1" + }, + "item": { + "name": "ab", + "code": "123" + }, + "qty": { + "$numberInt": "15" + }, + "tags": [ + "A", + "B", + "C" + ] + }, + { + "_id": { + "$numberInt": "2" + }, + "item": { + "name": "cd", + "code": "123" + }, + "qty": { + "$numberInt": "20" + }, + "tags": [ + "B" + ] + }, + { + "_id": { + "$numberInt": "3" + }, + "item": { + "name": "ij", + "code": "456" + }, + "qty": { + "$numberInt": "25" + }, + "tags": [ + "A", + "B" + ] + }, + { + "_id": { + "$numberInt": "4" + }, + "item": { + "name": "xy", + "code": "456" + }, + "qty": { + "$numberInt": "30" + }, + "tags": [ + "B", + "A" + ] + }, + { + "_id": { + "$numberInt": "5" + }, + "item": { + "name": "mn", + "code": "000" + }, + "qty": { + "$numberInt": "20" + }, + "tags": [ + [ + "A", + "B" + ], + "C" + ] + } + ] + }, + "indexes": [], + "action": { + "kind": "find", + "collection": "inventory", + "filter": { + "tags": "B" + } + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "1" + } + } + }, + { + "name": "item", + "value": { + "document": [ + { + "name": "name", + "value": { + "text": "ab" + } + }, + { + "name": "code", + "value": { + "text": "123" + } + } + ] + } + }, + { + "name": "qty", + "value": { + "whole": { + "$numberInt": "15" + } + } + }, + { + "name": "tags", + "value": { + "array": [ + { + "text": "A" + }, + { + "text": "B" + }, + { + "text": "C" + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "2" + } + } + }, + { + "name": "item", + "value": { + "document": [ + { + "name": "name", + "value": { + "text": "cd" + } + }, + { + "name": "code", + "value": { + "text": "123" + } + } + ] + } + }, + { + "name": "qty", + "value": { + "whole": { + "$numberInt": "20" + } + } + }, + { + "name": "tags", + "value": { + "array": [ + { + "text": "B" + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "3" + } + } + }, + { + "name": "item", + "value": { + "document": [ + { + "name": "name", + "value": { + "text": "ij" + } + }, + { + "name": "code", + "value": { + "text": "456" + } + } + ] + } + }, + { + "name": "qty", + "value": { + "whole": { + "$numberInt": "25" + } + } + }, + { + "name": "tags", + "value": { + "array": [ + { + "text": "A" + }, + { + "text": "B" + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "4" + } + } + }, + { + "name": "item", + "value": { + "document": [ + { + "name": "name", + "value": { + "text": "xy" + } + }, + { + "name": "code", + "value": { + "text": "456" + } + } + ] + } + }, + { + "name": "qty", + "value": { + "whole": { + "$numberInt": "30" + } + } + }, + { + "name": "tags", + "value": { + "array": [ + { + "text": "B" + }, + { + "text": "A" + } + ] + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [ + "EQ_SHORTHAND" + ], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupByNull/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupByNull/scenario.json new file mode 100644 index 00000000000..cafec4a6d66 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupByNull/scenario.json @@ -0,0 +1,90 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "aggregation/stages/group/groupByNull", + "title": "Group by null", + "context": "STAGE", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/aggregation/group.txt", + "blob": "8a18fc90e2df0775fccd5531514e665a1a131341" + }, + "dataset": "sample_mflix", + "collections": {}, + "indexes": [], + "action": { + "kind": "aggregate", + "collection": "movies", + "pipeline": [ + { + "$group": { + "_id": null, + "totalRuntime": { + "$sum": "$runtime" + }, + "averageRuntime": { + "$avg": "$runtime" + }, + "count": { + "$sum": { + "$numberInt": "1" + } + } + } + } + ] + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "exact": null + } + }, + { + "name": "totalRuntime", + "value": { + "whole": { + "$numberInt": "2167458" + } + } + }, + { + "name": "averageRuntime", + "value": { + "exact": { + "$numberDouble": "103.65652797704448" + } + } + }, + { + "name": "count", + "value": { + "whole": { + "$numberInt": "21349" + } + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + }, + "skipped": { + "results": "the example queries the sample_mflix sample dataset, which the tests do not load" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/calculateCountSumAndAverage/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupByYear/scenario.json similarity index 96% rename from core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/calculateCountSumAndAverage/scenario.json rename to core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupByYear/scenario.json index e2c2762ee66..9a933d73a9e 100644 --- a/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/calculateCountSumAndAverage/scenario.json +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupByYear/scenario.json @@ -2,8 +2,8 @@ "schemaVersion": { "$numberInt": "1" }, - "name": "aggregation/stages/group/calculateCountSumAndAverage", - "title": "Calculate Count, Sum, and Average", + "name": "aggregation/stages/group/groupByYear", + "title": "Group by Year", "context": "STAGE", "source": { "repository": "mongodb/docs", diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupDocumentsByYear/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupDocumentsByYear/scenario.json new file mode 100644 index 00000000000..64171cc4039 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupDocumentsByYear/scenario.json @@ -0,0 +1,149 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "aggregation/stages/group/groupDocumentsByYear", + "title": "Group Documents by Year", + "context": "STAGE", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/aggregation/group.txt", + "blob": "8a18fc90e2df0775fccd5531514e665a1a131341" + }, + "dataset": "sample_mflix", + "collections": {}, + "indexes": [], + "action": { + "kind": "aggregate", + "collection": "movies", + "pipeline": [ + { + "$match": { + "year": { + "$lt": { + "$numberInt": "1910" + } + } + } + }, + { + "$group": { + "_id": "$year", + "movies": { + "$push": "$$ROOT" + } + } + }, + { + "$addFields": { + "totalRuntime": { + "$sum": "$movies.runtime" + } + } + }, + { + "$sort": { + "_id": { + "$numberInt": "1" + } + } + } + ] + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "1896" + } + } + }, + { + "name": "movies", + "value": { + "text": "..." + } + }, + { + "name": "totalRuntime", + "value": { + "whole": { + "$numberInt": "2" + } + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "1903" + } + } + }, + { + "name": "movies", + "value": { + "text": "..." + } + }, + { + "name": "totalRuntime", + "value": { + "whole": { + "$numberInt": "11" + } + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "1909" + } + } + }, + { + "name": "movies", + "value": { + "text": "..." + } + }, + { + "name": "totalRuntime", + "value": { + "whole": { + "$numberInt": "14" + } + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + }, + "skipped": { + "results": "the example queries the sample_mflix sample dataset, which the tests do not load" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupTitlesByYear/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupTitlesByYear/scenario.json new file mode 100644 index 00000000000..6ed34db158a --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupTitlesByYear/scenario.json @@ -0,0 +1,133 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "aggregation/stages/group/groupTitlesByYear", + "title": "Group Titles by Year", + "context": "STAGE", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/aggregation/group.txt", + "blob": "8a18fc90e2df0775fccd5531514e665a1a131341" + }, + "dataset": "sample_mflix", + "collections": {}, + "indexes": [], + "action": { + "kind": "aggregate", + "collection": "movies", + "pipeline": [ + { + "$match": { + "year": { + "$lt": { + "$numberInt": "1910" + } + } + } + }, + { + "$group": { + "_id": "$year", + "titles": { + "$push": "$title" + } + } + }, + { + "$sort": { + "_id": { + "$numberInt": "1" + } + } + } + ] + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "1896" + } + } + }, + { + "name": "titles", + "value": { + "array": [ + { + "text": "The Kiss" + }, + { + "text": "The Kiss" + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "1903" + } + } + }, + { + "name": "titles", + "value": { + "array": [ + { + "text": "The Great Train Robbery" + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "1909" + } + } + }, + { + "name": "titles", + "value": { + "array": [ + { + "text": "A Corner in Wheat" + } + ] + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + }, + "skipped": { + "results": "the example queries the sample_mflix sample dataset, which the tests do not load" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/excludeFieldsFromEmbeddedDocuments/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/excludeAnEmbeddedFieldWithDotNotation/scenario.json similarity index 98% rename from core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/excludeFieldsFromEmbeddedDocuments/scenario.json rename to core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/excludeAnEmbeddedFieldWithDotNotation/scenario.json index a6b0479d107..711504a99fd 100644 --- a/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/excludeFieldsFromEmbeddedDocuments/scenario.json +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/excludeAnEmbeddedFieldWithDotNotation/scenario.json @@ -2,8 +2,8 @@ "schemaVersion": { "$numberInt": "1" }, - "name": "aggregation/stages/project/excludeFieldsFromEmbeddedDocuments", - "title": "Exclude Fields from Embedded Documents", + "name": "aggregation/stages/project/excludeAnEmbeddedFieldWithDotNotation", + "title": "Exclude an Embedded Field with Dot Notation", "context": "STAGE", "source": { "repository": "mongodb/docs", diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/includeAnEmbeddedFieldWithDotNotation/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/includeAnEmbeddedFieldWithDotNotation/scenario.json new file mode 100644 index 00000000000..9a435e0385f --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/includeAnEmbeddedFieldWithDotNotation/scenario.json @@ -0,0 +1,86 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "aggregation/stages/project/includeAnEmbeddedFieldWithDotNotation", + "title": "Include an Embedded Field with Dot Notation", + "context": "STAGE", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/aggregation/project.txt", + "blob": "a875b2e46f16cdd3d1c06306668fecd025e754b6" + }, + "dataset": "sample_mflix", + "collections": {}, + "indexes": [], + "action": { + "kind": "aggregate", + "collection": "movies", + "pipeline": [ + { + "$match": { + "title": "The Great Train Robbery" + } + }, + { + "$project": { + "imdb.rating": { + "$numberInt": "1" + } + } + }, + { + "$limit": { + "$numberInt": "1" + } + } + ] + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "exact": { + "$oid": "573a1390f29313caabcd42e8" + } + } + }, + { + "name": "imdb", + "value": { + "document": [ + { + "name": "rating", + "value": { + "exact": { + "$numberDouble": "7.4" + } + } + } + ] + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [ + "EQ_SHORTHAND" + ], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + }, + "skipped": { + "results": "the example queries the sample_mflix sample dataset, which the tests do not load" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectNewArrayFields/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayOfFields/scenario.json similarity index 94% rename from core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectNewArrayFields/scenario.json rename to core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayOfFields/scenario.json index 9186a53c6bb..8c319f465d7 100644 --- a/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectNewArrayFields/scenario.json +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayOfFields/scenario.json @@ -2,8 +2,8 @@ "schemaVersion": { "$numberInt": "1" }, - "name": "aggregation/stages/project/projectNewArrayFields", - "title": "Project New Array Fields", + "name": "aggregation/stages/project/projectAnArrayOfFields", + "title": "Project an Array of Fields", "context": "STAGE", "source": { "repository": "mongodb/docs", diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayWithAMissingField/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayWithAMissingField/scenario.json new file mode 100644 index 00000000000..71001a3ed2d --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayWithAMissingField/scenario.json @@ -0,0 +1,93 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "aggregation/stages/project/projectAnArrayWithAMissingField", + "title": "Project an Array with a Missing Field", + "context": "STAGE", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/aggregation/project.txt", + "blob": "a875b2e46f16cdd3d1c06306668fecd025e754b6" + }, + "dataset": "sample_mflix", + "collections": {}, + "indexes": [], + "action": { + "kind": "aggregate", + "collection": "movies", + "pipeline": [ + { + "$match": { + "title": "The Great Train Robbery" + } + }, + { + "$project": { + "myArray": [ + "$year", + "$runtime", + "$someField" + ] + } + }, + { + "$limit": { + "$numberInt": "1" + } + } + ] + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "exact": { + "$oid": "573a1390f29313caabcd42e8" + } + } + }, + { + "name": "myArray", + "value": { + "array": [ + { + "whole": { + "$numberInt": "1903" + } + }, + { + "whole": { + "$numberInt": "11" + } + }, + { + "exact": null + } + ] + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [ + "EQ_SHORTHAND" + ], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + }, + "skipped": { + "results": "the example queries the sample_mflix sample dataset, which the tests do not load" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/fixtures/updates/positional-all/updateAllDocumentsInAnArray/scenario.json b/core/src/test/resources/dev/morphia/test/generated/fixtures/updates/positional-all/updateAllDocumentsInAnArray/scenario.json new file mode 100644 index 00000000000..1bc1f9a24d4 --- /dev/null +++ b/core/src/test/resources/dev/morphia/test/generated/fixtures/updates/positional-all/updateAllDocumentsInAnArray/scenario.json @@ -0,0 +1,333 @@ +{ + "schemaVersion": { + "$numberInt": "1" + }, + "name": "query/updates/positional-all/updateAllDocumentsInAnArray", + "title": "Update All Documents in an Array", + "context": "UPDATE", + "source": { + "repository": "mongodb/docs", + "commit": "e4b0c153a0f39829bb1c2e5195beee1e92a8eff7", + "path": "content/manual/manual/source/reference/operator/update/positional-all.txt", + "blob": "2132adf02cce83c6e597ccf578bc2990525a5c6e" + }, + "dataset": null, + "collections": { + "students2": [ + { + "_id": { + "$numberInt": "1" + }, + "grades": [ + { + "grade": { + "$numberInt": "80" + }, + "mean": { + "$numberInt": "75" + }, + "std": { + "$numberInt": "8" + } + }, + { + "grade": { + "$numberInt": "85" + }, + "mean": { + "$numberInt": "90" + }, + "std": { + "$numberInt": "6" + } + }, + { + "grade": { + "$numberInt": "85" + }, + "mean": { + "$numberInt": "85" + }, + "std": { + "$numberInt": "8" + } + } + ] + }, + { + "_id": { + "$numberInt": "2" + }, + "grades": [ + { + "grade": { + "$numberInt": "90" + }, + "mean": { + "$numberInt": "75" + }, + "std": { + "$numberInt": "8" + } + }, + { + "grade": { + "$numberInt": "87" + }, + "mean": { + "$numberInt": "90" + }, + "std": { + "$numberInt": "5" + } + }, + { + "grade": { + "$numberInt": "85" + }, + "mean": { + "$numberInt": "85" + }, + "std": { + "$numberInt": "6" + } + } + ] + } + ] + }, + "indexes": [], + "action": { + "kind": "update", + "collection": "students2", + "filter": {}, + "update": { + "$inc": { + "grades.$[].std": { + "$numberInt": "-2" + } + } + }, + "multi": true + }, + "expected": { + "printed": [ + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "1" + } + } + }, + { + "name": "grades", + "value": { + "array": [ + { + "document": [ + { + "name": "grade", + "value": { + "whole": { + "$numberInt": "80" + } + } + }, + { + "name": "mean", + "value": { + "whole": { + "$numberInt": "75" + } + } + }, + { + "name": "std", + "value": { + "whole": { + "$numberInt": "6" + } + } + } + ] + }, + { + "document": [ + { + "name": "grade", + "value": { + "whole": { + "$numberInt": "85" + } + } + }, + { + "name": "mean", + "value": { + "whole": { + "$numberInt": "90" + } + } + }, + { + "name": "std", + "value": { + "whole": { + "$numberInt": "4" + } + } + } + ] + }, + { + "document": [ + { + "name": "grade", + "value": { + "whole": { + "$numberInt": "85" + } + } + }, + { + "name": "mean", + "value": { + "whole": { + "$numberInt": "85" + } + } + }, + { + "name": "std", + "value": { + "whole": { + "$numberInt": "6" + } + } + } + ] + } + ] + } + } + ] + }, + { + "document": [ + { + "name": "_id", + "value": { + "whole": { + "$numberInt": "2" + } + } + }, + { + "name": "grades", + "value": { + "array": [ + { + "document": [ + { + "name": "grade", + "value": { + "whole": { + "$numberInt": "90" + } + } + }, + { + "name": "mean", + "value": { + "whole": { + "$numberInt": "75" + } + } + }, + { + "name": "std", + "value": { + "whole": { + "$numberInt": "6" + } + } + } + ] + }, + { + "document": [ + { + "name": "grade", + "value": { + "whole": { + "$numberInt": "87" + } + } + }, + { + "name": "mean", + "value": { + "whole": { + "$numberInt": "90" + } + } + }, + { + "name": "std", + "value": { + "whole": { + "$numberInt": "3" + } + } + } + ] + }, + { + "document": [ + { + "name": "grade", + "value": { + "whole": { + "$numberInt": "85" + } + } + }, + { + "name": "mean", + "value": { + "whole": { + "$numberInt": "85" + } + } + }, + { + "name": "std", + "value": { + "whole": { + "$numberInt": "4" + } + } + } + ] + } + ] + } + } + ] + } + ] + }, + "comparison": { + "order": "ORDERED", + "rules": [], + "ignore": [], + "tolerance": null + }, + "requirements": { + "minimumServer": null, + "topology": "STANDALONE" + } +} diff --git a/core/src/test/resources/dev/morphia/test/generated/manifest.json b/core/src/test/resources/dev/morphia/test/generated/manifest.json index 82dc6ff1b57..f8f9b191aeb 100644 --- a/core/src/test/resources/dev/morphia/test/generated/manifest.json +++ b/core/src/test/resources/dev/morphia/test/generated/manifest.json @@ -129,6 +129,16 @@ "name" : "aggregation/expressions/binarySize/binarySizeExpressionOperator", "scenario" : "/dev/morphia/test/aggregation/expressions/binarySize/binarySizeExpressionOperator/scenario.json", "test" : "dev.morphia.test.aggregation.expressions.TestBinarySize#testBinarySizeExpressionOperator" + }, { + "kind" : "GENERATED", + "name" : "aggregation/expressions/bitAnd/bitwiseAndWithALongAndInteger", + "scenario" : "/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithALongAndInteger/scenario.json", + "test" : "dev.morphia.test.generated.expressions.TestBitAnd#bitwiseAndWithALongAndInteger" + }, { + "kind" : "GENERATED", + "name" : "aggregation/expressions/bitAnd/bitwiseAndWithTwoIntegers", + "scenario" : "/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithTwoIntegers/scenario.json", + "test" : "dev.morphia.test.generated.expressions.TestBitAnd#bitwiseAndWithTwoIntegers" }, { "kind" : "CONVERTED", "name" : "aggregation/expressions/bitNot/bitNotExpressionOperator", @@ -1331,14 +1341,29 @@ "test" : "dev.morphia.test.aggregation.stages.TestGraphLookup#testWithinASingleCollection" }, { "kind" : "GENERATED", - "name" : "aggregation/stages/group/calculateCountSumAndAverage", - "scenario" : "/dev/morphia/test/generated/fixtures/stages/group/calculateCountSumAndAverage/scenario.json", - "test" : "dev.morphia.test.generated.stages.TestGroup#calculateCountSumAndAverage" + "name" : "aggregation/stages/group/groupByNull", + "scenario" : "/dev/morphia/test/generated/fixtures/stages/group/groupByNull/scenario.json", + "test" : "dev.morphia.test.generated.stages.TestGroup#groupByNull" }, { "kind" : "GENERATED", "name" : "aggregation/stages/group/groupByRating", "scenario" : "/dev/morphia/test/generated/fixtures/stages/group/groupByRating/scenario.json", "test" : "dev.morphia.test.generated.stages.TestGroup#groupByRating" + }, { + "kind" : "GENERATED", + "name" : "aggregation/stages/group/groupByYear", + "scenario" : "/dev/morphia/test/generated/fixtures/stages/group/groupByYear/scenario.json", + "test" : "dev.morphia.test.generated.stages.TestGroup#groupByYear" + }, { + "kind" : "GENERATED", + "name" : "aggregation/stages/group/groupDocumentsByYear", + "scenario" : "/dev/morphia/test/generated/fixtures/stages/group/groupDocumentsByYear/scenario.json", + "test" : "dev.morphia.test.generated.stages.TestGroup#groupDocumentsByYear" + }, { + "kind" : "GENERATED", + "name" : "aggregation/stages/group/groupTitlesByYear", + "scenario" : "/dev/morphia/test/generated/fixtures/stages/group/groupTitlesByYear/scenario.json", + "test" : "dev.morphia.test.generated.stages.TestGroup#groupTitlesByYear" }, { "kind" : "CONVERTED", "name" : "aggregation/stages/group/pivotData", @@ -1401,14 +1426,19 @@ "test" : "dev.morphia.test.aggregation.stages.TestProject#testConditionallyExcludeFields" }, { "kind" : "GENERATED", - "name" : "aggregation/stages/project/excludeFieldsFromEmbeddedDocuments", - "scenario" : "/dev/morphia/test/generated/fixtures/stages/project/excludeFieldsFromEmbeddedDocuments/scenario.json", - "test" : "dev.morphia.test.generated.stages.TestProject#excludeFieldsFromEmbeddedDocuments" + "name" : "aggregation/stages/project/excludeAnEmbeddedFieldWithDotNotation", + "scenario" : "/dev/morphia/test/generated/fixtures/stages/project/excludeAnEmbeddedFieldWithDotNotation/scenario.json", + "test" : "dev.morphia.test.generated.stages.TestProject#excludeAnEmbeddedFieldWithDotNotation" }, { "kind" : "GENERATED", "name" : "aggregation/stages/project/excludeFieldsFromOutputDocuments", "scenario" : "/dev/morphia/test/generated/fixtures/stages/project/excludeFieldsFromOutputDocuments/scenario.json", "test" : "dev.morphia.test.generated.stages.TestProject#excludeFieldsFromOutputDocuments" + }, { + "kind" : "GENERATED", + "name" : "aggregation/stages/project/includeAnEmbeddedFieldWithDotNotation", + "scenario" : "/dev/morphia/test/generated/fixtures/stages/project/includeAnEmbeddedFieldWithDotNotation/scenario.json", + "test" : "dev.morphia.test.generated.stages.TestProject#includeAnEmbeddedFieldWithDotNotation" }, { "kind" : "CONVERTED", "name" : "aggregation/stages/project/includeSpecificFieldsFromEmbeddedDocuments", @@ -1426,9 +1456,14 @@ "test" : "dev.morphia.test.aggregation.stages.TestProject#testIncludeSpecificFieldsInOutputDocuments" }, { "kind" : "GENERATED", - "name" : "aggregation/stages/project/projectNewArrayFields", - "scenario" : "/dev/morphia/test/generated/fixtures/stages/project/projectNewArrayFields/scenario.json", - "test" : "dev.morphia.test.generated.stages.TestProject#projectNewArrayFields" + "name" : "aggregation/stages/project/projectAnArrayOfFields", + "scenario" : "/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayOfFields/scenario.json", + "test" : "dev.morphia.test.generated.stages.TestProject#projectAnArrayOfFields" + }, { + "kind" : "GENERATED", + "name" : "aggregation/stages/project/projectAnArrayWithAMissingField", + "scenario" : "/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayWithAMissingField/scenario.json", + "test" : "dev.morphia.test.generated.stages.TestProject#projectAnArrayWithAMissingField" }, { "kind" : "CONVERTED", "name" : "aggregation/stages/project/suppressIdFieldInTheOutputDocuments", @@ -1629,6 +1664,16 @@ "name" : "query/filters/and/andQueriesWithMultipleExpressionsSpecifyingTheSameOperator", "scenario" : "/dev/morphia/test/query/filters/and/andQueriesWithMultipleExpressionsSpecifyingTheSameOperator/scenario.json", "test" : "dev.morphia.test.query.filters.TestAnd#testAndQueriesWithMultipleExpressionsSpecifyingTheSameOperator" + }, { + "kind" : "GENERATED", + "name" : "query/filters/and/combineConditionsOnOneField", + "scenario" : "/dev/morphia/test/generated/fixtures/filters/and/combineConditionsOnOneField/scenario.json", + "test" : "dev.morphia.test.generated.filters.TestAnd#combineConditionsOnOneField" + }, { + "kind" : "GENERATED", + "name" : "query/filters/and/matchEitherValueWithIn", + "scenario" : "/dev/morphia/test/generated/fixtures/filters/and/matchEitherValueWithIn/scenario.json", + "test" : "dev.morphia.test.generated.filters.TestAnd#matchEitherValueWithIn" }, { "kind" : "CONVERTED", "name" : "query/filters/bitsAllClear/binDataBitmask", @@ -1709,6 +1754,16 @@ "name" : "query/filters/elemMatch/elementMatch", "scenario" : "/dev/morphia/test/query/filters/elemMatch/elementMatch/scenario.json", "test" : "dev.morphia.test.query.filters.TestElemMatch#testElementMatch" + }, { + "kind" : "GENERATED", + "name" : "query/filters/elemMatch/matchAnElementWithDotNotation", + "scenario" : "/dev/morphia/test/generated/fixtures/filters/elemMatch/matchAnElementWithDotNotation/scenario.json", + "test" : "dev.morphia.test.generated.filters.TestElemMatch#matchAnElementWithDotNotation" + }, { + "kind" : "GENERATED", + "name" : "query/filters/elemMatch/matchWhenNoElementIsXyz", + "scenario" : "/dev/morphia/test/generated/fixtures/filters/elemMatch/matchWhenNoElementIsXyz/scenario.json", + "test" : "dev.morphia.test.generated.filters.TestElemMatch#matchWhenNoElementIsXyz" }, { "kind" : "CONVERTED", "name" : "query/filters/eq/arrayElementEqualsAValue", @@ -1729,6 +1784,26 @@ "name" : "query/filters/eq/fieldInEmbeddedDocumentEqualsAValue", "scenario" : "/dev/morphia/test/query/filters/eq/fieldInEmbeddedDocumentEqualsAValue/scenario.json", "test" : "dev.morphia.test.query.filters.TestEq#testFieldInEmbeddedDocumentEqualsAValue" + }, { + "kind" : "GENERATED", + "name" : "query/filters/eq/matchAQuantityExactly", + "scenario" : "/dev/morphia/test/generated/fixtures/filters/eq/matchAQuantityExactly/scenario.json", + "test" : "dev.morphia.test.generated.filters.TestEq#matchAQuantityExactly" + }, { + "kind" : "GENERATED", + "name" : "query/filters/eq/matchAnArrayExactly", + "scenario" : "/dev/morphia/test/generated/fixtures/filters/eq/matchAnArrayExactly/scenario.json", + "test" : "dev.morphia.test.generated.filters.TestEq#matchAnArrayExactly" + }, { + "kind" : "GENERATED", + "name" : "query/filters/eq/matchAnEmbeddedFieldWithDotNotation", + "scenario" : "/dev/morphia/test/generated/fixtures/filters/eq/matchAnEmbeddedFieldWithDotNotation/scenario.json", + "test" : "dev.morphia.test.generated.filters.TestEq#matchAnEmbeddedFieldWithDotNotation" + }, { + "kind" : "GENERATED", + "name" : "query/filters/eq/matchOneArrayElement", + "scenario" : "/dev/morphia/test/generated/fixtures/filters/eq/matchOneArrayElement/scenario.json", + "test" : "dev.morphia.test.generated.filters.TestEq#matchOneArrayElement" }, { "kind" : "CONVERTED", "name" : "query/filters/geoIntersects/intersectsABigPolygon", @@ -1989,6 +2064,11 @@ "name" : "query/updates/position/useANegativeArrayIndexPositionToAddElementsToTheArray", "scenario" : "/dev/morphia/test/query/updates/position/useANegativeArrayIndexPositionToAddElementsToTheArray/scenario.json", "test" : "dev.morphia.test.query.updates.TestPosition#testUseANegativeArrayIndexPositionToAddElementsToTheArray" + }, { + "kind" : "GENERATED", + "name" : "query/updates/positional-all/updateAllDocumentsInAnArray", + "scenario" : "/dev/morphia/test/generated/fixtures/updates/positional-all/updateAllDocumentsInAnArray/scenario.json", + "test" : "dev.morphia.test.generated.updates.TestPositionalAll#updateAllDocumentsInAnArray" }, { "kind" : "GENERATED", "name" : "query/updates/positional-all/updateAllElementsInAnArray", @@ -2128,10 +2208,14 @@ "owner" : "GENERATED", "path" : "src/test/java/dev/morphia/test/generated/expressions/TestAddToSet.java", "sha256" : "566c3a99aa364e60aec4f855b7873733cece3f2fc01550f2f63c314803232725" + }, { + "owner" : "GENERATED", + "path" : "src/test/java/dev/morphia/test/generated/expressions/TestBitAnd.java", + "sha256" : "5f4b60b0bff1ae892d417d7084fac33941ffa8a82113d40621e89d9e8b3fea19" }, { "owner" : "GENERATED", "path" : "src/test/java/dev/morphia/test/generated/expressions/TestBitOr.java", - "sha256" : "c9143b6debf35d4a2045c2adf2caaf294359e3363e6bb99c2fea65d5854f6208" + "sha256" : "059d9687be33da93e653202c154bb08e6de8f19bda0c75dc1af4c8e438889ead" }, { "owner" : "GENERATED", "path" : "src/test/java/dev/morphia/test/generated/expressions/TestBottom.java", @@ -2176,6 +2260,18 @@ "owner" : "GENERATED", "path" : "src/test/java/dev/morphia/test/generated/expressions/TestTopN.java", "sha256" : "64924cad5268b18d9c45fe2f2a44dd823c3a9f271a7bbf1a7f2a32da119cf354" + }, { + "owner" : "GENERATED", + "path" : "src/test/java/dev/morphia/test/generated/filters/TestAnd.java", + "sha256" : "f3a39175b4ffd0ae1d719c993676a436db32e844f18841f8bd4916cb1941511b" + }, { + "owner" : "GENERATED", + "path" : "src/test/java/dev/morphia/test/generated/filters/TestElemMatch.java", + "sha256" : "d6086bbdb9ef0be8cf8c085571ab0564fdab3f2b8322457a0652f1901e1e0e5f" + }, { + "owner" : "GENERATED", + "path" : "src/test/java/dev/morphia/test/generated/filters/TestEq.java", + "sha256" : "67fa6a320f8defeb8681c5f25ff894e40c0cad4fcd9ee987e5a194d7a7bbdd40" }, { "owner" : "GENERATED", "path" : "src/test/java/dev/morphia/test/generated/filters/TestGt.java", @@ -2187,7 +2283,7 @@ }, { "owner" : "GENERATED", "path" : "src/test/java/dev/morphia/test/generated/stages/TestGroup.java", - "sha256" : "76a4b7d8e4d8144f2e05a884ba840a4e0144587cb17e46a39e95328d600e1c34" + "sha256" : "8fc2be89af7d30bf773acb185442897407a208ed9ad04b3056a81294d83acfaf" }, { "owner" : "GENERATED", "path" : "src/test/java/dev/morphia/test/generated/stages/TestLimit.java", @@ -2195,7 +2291,7 @@ }, { "owner" : "GENERATED", "path" : "src/test/java/dev/morphia/test/generated/stages/TestProject.java", - "sha256" : "4924048729dedb98185ce383d3a7147eb5dfcd45fdeffe9953f37ec1ab540695" + "sha256" : "8d2eb0705b98e391cbcd0baaada91b441ebc34ce0d5907f647f1a423f62c8fa6" }, { "owner" : "GENERATED", "path" : "src/test/java/dev/morphia/test/generated/stages/TestSort.java", @@ -2211,7 +2307,7 @@ }, { "owner" : "GENERATED", "path" : "src/test/java/dev/morphia/test/generated/updates/TestPositionalAll.java", - "sha256" : "1f15f53398639623ff92a2275b197f99359ef1fb9c68b12ad2a90d0ad11bb4aa" + "sha256" : "79930786aacc173c077704e4dc076e5071d32de5e564a3a50bdcf33a7cea087d" }, { "owner" : "GENERATED", "path" : "src/test/java/dev/morphia/test/generated/updates/TestPush.java", @@ -3396,10 +3492,18 @@ "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/generated/fixtures/expressions/addToSet/collectTheGenresOfEachDirector/scenario.json", "sha256" : "dc936d1af892081640343bacd13346c9246e4c8ad71619587d80567baf9cd89a" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithALongAndInteger/scenario.json", + "sha256" : "ae017e68b3d0d8e7410488cfad3168c722607cebe89d3cb09d1c5405a9273cb8" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitAnd/bitwiseAndWithTwoIntegers/scenario.json", + "sha256" : "473ad73a7f84ada6b5ee06277566c2b22d9b6085a8aab87c6be944bebb46cf39" }, { "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/generated/fixtures/expressions/bitOr/bitwiseOrWithTwoIntegers/scenario.json", - "sha256" : "a169a745be13ab3606280326502ac4fe62bd0017e8aa501cf36c14d5d8c7e2dc" + "sha256" : "c5e33865fc2c806d27234d87110aa6dec5dbde25b7fe4267c9de89fd47e5ea99" }, { "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/generated/fixtures/expressions/bottom/findTheBottomRatingAcrossMultipleYears/scenario.json", @@ -3472,6 +3576,38 @@ "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/generated/fixtures/expressions/topN/findTheThreeHighestRatedMoviesInASingleGenre/scenario.json", "sha256" : "c00273bdf10a7ad0ba29a9e4f603963c802b0be41588284f15a273a45343d6ba" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/filters/and/combineConditionsOnOneField/scenario.json", + "sha256" : "724c99c1eeb7e9a577d0f2c16d12e6c49bf1619a9fe97feba1b675c3fc414f34" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/filters/and/matchEitherValueWithIn/scenario.json", + "sha256" : "347d08a8cbacdf7ad365945a1007114b954fa4aed1dc7648b032710a4aa000fc" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/filters/elemMatch/matchAnElementWithDotNotation/scenario.json", + "sha256" : "cc872040b9a7769c9efa9dcdae8f99546d00d8edf4e85b90af520624e8b5413e" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/filters/elemMatch/matchWhenNoElementIsXyz/scenario.json", + "sha256" : "f7dcab9b6e9e6dec7786daa39a7fd210d8b7f1ef902becf9fee686ef864f6df8" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAQuantityExactly/scenario.json", + "sha256" : "c55c07473f85c69affa6ae3e0431de4036882af62cb4bff2f62044f5ef32f4e7" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAnArrayExactly/scenario.json", + "sha256" : "ca6f1382948c2f435a658181752fc94fbe3e65c7af3ba1bec334db5ce32408e5" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchAnEmbeddedFieldWithDotNotation/scenario.json", + "sha256" : "b8dd36fa7ff3d67e51ec50a7e280cb96dda1559ee8cc95415951d836f8738972" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/filters/eq/matchOneArrayElement/scenario.json", + "sha256" : "413b8f879cbd46a8c25da4344dd12e1524586bc7e318ef92db8a531947872e69" }, { "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/generated/fixtures/filters/gt/performAnUpdateBasedOnEmbeddedDocumentFields/scenario.json", @@ -3490,12 +3626,24 @@ "sha256" : "ccdec466a95e3325eecd8997cb852a14de71a815c6f6c5e4cd5b77332aab5296" }, { "owner" : "GENERATED", - "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/group/calculateCountSumAndAverage/scenario.json", - "sha256" : "5e51f6450dc2a461e627a217c5e1f31b687219f82ce7faaff2c0661b893078ad" + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupByNull/scenario.json", + "sha256" : "0cb67947c9e0defb875d7cd0e66147f2544a2d42fd9a957315246a8a7338aa95" }, { "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupByRating/scenario.json", "sha256" : "d8015deb73c4cd96f6177904c6563bac1cf4fdceb6d87a54f2afee6f1cac5aaf" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupByYear/scenario.json", + "sha256" : "77834ac8a36d3cf7cf88b905e32dbdf99440fdbb835eeb2c259e85b7eb78efd6" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupDocumentsByYear/scenario.json", + "sha256" : "398d903111715ef7bb881b3dbfbcbfffb573499a12244c8ca05f876e9de6453e" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/group/groupTitlesByYear/scenario.json", + "sha256" : "cb481877883fee8abc0cb42a0fb31a4f300f80090acc0b7a60691355c7c11950" }, { "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/group/retrieveDistinctValues/scenario.json", @@ -3506,16 +3654,24 @@ "sha256" : "d51f296e35fe693d60b58114389199606288209b092abdb4b02abc798f7f7551" }, { "owner" : "GENERATED", - "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/project/excludeFieldsFromEmbeddedDocuments/scenario.json", - "sha256" : "b715944efa7e34f803f112356ae1a1e5a639a016e92f4e09dc5172c3faca5d7b" + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/project/excludeAnEmbeddedFieldWithDotNotation/scenario.json", + "sha256" : "505f90a467dfd29da5cc3be75e5a1d955b4ef64a5c9ab2ca9de2fc731ba6bfb5" }, { "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/project/excludeFieldsFromOutputDocuments/scenario.json", "sha256" : "ec584e58a7d14b5960225874cea9be799385de1ef00c0a20a8f4b2d36547630b" }, { "owner" : "GENERATED", - "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectNewArrayFields/scenario.json", - "sha256" : "8c6a8c128da3126c74e784acfc793b228658a4d7ac5d1264b566c553a259ca27" + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/project/includeAnEmbeddedFieldWithDotNotation/scenario.json", + "sha256" : "06249527af1fc1d1f01ef60213952ece93a817fc95c9df7f88a5f468d039e649" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayOfFields/scenario.json", + "sha256" : "9a3887e4c20872a1bacce7dc408e3e9be134840074e3186e114d9a57b73dac10" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/project/projectAnArrayWithAMissingField/scenario.json", + "sha256" : "33ea2e209b9ccf14498c6efafb3d438998652364843dd02fc6515aed931a0102" }, { "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/generated/fixtures/stages/sort/ascendingAndDescendingSort/scenario.json", @@ -3536,6 +3692,10 @@ "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/generated/fixtures/updates/addToSet/valueAlreadyExists/scenario.json", "sha256" : "3dd7f6afb62af2af92038a202c29aa5e0bd46841fb854ea0338bdad09c871d32" + }, { + "owner" : "GENERATED", + "path" : "src/test/resources/dev/morphia/test/generated/fixtures/updates/positional-all/updateAllDocumentsInAnArray/scenario.json", + "sha256" : "1a435e4cf690e290a2a370f3c4e418b8a3d74411802066dd8e734ddfe6583514" }, { "owner" : "GENERATED", "path" : "src/test/resources/dev/morphia/test/generated/fixtures/updates/positional-all/updateAllElementsInAnArray/scenario.json", diff --git a/design/operator-audits-design.md b/design/operator-audits-design.md index c981bbcc3cf..7a26bacb0e7 100644 --- a/design/operator-audits-design.md +++ b/design/operator-audits-design.md @@ -183,9 +183,9 @@ methods or fixture directories disagree with it. | `api` | Inventories Morphia's public API with the JDK compiler, used to verify bindings. | Yes | | `bindings` | Captures which legacy test owns which fixture, and the descriptive-name backport. | Yes | | `naming` | Descriptive example names, and the name registry reconciler. | Names: yes. Reconciler: not yet. | -| `rst`, `model` | The legacy line-based RST extractor. | Yes, until the structured parser replaces it | +| `rst`, `model` | The legacy line-based RST extractor. | Only by the retired conversion commands | | `sources`, `documents`, `discovery` | Pinned Git source bundles, the Snooty parser adapter, capability discovery. | Yes, weekly | -| `scenarios` | Structured scenario extraction: native input/output groups, and section assembly, which gives each block a role by what the shell grammar makes of it. | Not yet; it replaces `rst` next | +| `scenarios` | Structured scenario extraction: native input/output groups, and section assembly, which gives each block a role by what the shell grammar makes of it. | Yes: the example inventory, weekly | | `coverage` | Capability catalog and plan contracts, coverage comparison, and `AuditJson`, the strict JSON codec every package uses. | Yes, weekly | Each package with a command has a `*Main.kt` entry point, run through the exec plugin with @@ -198,6 +198,7 @@ every file. The ones the running system depends on: | File | Written by | Read by | | --- | --- | --- | +| `scenario-plan.json` | `GenerateMainKt plan`, reviewed | The inventory: which pages to extract, and how. | | `documented-examples.json` | `GenerateMainKt inventory` | The generator, discovery's diff, the publisher's new-example check. | | `dsl-bindings.json` | Hand, reviewed | The generator, after verification against core's API. | | `generation-review.json` | Hand, reviewed | The generator: which families to generate, and the exclusions. | @@ -210,13 +211,20 @@ every file. The ones the running system depends on: Every example on the current operator pages, with its owner, lives in `documented-examples.json`. -1. `fetch.py local` collects the operator pages and their includes at one mongodb/docs commit - from a sparse Git clone. `fetch.py current` followed by `fetch.py pages` does the same through - the GitHub API, which rate-limits. -2. `GenerateMainKt inventory` extracts each page's examples and matches each one to an existing - fixture: by title, or, if the title changed, by its action text, or else by its descriptive name - (the backport named every fixture for its example). The matching uses the legacy RST - extractor, which is also how the fixtures were made. +1. `SourcesMainKt` pins one mongodb/docs commit's manual into a source bundle, from a sparse Git + clone, and `DocumentsMainKt` parses its operator pages with the pinned Snooty parser. +2. `GenerateMainKt plan` drafts `scenario-plan.json` from the parsed pages: a rule for each page + that declares one operator (`.. expression:: $add`) and has an examples section. The rule names + that section, shares its own code as setup when it has subsections, lists the page's + non-driver tabs as scenario variants and its `bash` highlighting as shell, and reads + unlabeled code as JavaScript. The plan is reviewed policy: a draft is committed only after its + diff is read. +3. `GenerateMainKt inventory` extracts the planned pages with the structured scenario extraction + (see [section assembly](operator-audits-section-assembly.md)) and matches each example to an + existing fixture: by title, or, if the title changed, by its action text, or else by its + descriptive name (the backport named every fixture for its example). An example's title is its + section's, `main` for a generic one, and `
:: ` for a scenario tab, as the legacy + inventory spelled them. A page that shows an identical example twice (the same title, source and state) lists it once. Each example gets one status: @@ -225,6 +233,12 @@ Each example gets one status: the page again. - **UNNAMED**: it has no usable title, so it needs a reviewed name. - **AMBIGUOUS**: its name collides with another, or several fixtures match it. +- **UNSUPPORTED**: nothing covers it, and the extraction found no program for it; the detail is the + reason, such as `AFTER_EARLIER_WRITE` or a result the grammar can't read. + +A section can hold several examples under one title, such as a query written with dot notation +and again with an embedded document. Such a title names no owner, and the examples need reviewed +names. An example without a program yields a shared title to any example that has one. `example-names.json` holds the reviews that resolve the last two: a descriptive name for a generic title, or the owner among several matching fixtures, each with its reason. A review is keyed by page, @@ -235,14 +249,15 @@ generated case's title and display name. Generated cases never count as owners: generation derives them from the unowned examples on every run. -Before extraction, a page is reduced to its mongosh content. Of a `.. tabs-drivers::` set only -the `shell` tab is kept, and of a composable tutorial only the `.. selected-content::` selected for -`shell`; the other drivers' content holds their own code and remote shared includes. The files that -`.. input::`, `.. output::` and `.. literalinclude::` name are then spliced in as inline blocks: -MongoDB's tested snippets (`/code-examples/tested/...`, read from `content/code-examples`) and -include files. Each is recorded with its blob, like an include. Many tested snippets query MongoDB's -sample datasets (`db.movies`) and print elided results; they extract like any other example and -then show up as generation gaps. +Only the mongosh content becomes examples: a driver tab or a composable tutorial's driver +selection is a foreign group, and a selection or tab for the shell is a reference group. Tested +snippets (`/code-examples/tested/...`) and include files are resolved through the bundle, each +with its blob. Many tested snippets query MongoDB's sample datasets (`db.movies`) and print elided +results; they extract like any other example and then show up as generation gaps. + +Until an update's case runs the read the page shows after it, what a page prints after an update +(an acknowledgement, or the documents its filter matches) goes to generation as that update's +printed result, the convention the converted cases use. ### Generation @@ -360,8 +375,10 @@ differently in a way a rule covers. 1. It clones mongodb/docs sparsely and without blobs, limited to the operator pages and includes, which avoids the API rate limit. 2. `audits/discover.sh` runs in a throwaway worktree of HEAD: - - it reinventories the pages, and `inventory.diff` shows the changes against the committed - inventory; + - it pins the manual into a source bundle and parses the operator pages; + - it reinventories the pages under the committed plan, and `inventory.diff` shows the changes + against the committed inventory; a freshly drafted plan's `plan.diff` shows pages the + committed plan lacks or reads differently; - it generates a candidate with the committed bindings and review, which writes `gaps.json`; - it integrates the candidate under both mappers. 3. The job writes `summary.md` to the job summary and uploads every report. @@ -370,7 +387,8 @@ differently in a way a rule covers. 1. `PublishMainKt discovery` turns the reports into findings with `DiscoveryFindings`: - `MISSING_BINDING`: one per unbound node, listing every example it blocks; - - `NEW_EXAMPLE`: an unowned example that is not in the committed inventory; + - `NEW_EXAMPLE`: an unowned example that is not in the committed inventory, identified by its + reviewed name or title, and by its action when siblings still share one; - `INTEGRATION_FAILURE`: the failing tests from the log. 2. The publisher files them in MorphiaOrg/morphia. @@ -440,8 +458,7 @@ inventories core's API and writes `coverage.json`; the Publish job files its `MI `VERSION_ANNOTATION` findings from healthy contexts. A lost capability or a count drop makes its context unhealthy, and nothing is published for it. -Example extraction still uses the legacy RST extractor described above; it retires once the -structured scenario extraction resolves tested snippets and drivers' content as it does. +The example inventory reads the same bundle; the legacy RST extractor no longer feeds it. ## Testing the audits @@ -463,7 +480,7 @@ audits module or core's operator tests. These exist only until the migration finishes. The plan says what retires each one. -- **The legacy RST extractor** (`rst/`, `model/`), which the example inventory and conversion use. +- **The legacy RST extractor** (`rst/`, `model/`), which only the retired conversion commands still use. - **`FormMainKt` conversion commands and their review files**, needed while legacy fixtures remain. ## Keeping this document current diff --git a/design/operator-audits-progress.md b/design/operator-audits-progress.md index 92b630ff1a4..3a6a7812e8d 100644 --- a/design/operator-audits-progress.md +++ b/design/operator-audits-progress.md @@ -2766,3 +2766,8 @@ no product-documentation changes. Legacy operator AsciiDoc tables are intentiona inserts, each action is its own scenario, and skipped source is recorded with a reason. Over all 297 operator pages (docs e4b0c153) with a draft plan, 605 scenarios normalize, against 582 examples in the legacy inventory; 508 of those match by title. +- Parser retirement, step 2 (structured inventory): `GenerateMainKt plan` drafts the committed + `scenario-plan.json` and `inventory` extracts the planned pages with the structured extractor; + discovery parses the operator pages instead of running `fetch.py`. At docs e4b0c153: 290 pages, + 307 owned, 291 unowned, 101 unsupported, none ambiguous or unnamed. 60 sibling examples got + proposed names; 19 reviews whose examples have no action any more were dropped. diff --git a/design/operator-audits-section-assembly.md b/design/operator-audits-section-assembly.md index d3db15a5aa7..e94ab2dd148 100644 --- a/design/operator-audits-section-assembly.md +++ b/design/operator-audits-section-assembly.md @@ -41,6 +41,8 @@ Skipped source stays visible on its scenario (`skipped`) or, for shared setup, o - `SEVERAL_COMMANDS`: a block holding more than one action; - `MIXED_SECTION_ROLES`: a block holding setup and an action together, which one role can't describe; - `TRAILING_SETUP`: setup or a seed no action follows; +- `UNSUPPORTED_SETUP`: an insert or index build the grammar can't read; the actions after it report + `UNSUPPORTED_SETUP` rather than run without that data; - `UNSUPPORTED_SOURCE`: anything else the processor can't read, such as a binding used before it is declared. @@ -75,13 +77,30 @@ example selection; it does not implicitly select that section's descendants. Set not be excluded. Missing/duplicate ownership, unresolved languages/selectors and non-setup commands block promotion and complete naming. Selected raw source remains visible when validation fails. +A section that inserts in plain code and queries in a native input/output group gives that +group its inserts; its insert-only code is then not a scenario of its own. After a page's +scenarios are built, two page-wide passes run in page order: + +- **Inherited inserts.** A scenario that inserts nothing into its action's collection gets the + inserts the page most recently made into that collection, from any earlier section (a section + that only loads data included), with the declarations they read, but never another example's + action. When the inherited setup doesn't run, the query reports `UNSUPPORTED_INHERITED_SETUP`. + Setup the grammar can't read may have replaced older data, so nothing is inherited past it; a + native group after such setup in its own section reports it too. Inherited copies count + against the source and report budgets. A later section's query on "the survey collection above" runs against + it. +- **Reads after writes.** A read that follows a write in its section (an update, a pipeline with + `$merge` or `$out`, or a write the page shows but no scenario runs, such as a `bulkWrite` in a + `try` block) reports `AFTER_EARLIER_WRITE` and has no program of its own. + Tabs and `selected-content` branches start separate owners; a selection naming a reference tab reads as reference, one naming a foreign tab as foreign. A shared section with one branch per language shares its reference branch, and shares nothing when only other languages show code. The shared source contributes only its setup blocks, classified as above; its commands, templates and unreadable blocks are skipped with their reasons. Where it inserts nothing, its documents seed the collection of each action that consumes them. Verified setup is retained in the page's `sharedSetup` field even if every consumer disappears. It is prepended, -in the declared order, to standalone and native IO reference candidates. The module never borrows -state from the first sibling or treats section ancestry as proof of a shared dependency. +in the declared order, to standalone and native IO reference candidates. Beyond declared shared +setup, only the inherited inserts below carry data between sections; section ancestry alone is +never proof of a shared dependency. Every emitted setup occurrence is charged against the source budget before normalization. Embedded program bytes share the report byte cap, which is checked incrementally before retaining another program. The final report cap also covers provenance and repeated containers. Large inputs still