Skip to content

Commit b55ff34

Browse files
DOCS-14819 Add SEARCH_META variable that populates from mongot
1 parent 293425d commit b55ff34

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

source/reference/aggregation-variables.txt

+12
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,18 @@ 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 Search
113+
query. In a :pipeline:`$project` stage, a field set to the
114+
variable :variable:`$$SEARCH_META` returns the :atlas:`metadata
115+
results </reference/atlas-search/query-syntax/#metadata-result-types>`
116+
for the query.
117+
118+
For an example of its usage, see Atlas Search :atlas:`facet
119+
</reference/atlas-search/facet/#search_meta-aggregation-variable>`
120+
and :atlas:`count </reference/atlas-search/counting/#search_meta-aggregation-variable>`.
121+
110122
.. seealso::
111123

112124
- :expression:`$let`

0 commit comments

Comments
 (0)