I’m using “realm-web”: “^1.1.0” on ReactJS. I’m trying to convert my queries to use $facet to reduce my queries. The results that I’m getting from $facet queries are nonexistent or a lot lower than running the queries by themselves. I ran a basic aggregate in the Atlas GUI and with the Realm SDK. I get 291 from the GUI vs 115 in SDK. What’s causing the inconsistency? I generated the aggregate in the GUI and copy/pasted into my SDK.
Hi Winston – One way to explain the difference may be Rules. For Web requests Realm will use Rules to figure out which documents can/cannot be seen by a user and this can impact aggregation results unless the code is within a Function run as a System Function (which explicitly skips rules).