Commit 21b4e448 authored by 段英荣's avatar 段英荣

modify

parent 090777bb
...@@ -84,7 +84,7 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query ...@@ -84,7 +84,7 @@ def get_home_recommend_topic_ids(user_id, device_id, tag_id, offset, size, query
single_size=size,query=query, query_type=query_type, single_size=size,query=query, query_type=query_type,
filter_topic_id_list=have_read_topic_id_list, filter_topic_id_list=have_read_topic_id_list,
recommend_tag_list=recommend_tag_list, recommend_tag_list=recommend_tag_list,
user_similar_score_list=user_similar_score_redis_list,index_type="topic-high-star") user_similar_score_list=user_similar_score_redis_list)
have_read_group_id_set = set() have_read_group_id_set = set()
have_read_user_id_set = set() have_read_user_id_set = set()
unread_topic_id_dict = dict() unread_topic_id_dict = dict()
......
...@@ -80,7 +80,7 @@ class TypeInfo(object): ...@@ -80,7 +80,7 @@ class TypeInfo(object):
def bulk_get_data(self, instance_iterable): def bulk_get_data(self, instance_iterable):
data_list = [] data_list = []
# 3,4,5星帖子单独索引 # 4,5星帖子单独索引
topic_data_high_star_list = list() topic_data_high_star_list = list()
if self.batch_get_data_func: if self.batch_get_data_func:
_pk_list = [getattr(instance, 'pk', None) for instance in instance_iterable] _pk_list = [getattr(instance, 'pk', None) for instance in instance_iterable]
...@@ -138,7 +138,7 @@ class TypeInfo(object): ...@@ -138,7 +138,7 @@ class TypeInfo(object):
)) ))
else: else:
data_list.append(data) data_list.append(data)
if self.type=="topic" and instance.content_level and int(instance.content_level)>=3: if self.type=="topic" and instance.content_level and int(instance.content_level)>=4:
topic_data_high_star_list.append(data) topic_data_high_star_list.append(data)
return (data_list,topic_data_high_star_list) return (data_list,topic_data_high_star_list)
...@@ -269,8 +269,8 @@ def get_type_info_map(): ...@@ -269,8 +269,8 @@ def get_type_info_map():
type_info_list = [ type_info_list = [
TypeInfo( TypeInfo(
name='topic-high-star', # 高星日记 name='topic_high_star', # >=3星日记
type='topic-high-star', type='topic_high_star',
model=topic.Topic, model=topic.Topic,
query_deferred=lambda: topic.Topic.objects.all().query, query_deferred=lambda: topic.Topic.objects.all().query,
get_data_func=TopicTransfer.get_topic_data, get_data_func=TopicTransfer.get_topic_data,
......
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