Commit 68bd34c0 authored by 李小芳's avatar 李小芳

Merge branch 'resert' into 'master'

Resert

See merge request !62
parents a5ca6a0c 8b1028a6
...@@ -27,7 +27,7 @@ class SearchWord(object): ...@@ -27,7 +27,7 @@ class SearchWord(object):
is_online = False if instance.is_delete else True is_online = False if instance.is_delete else True
else: else:
is_online = False is_online = False
item_dict["is_online"] = is_online item_dict["is_online"] = False if instance.is_delete else True
item_dict["order_weight"] = QueryWordAttr.get_hot_search_query_word_weight(keyword) item_dict["order_weight"] = QueryWordAttr.get_hot_search_query_word_weight(keyword)
item_dict["results_num"] = QueryWordAttr.get_search_query_results_num(keyword) item_dict["results_num"] = QueryWordAttr.get_search_query_results_num(keyword)
item_dict["type_flag"] = get_tips_word_type(keyword) item_dict["type_flag"] = get_tips_word_type(keyword)
...@@ -50,7 +50,7 @@ class SearchWord(object): ...@@ -50,7 +50,7 @@ class SearchWord(object):
suggest_list = list() suggest_list = list()
sub_query = re.sub('\W+', '', instance.keyword) sub_query = re.sub('\W+', '', instance.keyword)
keyword = str(sub_query).lower() keyword = str(sub_query).lower()
ret_bol = QueryWordAttr.save_query_to_redis(query=sub_query,type_v1=True) ret_bol = QueryWordAttr.save_query_to_redis(query=sub_query, type_v1=True)
if ret_bol: if ret_bol:
item_dict["id"] = getMd5Digest(keyword) item_dict["id"] = getMd5Digest(keyword)
item_dict["ori_name"] = keyword item_dict["ori_name"] = keyword
...@@ -58,7 +58,7 @@ class SearchWord(object): ...@@ -58,7 +58,7 @@ class SearchWord(object):
is_online = False if instance.is_delete else True is_online = False if instance.is_delete else True
else: else:
is_online = False is_online = False
item_dict["is_online"] = is_online item_dict["is_online"] = False if instance.is_delete else True
item_dict["order_weight"] = QueryWordAttr.get_hot_search_query_word_weight(keyword) item_dict["order_weight"] = QueryWordAttr.get_hot_search_query_word_weight(keyword)
item_dict["results_num"] = QueryWordAttr.get_search_query_results_num(keyword) item_dict["results_num"] = QueryWordAttr.get_search_query_results_num(keyword)
item_dict["type_flag"] = get_tips_word_type(keyword) item_dict["type_flag"] = get_tips_word_type(keyword)
......
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