Skip to content

Commit 64376b0

Browse files
authored
(DOCSP-24291): Document aggregation query limitation for $function operator (#576)
* Add note about operator syntax * copy review feedback
1 parent 7c2b8e4 commit 64376b0

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

source/aggregation-pipeline.txt

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,22 @@ accordingly.
101101
Limitations
102102
~~~~~~~~~~~
103103

104-
The :pipeline:`$lookup` operator is not supported in aggregation queries
105-
defined in the Chart Builder. However, you can use this operator
106-
in Data Source pipelines. To learn more about how to use pipelines
107-
to pre-process data before it reaches the Chart Builder, see
108-
:ref:`data-sources-pipeline`.
104+
- |charts-short| doesn't support the :pipeline:`$lookup` operator in aggregation
105+
queries. However, you can use this operator in Data Source pipelines.
106+
To learn more about how to use pipelines to pre-process data before
107+
it reaches the Chart Builder, see :ref:`data-sources-pipeline`.
108+
109+
- |charts-short| supports the :expression:`$function` operator only when
110+
you define the function body in a single line and
111+
wrap it in double quotes. To use this operator in your aggregation
112+
queries, you must use the following syntax:
113+
114+
.. code-block:: javascript
115+
116+
{
117+
$function: {
118+
body: "function(arg1, arg2, ...) { ... }",
119+
args: <array expression>,
120+
lang: "js"
121+
}
122+
}

0 commit comments

Comments
 (0)