[COMPASS-3803] aggregation pipeline builder does not support operators in "$eq" Created: 07/Aug/19  Updated: 14/Aug/19  Resolved: 14/Aug/19

Status: Closed
Project: Compass
Component/s: Aggregation pipeline
Affects Version/s: 1.18.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Lungang Fang Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File error.png    
Issue Links:
Duplicate
duplicates COMPASS-3805 Aggregate match step with $strLenCP d... Closed
Sprint: Iteration Llama

 Description   

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



 Comments   
Comment by Massimiliano Marcon [ 14/Aug/19 ]

Watch COMPASS-3805 for updates on this fix.

Generated at Wed Feb 07 22:34:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.