I have a remote database on MongoDB and i want to execute an aggregate method for grouping entries w.r.t. a certain field using restheart. My query looks like this
db.musa.aggregate([{$group:{_id:"$username"}}])
this query returns a list of unique users in my database but i am not sure how to implement it using restheart. Is it even possible to do so?
I'm from the restheart.org team...
a similar question has been already asked on github https://github.com/SoftInstigate/restheart/issues/55
I'm pasting here the answer:
currently aggregate queries are not supported.
note that this is in the roadmap and planned for next version
jira task 41: https://softinstigate.atlassian.net/browse/RH-41
as a workaround you can implement a custom application handler: documentation at https://softinstigate.atlassian.net/wiki/x/IoCw