I was reading and was thinking that What's the matter?
In my opinion, 2 models should be a regular model and a popular that sort order from the Regular model Is there a popularity formula
Any thoughts?
It will depend on the special, but I think that you have information about popularity as a column in the model Can archive. For example, if you have questions that you want to sort by popularity, then you can run the migration AddPopularityToQuestions Popularity: Float .
You can run a script (for example) at set interval to update the popularity value for each question. However, if this is not much activity, then it can understand more to update popularity for a question whenever something happens that will change it. For example, if popularity is predominantly determined by votes, then you can update the popularity of a question according to new questions.
No comments:
Post a Comment