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

aggregation pipeline builder does not support operators in "$eq"

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.18.0
    • Component/s: Aggregation pipeline
    • None
    • Iteration Llama

      Hi,

      In mongo shell, the following aggregation pipeline works as expected: it finds all documents of which the string length of the value of the "un" field is 25.

      db.configusers.aggregate([{
          "$match": {
              "$expr": {
                  "$eq": [
                      {'$strLenCP': "$un"}, 25 ]
              }
          }
      }
      

      However, I use this in Compass 1.18, it will report Field must not begin with '$' or '.', field path was: $strLenCP:

      Similarly, other operators such as $abs, $trim are not supported as well.

      Could you please confirm if this is expected and if there is a plan to support operators in such use cases?

      Regards,
      Lungang

        1. error.png
          22 kB
          Lungang Fang

            Assignee:
            Unassigned Unassigned
            Reporter:
            lungang.fang@mongodb.com Lungang Fang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: