Commit 64b074e2 authored by 段英荣's avatar 段英荣

modifuy

parent abe09afb
...@@ -182,14 +182,6 @@ class TopicUtils(object): ...@@ -182,14 +182,6 @@ class TopicUtils(object):
} }
}, },
"weight": 1000 "weight": 1000
},
{
"filter": {
"term": {
"is_excellent": 1
}
},
"weight": 500
} }
] ]
......
...@@ -209,7 +209,7 @@ class Topic(models.Model): ...@@ -209,7 +209,7 @@ class Topic(models.Model):
user_query_results = UserExtra.objects.using(settings.SLAVE_DB_NAME).filter(user_id=self.user_id) user_query_results = UserExtra.objects.using(settings.SLAVE_DB_NAME).filter(user_id=self.user_id)
if user_query_results.count() > 0: if user_query_results.count() > 0:
if user_query_results[0].is_recommend: if user_query_results[0].is_recommend:
offline_score += 2.0 offline_score += 2.0 *10
elif user_query_results[0].is_shadow: elif user_query_results[0].is_shadow:
user_is_shadow = True user_is_shadow = True
...@@ -219,18 +219,18 @@ class Topic(models.Model): ...@@ -219,18 +219,18 @@ class Topic(models.Model):
# 帖子等级 # 帖子等级
if self.content_level == '5': if self.content_level == '5':
offline_score += 6.0 offline_score += 100.0 *3
elif self.content_level == '4': elif self.content_level == '4':
offline_score += 5.0 offline_score += 60.0 *3
elif self.content_level == '6': elif self.content_level == '6':
offline_score += 400.0 offline_score += 200.0 *3
is_excellent = self.judge_if_excellent_topic(self.id) # is_excellent = self.judge_if_excellent_topic(self.id)
if is_excellent: # if is_excellent:
offline_score += 200.0 # offline_score += 200.0
if self.language_type == 1: if self.language_type == 1:
offline_score += 100.0 offline_score += 60.0
# exposure_count = ActionSumAboutTopic.objects.using(settings.SLAVE_DB_NAME).filter(topic_id=self.id, data_type=1).count() # exposure_count = ActionSumAboutTopic.objects.using(settings.SLAVE_DB_NAME).filter(topic_id=self.id, data_type=1).count()
# click_count = ActionSumAboutTopic.objects.using(settings.SLAVE_DB_NAME).filter(topic_id=self.id, data_type=2).count() # click_count = ActionSumAboutTopic.objects.using(settings.SLAVE_DB_NAME).filter(topic_id=self.id, data_type=2).count()
# uv_num = ActionSumAboutTopic.objects.using(settings.SLAVE_DB_NAME).filter(topic_id=self.id, data_type=3).count() # uv_num = ActionSumAboutTopic.objects.using(settings.SLAVE_DB_NAME).filter(topic_id=self.id, data_type=3).count()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment