diff --git a/source/reference/aggregation-variables.txt b/source/reference/aggregation-variables.txt index a2b7af1f879..dea4d9641b4 100644 --- a/source/reference/aggregation-variables.txt +++ b/source/reference/aggregation-variables.txt @@ -107,6 +107,19 @@ 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:`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 + ` + and :atlas:`count `. + .. seealso:: - :expression:`$let`