Commit a6d68011 authored by lixiaofang's avatar lixiaofang

add

parent 485c13ca
......@@ -208,15 +208,19 @@ class QueryWordAttr(object):
have_save_order_weight = json_data.get('order_weight', 0)
have_save_search_num = json_data.get('order_weight', 0)
logging.info(
"query:%s,have_save_order_weight:%s,have_save_search_num:%s,order_weight:%s,search_num:%s" % (
query, have_save_order_weight, have_save_search_num, order_weight, search_num))
if get_ret:
if have_save_order_weight == order_weight and have_save_search_num == search_num:
if have_save_order_weight >= order_weight and have_save_search_num == search_num:
return True
else:
return False
else:
if have_save_order_weight < order_weight or (
have_save_order_weight == order_weight and have_save_search_num < search_num):
logging.log(
logging.info(
"query:%s,have_save_order_weight:%s,have_save_search_num:%s,order_weight:%s,search_num:%s" % (
query, have_save_order_weight, have_save_search_num, order_weight, search_num))
......
......@@ -87,6 +87,7 @@ class ItemWikiTransfer(object):
item_dict = dict()
suggest_list = list()
ret_bol = QueryWordAttr.save_query_to_redis(query=str(instance.name), from_type="wiki", get_ret=True)
logging.info("get_wiki_query:%s,ret_bol:%s" % (instance.name, ret_bol))
if ret_bol:
item_dict["id"] = getMd5Digest(str(instance.name))
item_dict["ori_name"] = instance.name
......
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