law repair

This commit is contained in:
hsafaei
2025-05-14 10:51:27 +03:30
parent ad5bcb1c44
commit 20f115bbe2
7 changed files with 311 additions and 45 deletions
+30 -5
View File
@@ -45,9 +45,11 @@ elastic = ElasticHelper(host, password, "elastic", path_base_map)
#-------------------------------------------------------
##
# elastic.backupIndexToZipfile("G:/Project2/111", "dh_haditha")
# elastic.backupIndexToZipfile("G:/Project2/111", "dh_parag_bge")
# elastic.backupIndexToZipfile("G:/Project2/111", "gn_dataset")
# elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section_ai")
#elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section")
#elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section_ai")
# elastic.backupIndexToZipfile("G:/Project2/111", "mn_crition")
#moveDataset1(elastic, "G:/Project2/111/gn_dataset_14031125.zip", "gn_dataset2")
@@ -112,8 +114,8 @@ elastic = ElasticHelper(host, password, "elastic", path_base_map)
##
# ## کد نمونه بازیابی از فایل
path_back = 'G:/Project2/111/mj_qa_section.zip'
elastic.createIndex('mj_qa_section', 'majles', 'mj_qa_section')
# path_back = 'G:/Project2/111/mj_qa_section.zip'
# elastic.createIndex('mj_qa_section', 'majles', 'mj_qa_section')
# elastic.zipFileToElastic(path_back, 'mj_qa_section')
#selastic.backupIndexToZipfile("G:/Project2/111", "dh_haditha")
@@ -124,8 +126,9 @@ elastic.createIndex('mj_qa_section', 'majles', 'mj_qa_section')
#elastic.backupIndexToZipfile("G:/Project2/111", "dh_volume_temp")
#elastic.restorFileToElastic("G:/Project2/111", "mj_qa_section_ai", 'majles', True, "mj_qa_section")
# elastic.restorFileToElastic('G:/Project2/111', 'dh_haditha', 'dhadith', 'dh_haditha' )
elastic.restorFileToElastic2('G:/Project2/111/mj_qa_section_2_majles_repair.zip', 'mj_qa_section', 'majles', False, 'mj_qa_section')
#elastic.restorFileToElastic('G:/Project2/111', 'mj_model', 'majles', True, 'mj_model' )
elastic.restorFileToElastic2('G:/Project2/111/mj_model_20250512-003003.zip', 'mj_model', 'majles', True, 'mj_model')
# elastic.restorFileToElastic2('G:/Project2/111/mj_qa_section_2_majles_repair.zip', 'mj_qa_section', 'majles', False, 'mj_qa_section')
body= {
@@ -284,6 +287,28 @@ body= {
}
# elastic.exportToJsonForAI("./data/", "mj_qa_section", "keywords_extract_40K", body, ["content"])
# body={
# "query": {
# "term": {
# "main_type": {
# "value": "قانون"
# }
# }
# }
# }
#elastic.exportToJsonForAI("./data/", "mj_qa_qanon", "qanon_title", body, ["title", "ts_date", "ts_year"])
# body={
# "query": {
# "term": {
# "main_type": {
# "value": "مقرره"
# }
# }
# }
# }
#elastic.exportToJsonForAI("./data/", "mj_qa_qanon", "regular_title", body, ["title", "ts_date", "ts_year"])
#-------------------------------------------------------