Commit 1e3dff9b authored by lixiaofang's avatar lixiaofang

add

parent 10baf678
...@@ -36,7 +36,8 @@ def search_hotword(device_id=-1): ...@@ -36,7 +36,8 @@ def search_hotword(device_id=-1):
# results_registr_tag = json.loads(redis_client.get("physical:search_hotword:results_registr_tag")) # results_registr_tag = json.loads(redis_client.get("physical:search_hotword:results_registr_tag"))
results_tag = json.loads(redis_client.get("physical:search_hotword:results_tag")) results_tag = json.loads(redis_client.get("physical:search_hotword:results_tag"))
# 先获取搜索推荐热词 # 先获取搜索推荐热词
results_registr_tag = list(set(SettingsConfig.objects.filter(is_deleted=False).values_list("val", flat=True))) results_registr_tag = list(
set(SettingsConfig.objects.filter(is_deleted=False, key=1).values_list("val", flat=True)))
tag_val_list = set() tag_val_list = set()
for item in results_registr_tag: for item in results_registr_tag:
for word in item.split(): for word in item.split():
...@@ -79,4 +80,3 @@ def search_hotword(device_id=-1): ...@@ -79,4 +80,3 @@ def search_hotword(device_id=-1):
except: except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return {"recommend_tag_name": []} return {"recommend_tag_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