question

Amar avatar image
Amar asked

Is there a way for a user to search another users profile using custom fields in the user data?

We are building a sports APP where we have users of different kind (Athletes and Fans). Currently we are storing a ton of custom data fields in the UserProfile (Name, Age, DOB, City, School, Grades, Sports and more .. ).. We want users to be able to search the entire database using custom query of these fields .. Lets say (Show me all the users in the APP, that splay Baseball, and are in NYC and have been active for last 1 week)..


I understand that PlayFab is not designed for this, but wondering what is the best way to design and architect a solution for this? We are mainly using PlayFab for Auth now, but we have a need for leaderboards, economy and more in the future. But storing data is PlayerTitleData is not going to help us achieve what we really want.

One of the solutions we are looking into is to save the data into CosmosDB and use custom cloud scripts to talk to CosmosDB and return the responses to the client, that way the client can only talk to PlayFab and not have to worry about connecting to CosmosDB, and also helps us secure the Data?

Player Data
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

In your case, yes, you’d need to use an external data store solution, such as CosmosDB you mentioned in question. And yes, CloudScript can serve as a secure proxy between the clients and your database, for that I’d suggest that you use the new PlayFab CloudScript using Azure Functions feature, which introduces few key improvements compared to the old CloudScript feature. Please let me know if you have any further questions.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.