Commit 2b161638 authored by litaolemo's avatar litaolemo

update

parent 88bc5268
...@@ -23,10 +23,10 @@ es7 = e7.Elasticsearch(hosts="172.16.52.27", port=9200,http_auth=("elastic","gen ...@@ -23,10 +23,10 @@ es7 = e7.Elasticsearch(hosts="172.16.52.27", port=9200,http_auth=("elastic","gen
# es7 = e7.Elasticsearch(hosts="172.16.31.17", port=9000) # es7 = e7.Elasticsearch(hosts="172.16.31.17", port=9000)
target_index = 'gm-dbmw-doctor-read' target_index = 'gm-dbmw-problem-read'
target_type = 'doctor' target_type = 'problem'
from_index = 'gm-dbmw-doctor-read' from_index = 'gm-dbmw-problem-read'
from_type = '_doc' from_type = '_doc'
...@@ -60,13 +60,13 @@ for one_scan in write_into_scan: ...@@ -60,13 +60,13 @@ for one_scan in write_into_scan:
count = count + 1 count = count + 1
line = one_scan['_source'] line = one_scan['_source']
doc_id = one_scan['_id'] doc_id = one_scan['_id']
try: # try:
if line['facevideo_is_assistant'] == 1: # if line['facevideo_is_assistant'] == 1:
line['facevideo_is_assistant'] = True # line['facevideo_is_assistant'] = True
else: # else:
line['facevideo_is_assistant'] = False # line['facevideo_is_assistant'] = False
except: # except:
pass # pass
bulk_head = '{"index": {"_id":"%s"}}' % doc_id bulk_head = '{"index": {"_id":"%s"}}' % doc_id
data_str = json.dumps(line, ensure_ascii=False) data_str = json.dumps(line, ensure_ascii=False)
......
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