Commit 5f5e6968 authored by 高雅喆's avatar 高雅喆

add lin latest_reply_time log

parent 6947ae00
......@@ -411,7 +411,7 @@ class ESPerform(object):
}
},
"_source": {
"include": ["id", "user_id"]
"include": ["id", "user_id", "latest_reply_time"]
},
"sort": [
{"latest_reply_time": {"order": "desc"}},
......@@ -440,8 +440,15 @@ class ESPerform(object):
for item in result_dict["hits"]:
topic_id_dict[str(item["_source"]["id"])] = item["_source"]["user_id"]
topic_id_dict_latest_reply_time = dict()
for item in result_dict["hits"]:
topic_id_dict_latest_reply_time[str(item["_source"]["id"])] = item["_source"]["latest_reply_time"]
logging.info("topic_id_list:%s" % str(topic_id_dict))
logging.info("linucb_tag_id_list_2_same_tagset_ids:" + str(tag_id))
logging.info("linucb_tag_id_list_2_same_tagset_ids_2_topics_detail:" + str(topic_id_dict_latest_reply_time))
return topic_id_list, topic_id_dict
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
......
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