|
Valid $set stages in aggregation pipeline are not parsed correctly and show errors. This also affects importing of text-based aggregation pipelines.
The following are valid $set stage definitions. They run fine as part of a larger pipeline using NodeJS and were used using mongo shell to create a view from the same pipeline, but cannot be imported in Compass without showing errors:
{
|
"$set": {
|
"profile": {
|
"$arrayElemAt": [
|
"$profile_array",
|
0
|
]
|
}
|
}
|
}
|
and....
{
|
"$set": {
|
"sort_status": {
|
"$indexOfArray": [
|
[
|
"H",
|
"N",
|
"0"
|
],
|
"$medical_status_code"
|
]
|
}
|
}
|
}
|
|