This commit is contained in:
hsafaei
2025-11-13 14:56:16 +03:30
parent 1a0485dd72
commit 02b359c66b
22 changed files with 43 additions and 34 deletions
+1 -1
View File
@@ -178,7 +178,7 @@ password=os.getenv('HOST_160_PASS')
# host=os.getenv('HOST_113')
# password=os.getenv('HOST_113_PASS')
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
+1 -1
View File
@@ -336,7 +336,7 @@ password=os.getenv('HOST_113_PASS')
print(host)
# print(password)
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
+1 -1
View File
@@ -718,7 +718,7 @@ if __name__ == "__main__":
print('.... codes_import_from_excel ......', host)
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
+1 -1
View File
@@ -835,7 +835,7 @@ if __name__ == "__main__":
print( "---------------->>>>>>>>>>>>>>>", host )
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
# extract_codes_diff_llm_tanghih( elastic, "mj_qa_section", "diff_llm_tanghih_2", body={})
+1 -1
View File
@@ -373,7 +373,7 @@ def extract_domain_words(
# host=os.getenv('HOST_113')
# password=os.getenv('HOST_113_PASS')
# path_base_map = "G:/Project2/gateway2_main/repo/_other/"
# path_base_map = "G:/Project2/gateway_php/repo/_other/"
# elastic = ElasticHelper(host, password, "elastic", path_base_map)
# # positve
+8 -7
View File
@@ -23,7 +23,7 @@ host=os.getenv('HOST_160')
password=os.getenv('HOST_160_PASS')
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
# elastic.exportToJsonForAI("output","mj_qa_section", "mj_qa_section.json", {}, ["content", "qanon_title", "ts_date", "other_info.full_path"])
@@ -48,12 +48,13 @@ body = {
}
]
}
},
{
"term":{
"ai_code.label":"فناوری اطلاعات و ارتباطات"
}
}
# ,
# {
# "term":{
# "ai_code.label":"فناوری اطلاعات و ارتباطات"
# }
# }
]
}
}
@@ -66,7 +67,7 @@ body = {
# }
# }
# }
elastic.exportToJsonForAI("output","mj_qa_section", "section_codes_ertabatat.json", body, ["ai_codes", "ai_code", "content", "qanon_title", "qanon_id", "other_info.full_path"], "normal")
# elastic.exportToJsonForAI("output","mj_qa_section", "section_codes_ai.json", body, ["ai_codes", "ai_code"], "dict")
body = {
"sort": [
+1 -1
View File
@@ -167,7 +167,7 @@ password=os.getenv('HOST_160_PASS')
print(host)
# print(password)
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
+1 -1
View File
@@ -242,7 +242,7 @@ password = os.getenv("HOST_160_PASS")
# host=os.getenv('HOST_113')
# password=os.getenv('HOST_113_PASS')
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
#----------------------------------------------------------------
+1 -1
View File
@@ -30,7 +30,7 @@ password=os.getenv('HOST_113_PASS')
print('.... majles_codes_update_steps ......', host)
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
#------------------------------------------------
+1 -1
View File
@@ -176,7 +176,7 @@ if __name__ == "__main__":
print('.... codes_import_from_excel ......', host)
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
+1 -1
View File
@@ -38,7 +38,7 @@ current_directory = os.getcwd()
data_t_location = current_directory + "\\data\\"
default_location_data= current_directory + "\\data"
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elasticImport = elastic_helper_async(host, password, "elastic", path_base_map)
name_zip_file = "data_back040615.zip"
+1 -1
View File
@@ -25,7 +25,7 @@ password=os.getenv('HOST_160_PASS')
print(host)
# print(password)
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
## 0 ##--------------------------------------------------
@@ -197,7 +197,7 @@ password=os.getenv('HOST_160_PASS')
# print(password)
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
+1 -1
View File
@@ -18,7 +18,7 @@ password=os.getenv('HOST_160_PASS')
print(host)
# print(password)
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
+1 -1
View File
@@ -555,7 +555,7 @@ load_dotenv(dotenv_path='config.env')
host=os.getenv('HOST_160')
password=os.getenv('HOST_160_PASS')
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
cursor, cnxn = create_cursor()
+1 -1
View File
@@ -97,7 +97,7 @@ host=os.getenv('HOST_112')
password=os.getenv('HOST_112_PASS')
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
+1 -1
View File
@@ -514,7 +514,7 @@ password=os.getenv('HOST_113_PASS')
print(password)
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
# ---------------------------------------------------------
+1 -1
View File
@@ -152,7 +152,7 @@ load_dotenv(dotenv_path='config.env')
host=os.getenv('HOST_160')
password=os.getenv('HOST_160_PASS')
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
+1 -1
View File
@@ -26,7 +26,7 @@ password=os.getenv('HOST_160_PASS')
print(host)
# print(password)
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
+14 -8
View File
@@ -19,8 +19,8 @@ load_dotenv(dotenv_path="config.env")
# host = os.getenv("HOST_160")
# password = os.getenv("HOST_160_PASS")
# host=os.getenv('HOST_112')
# password=os.getenv('HOST_112_PASS')
host=os.getenv('HOST_112')
password=os.getenv('HOST_112_PASS')
# host=os.getenv('HOST_113')
# password=os.getenv('HOST_113_PASS')
@@ -37,19 +37,28 @@ load_dotenv(dotenv_path="config.env")
# host=os.getenv('HOST_80')
# password=os.getenv('HOST_80_PASS')
host=os.getenv('HOST_133')
password=os.getenv('HOST_133_PASS')
# host=os.getenv('HOST_133')
# password=os.getenv('HOST_133_PASS')
print(host)
# print(password)
path_base_map = "G:/Project2/gateway2_main/repo/_other/"
path_base_map = "G:/Project2/gateway_php/repo/_other/"
elastic = ElasticHelper(host, password, "elastic", path_base_map)
# elastic.removeCustomFileds("mj_qa_section", ["tcode","nlp_parser","content_normal","tcode_mains","tcode_subs", "ners_v1", "level", "code-ai"])
# elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section-m1")
# elastic.createIndex( index_name='mj_qa_section-m1', app_key='majles', map_name='mj_qa_section')
# elastic.restorFileToElastic2('G:/Project2/111/mj_qa_section-m1.zip', 'mj_qa_section-m1', 'majles', False, 'mj_qa_section')
elastic.restorFileToElastic2(path_file='G:/Project2/111/server112/mj_qa_section-m1.zip', index_name='mj_qa_section-m1', app_key='majles', queryDelete=False, map_name='mj_qa_section')
# elastic.backupIndexToZipfile("G:/Project2/111", "mj_plan")
# elastic.createIndex( 'mj_plan', 'majles', 'mj_plan')
# elastic.restorFileToElastic2('G:/Project2/111/mj_plan.zip', 'mj_plan', 'majles', False, 'mj_plan')
# elastic.backupIndexToZipfile("G:/Project2/111", "mj_mashruh")
# elastic.backupIndexToZipfile("G:/Project2/113", "mj_qa_section")
# elastic.restorFileToElastic2('G:/Project2/111/mj_qa_section.zip', 'mj_qa_section', 'majles', False, 'mj_qa_section')
@@ -65,9 +74,6 @@ elastic = ElasticHelper(host, password, "elastic", path_base_map)
# elastic.restorFileToElastic2('G:/Project2/111/mj_qa_domain.zip', 'mj_qa_domain', 'majles', False, 'mj_qa_domain')
# elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section-m1")
# elastic.createIndex( 'mj_qa_section-m1', 'majles', 'mj_qa_section')
# elastic.restorFileToElastic2('G:/Project2/111/mj_qa_section-m1.zip', 'mj_qa_section-m1', 'majles', False, 'mj_qa_section')
# elastic.backupIndexToZipfile("G:/Project2/111", "gn_calendar")
# elastic.createIndex( 'gn_calendar', 'general', 'gn_calendar')