Skip to content

Commit 572ef94

Browse files
DOCS-14819 Add SEARCH_META variable that populates from mongot
Signed-off-by: Jeff Allen <[email protected]> Closes #5888 DOCS-15819 updates for tech review feedback Signed-off-by: Jeff Allen <[email protected]> Co-authored-by: Kanchana Sekhar <[email protected]>
1 parent b936d0e commit 572ef94

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

source/reference/aggregation-variables.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,19 @@ MongoDB offers the following system variables:
107107

108108
- One of the allowed results of a :pipeline:`$redact` expression.
109109

110+
* - .. variable:: SEARCH_META
111+
112+
- A variable that stores the metadata results of an :atlas:`Atlas
113+
Search </atlas-search/>` query. In all supported aggregation
114+
pipeline stages, a field set to the variable
115+
:variable:`$$SEARCH_META` returns the :atlas:`metadata results
116+
</reference/atlas-search/query-syntax/#metadata-result-types>`
117+
for the query.
118+
119+
For an example of its usage, see Atlas Search :atlas:`facet
120+
</reference/atlas-search/facet/#search_meta-aggregation-variable>`
121+
and :atlas:`count </reference/atlas-search/counting/#search_meta-aggregation-variable>`.
122+
110123
.. seealso::
111124

112125
- :expression:`$let`

0 commit comments

Comments
 (0)