From b55ff3477d88f0147f2eba0334d9a999b6749b27 Mon Sep 17 00:00:00 2001 From: Kanchana Sekhar Date: Mon, 27 Sep 2021 13:24:01 -0700 Subject: [PATCH 1/2] DOCS-14819 Add SEARCH_META variable that populates from mongot --- source/reference/aggregation-variables.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/reference/aggregation-variables.txt b/source/reference/aggregation-variables.txt index a2b7af1f879..23f8d2ce90b 100644 --- a/source/reference/aggregation-variables.txt +++ b/source/reference/aggregation-variables.txt @@ -107,6 +107,18 @@ MongoDB offers the following system variables: - One of the allowed results of a :pipeline:`$redact` expression. + * - .. variable:: SEARCH_META + + - A variable that stores the metadata results of an Atlas Search + query. In a :pipeline:`$project` stage, a field set to the + variable :variable:`$$SEARCH_META` returns the :atlas:`metadata + results ` + for the query. + + For an example of its usage, see Atlas Search :atlas:`facet + ` + and :atlas:`count `. + .. seealso:: - :expression:`$let` From ededc03879963912c0160566b38925a2462bb544 Mon Sep 17 00:00:00 2001 From: Kanchana Sekhar Date: Tue, 19 Oct 2021 07:53:12 -0700 Subject: [PATCH 2/2] DOCS-15819 updates for tech review feedback --- source/reference/aggregation-variables.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/reference/aggregation-variables.txt b/source/reference/aggregation-variables.txt index 23f8d2ce90b..dea4d9641b4 100644 --- a/source/reference/aggregation-variables.txt +++ b/source/reference/aggregation-variables.txt @@ -109,10 +109,11 @@ MongoDB offers the following system variables: * - .. variable:: SEARCH_META - - A variable that stores the metadata results of an Atlas Search - query. In a :pipeline:`$project` stage, a field set to the - variable :variable:`$$SEARCH_META` returns the :atlas:`metadata - results ` + - A variable that stores the metadata results of an :atlas:`Atlas + Search ` query. In all supported aggregation + pipeline stages, a field set to the variable + :variable:`$$SEARCH_META` returns the :atlas:`metadata results + ` for the query. For an example of its usage, see Atlas Search :atlas:`facet