Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-4071

Valid $set stages in aggregation pipeline are not parsed correctly.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.22.0
    • Affects Version/s: 1.20.3
    • None
    • Environment:
      Ubuntu Linux 18.04

      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"
              ]
            }
          }
        }
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            ataramina@shorecg.com Andrzej Taramina
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: