ios - Random Parse query with multiple factors -


i have kind of result algorithm need improve.

the pfquery should request bunch of relevant results mix of different factors. 3 factors:

  1. the closest object - found [query wherekey:xxx neargeopoint:xxx withinkilometers:xxx];
  2. the object highest "tscore" - found [query orderbydescending:@"tscore"];
  3. the there's class among others includes 2 "userid"s in columns "userone" , "usertwo". here "usertwo" should equal [pfuser currentuser]["userid"]. "userone" should used actual query, like: [query wherekey:@"userid" equalto:theuseroneuseridfromanotherquery];. aware class algo calling not pfuser class..

sooo, these different query conditions not running on same time out put should mix of factors. example limit query 21 results , output 7 of closest objects, 7 of objects highest "tscore" , 7 of objects userid equals userone value in object current user's userid equals usertwo..

could in way possible 1 (or few) request(s) parse kind of inner join or that?

it single request, need define cloud function heavy lifting , return compiled result. can't away making multiple requests in cloud function, each of requests complete faster there , minimise network overhead.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -