[deploy] Optimization:Limit Tags Searched For Follow Suggestions (#11095)
This commit is contained in:
parent
c91c07920f
commit
9af35bed0a
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ module Suggester
|
|||
|
||||
def tagged_article_user_ids(num_weeks = 1)
|
||||
Article.published
|
||||
.tagged_with(user.decorate.cached_followed_tag_names, any: true)
|
||||
.tagged_with(user.decorate.cached_followed_tag_names.sample(5), any: true)
|
||||
.where("score > ? AND published_at > ?", article_reaction_count, num_weeks.weeks.ago)
|
||||
.pluck(:user_id)
|
||||
.each_with_object(Hash.new(0)) { |value, counts| counts[value] += 1 }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue