Closed oyiptong closed 10 years ago
Sorting by time would provide a less clumpy distribution of interests amongst article results.
This would provide a better user experience than the solution provided in #10
The sorting criteria can be obtained by calling http://redis.io/commands/zrevrange with the score option.
The optional parameter has to be provided here: https://github.com/oyiptong/up-headliner/blob/master/up/headliner/data.py#L65
And then the score must be applied to the article data.
Later on, when the response is being constructed, the articles can be sorted by score in descending order, then deduped.
Sorting by time would provide a less clumpy distribution of interests amongst article results.
This would provide a better user experience than the solution provided in #10
The sorting criteria can be obtained by calling http://redis.io/commands/zrevrange with the score option.
The optional parameter has to be provided here: https://github.com/oyiptong/up-headliner/blob/master/up/headliner/data.py#L65
And then the score must be applied to the article data.
Later on, when the response is being constructed, the articles can be sorted by score in descending order, then deduped.