Commit e4a4bd18 authored by lixiaofang's avatar lixiaofang

add

parent f6e84f20
This diff is collapsed.
......@@ -199,8 +199,10 @@ class ESPerform(object):
batch_search=False, routing=None):
try:
assert (es_cli is not None)
official_index_name = sub_index_name
if sub_index_name != "mv-alpha-topic-high-star-prod-190801001":
official_index_name = cls.get_official_index_name(sub_index_name, "read")
official_index_name = cls.get_official_index_name(sub_index_name, "read")
index_exists = es_cli.indices.exists(official_index_name)
if not index_exists:
if not auto_create_index:
......@@ -487,7 +489,7 @@ for lev in content_level:
"is_online": True
}
}
result_dict_test = ESPerform.get_search_results(es_cli_obj, "topic", q, 0, 1)
result_dict_test = ESPerform.get_search_results(es_cli_obj, "mv-alpha-topic-high-star-prod-190801001", q, 0, 1)
for new_item in result_dict_test["hits"]:
new_source = new_item["_source"]
new_id = new_source["id"]
......@@ -677,4 +679,3 @@ for lev in content_level:
print(old_source["user_nick_name_pre"])
print(new_source["user_nick_name_pre"])
print("-----user_nick_name_pre-----")
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