lvl2
This commit is contained in:
@@ -160,7 +160,7 @@ def copyToAiCodesHistoryCodes(elastic, index_name_o, data, version_key = "D51_v1
|
||||
|
||||
history_codes = []
|
||||
try:
|
||||
item = elastic.get_doctument(index_name_o, eid)
|
||||
item = elastic.get_document(index_name_o, eid)
|
||||
history_codes = item.get("_source", {}).get("history_codes", [])
|
||||
except Exception as e:
|
||||
continue
|
||||
|
||||
@@ -488,7 +488,7 @@ def importCodesToElastic(elastic, file_excel, index_name_o, tcode_label, file_lo
|
||||
# ذخیره کد در الاستیک برای شناسه های یافت شده
|
||||
if section_id and section_id != 0:
|
||||
try :
|
||||
item = elastic.get_doctument(index_name_o,section_id)
|
||||
item = elastic.get_document(index_name_o,section_id)
|
||||
except Exception as e:
|
||||
print('-------------Exception as e section_id not found --- rownumber , section_id ' + str(row_number) + str(section_id) + '\n')
|
||||
file.write('----section_id not found --- rownumber , section_id ' + str(row_number) + str(section_id) + '\n')
|
||||
|
||||
@@ -71,7 +71,7 @@ def parse_and_update_code(file_path, elastic, index_name_o = "mj_qa_section", up
|
||||
res = None
|
||||
try :
|
||||
if elastic :
|
||||
res = elastic.get_doctument(index_name_o, section_id)
|
||||
res = elastic.get_document(index_name_o, section_id)
|
||||
except:
|
||||
list_section_id_notfound.append(section_id)
|
||||
continue
|
||||
@@ -210,7 +210,7 @@ def parse_and_update_multi_code(file_path, elastic, all_codes, index_name_o, upd
|
||||
res = None
|
||||
try :
|
||||
if elastic :
|
||||
res = elastic.get_doctument(index_name_o, section_id)
|
||||
res = elastic.get_document(index_name_o, section_id)
|
||||
except:
|
||||
list_section_id_notfound.append(section_id)
|
||||
continue
|
||||
@@ -740,7 +740,7 @@ def repair_diff_codes_llm(elastic, paths, index_name, file_result="diff_section_
|
||||
|
||||
res = None
|
||||
try :
|
||||
res = elastic.get_doctument(index_name, section_id)
|
||||
res = elastic.get_document(index_name, section_id)
|
||||
except:
|
||||
list_section_id_notfound.append(section_id)
|
||||
continue
|
||||
|
||||
@@ -72,7 +72,7 @@ def update_history_code(elastic, data, index_name_o, sub_key, label_name, versio
|
||||
# if id in ["qs1002289", "qs1002290"] :
|
||||
# continue
|
||||
eid = id
|
||||
res = elastic.get_doctument(index_name_o, eid)
|
||||
res = elastic.get_document(index_name_o, eid)
|
||||
history_codes = res["_source"]["history_codes"]
|
||||
|
||||
new_data = {
|
||||
@@ -185,7 +185,7 @@ def run_all_json_codes(elastic, path_base, index_name_o, version_key):
|
||||
if not "rel" in item :
|
||||
continue
|
||||
|
||||
res = elastic.get_doctument(index_name_o, eid)
|
||||
res = elastic.get_document(index_name_o, eid)
|
||||
history_codes = res["_source"]["history_codes"]
|
||||
|
||||
sub_key = "positive"
|
||||
|
||||
Reference in New Issue
Block a user