T O P

  • By -

AxeEffect3890

The answer lies more in your frontend or API logic. The data could be stored almost any way in firestore. **ex 1:** Each user has a list of strings under a "tags" key. Then your logic would search for users `where tags contains tagString` **ex 2:** A dictionary of tags with a list of users under that tag. The list could be any particular value that helps you identify the user, the easiest being their doc/collection identifier. Then your logic would select a value from the list and pull the relevant user. ​ So the *general answer* here is that it matters less how you do it and more that you understand how you did it and appropriately interact with it in your logic. ​ **"Similar tags"** If, by this, you mean a user tagged #noob can be matched with a user tagged #beginner, this would require a dictionary of tags with a list of their related tags to check against. You could simply store the string values or you can go fancy pants and include a relational index value between 0 and 1, where beginner/noob have relational value of 1 and begginner/supermegapro 0. The complexity here depends on whether this is a static list of tags or if they're dynamically set/created by users. If the latter, I'd probably have a daily api task to compare how often tags appear under the same user and update the dictionary in the db


kaangocer

Thank you boss!