Commit 3d7b4e33 authored by lixiaofang's avatar lixiaofang

add

parent 1f2aed04
...@@ -286,6 +286,7 @@ class ESPerform(object): ...@@ -286,6 +286,7 @@ class ESPerform(object):
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return True return True
# 先获取一部分数据 # 先获取一部分数据
es_cli_obj = ESPerform.get_cli() es_cli_obj = ESPerform.get_cli()
...@@ -309,9 +310,11 @@ for old_item in result_dict["hits"]: ...@@ -309,9 +310,11 @@ for old_item in result_dict["hits"]:
es_cli_obj = ESPerform.get_cli() es_cli_obj = ESPerform.get_cli()
q = {} q = {}
q["query"] = { q["query"] = {
"term": { "bool": {
"id": old_id, "must": [
"is_online": True {"term": {"id": old_id}},
{"term": {"is_online": True}}
]
} }
} }
result_dict_test = ESPerform.get_search_results(es_cli_obj, "mv-alpha-pictorial-test-190711901", q, 0, 1) result_dict_test = ESPerform.get_search_results(es_cli_obj, "mv-alpha-pictorial-test-190711901", q, 0, 1)
...@@ -419,4 +422,3 @@ for old_item in result_dict["hits"]: ...@@ -419,4 +422,3 @@ for old_item in result_dict["hits"]:
print(old_source["activity_join"]) print(old_source["activity_join"])
print(new_source["activity_join"]) print(new_source["activity_join"])
print("-----activity_join-----") print("-----activity_join-----")
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