-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Questions: Add votedUsefulQuestions to user model #3450
Comments
Currently, the voteUsefulBy is tracked in the Research/HowTo/Question objects using the Would you prefer to link this feature only to the user, or to both the user and the article? The advantage of keeping it in the article object is that you don't need to retrieve the user object to check if they marked the article as useful. If we decide to keep the |
Pros for keeping voteUsefulBy in the article:
Cons:
So I think we could remove it from the articles and instead have a list of voted articles in the user profile. As for the solution, we want to move away from having the client update the article directly (votedBy and totalVotes), as it requires everyone to have write access. |
Until we have a clearer plan about what's next for the API, let's got with a cloud function approach. Considering our document approach at the moment, I'm not concerned about duplicate data as long as the cloud functions copy from the source of truth into other appropriate docs. Keeping the ISharedFeatures is probably good. I'd like as much uniformity across our data structure as we can manage! And bandwidth is well under control now. |
Noticed this discussion when flicking through emails. A little background... the voted useful used to sit on the user object but it was leading to incorrect useful counts being displayed. The aggregation had to count through all of the user objects when there was a change to get the current count and it wasn't particularly performant, we'd end up with different clients overwriting each others updates etc. I've not caught up with recent architectural changes in the code base yet but obviously an api + rdbms would be useful for solving all the issues raised in this thread but for now I agree with @benfurber. |
Like
votedUsefulResearch
andvotedUsefulHowtos
, the questions a user has voted useful should be saved too.As it's likely more content types will get the
useful
feature in the future, now might be the time to nest all the voted useful in a single field on the user rather than as seperate ones. A mod can do the db migrations to accomidate this.The text was updated successfully, but these errors were encountered: