Issue
I need help with a mongo query using the RAW query type. I want to retrieve all the distinct values of a particular property in the collection. The distinct keyword is supported by mongo, but it doesn't seem to be working in the RAW query. Additionally, when I try to include sorting, it gives me a BSON error.
Resolution
The user was attempting to hook up a mongo query using the RAW query type. They were looking for a method or tag that would give all the distinct "name" in the mongo query example they provided. The solution was to use the "distinct" keyword in mongoDB, which provides a list of distinct values of a property from the collection. The syntax is {distinct: "", key: ""}. However, when attempting to sort the results by property name, there was a BSON error. No further solution was provided in the conversation.