Running $text Queries in Cloud Code
I'd like to run a $text query from Cloud Code. Everything is set up on the Mongo side, but I'm curious about the best way to run the query. Is there a way to access the existing Mongo connection to run a custom query?
There is no way to access the parse-server connection from cloud code. However, cloud code is now just a node required file, loaded as any other module. You can create a connection of your own an run any direct query on the mongodb dataset. The results however won't be in Parse REST format.
Thanks for the response! ᐧ
On Sat, Jan 14, 2017 at 3:46 PM, Florent Vilmart [email protected] wrote:
There is no way to access the parse-server connection from cloud code. However, cloud code is now just a node required file, loaded as any other module. You can create a connection of your own an run any direct query on the mongodb dataset. The results however won't be in Parse REST format.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ParsePlatform/parse-server/issues/3374#issuecomment-272662183, or mute the thread https://github.com/notifications/unsubscribe-auth/AGoF8IQJ3ysNVSrM5GFYy39rBQreKiKNks5rSV5hgaJpZM4LjxSq .
-- Thanks,
Aaron Bannin [email protected]