fix bugs
This commit is contained in:
+42
-37
@@ -4,17 +4,17 @@ from common.text_normalizer import TextNormalizer
|
||||
# from general import *
|
||||
from common.general_functions import *
|
||||
from common.elastic_helper import ElasticHelper
|
||||
from create_relation_tags import *
|
||||
from for_ai.create_relation_tags import *
|
||||
from temp_refactor_gn_dataset import *
|
||||
|
||||
load_dotenv(dotenv_path='config.env')
|
||||
|
||||
|
||||
host=os.getenv('HOST_160')
|
||||
password=os.getenv('HOST_160_PASS')
|
||||
# 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_118')
|
||||
# password=os.getenv('HOST_118_PASS')
|
||||
@@ -41,9 +41,14 @@ elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||
# elastic.backupIndexToZipfile("G:/Project2/111/haditha", "dh_volume")
|
||||
# elastic.backupIndexToZipfile("G:/Project2/111/haditha", "dh_haditha")
|
||||
|
||||
#elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section-m1")
|
||||
elastic.createIndex( 'mj_qa_section-m1', 'majles', 'mj_qa_section')
|
||||
elastic.restorFileToElastic2('G:/Project2/111/server112/mj_qa_section-m1.zip', 'mj_qa_section-m1', 'majles', False, 'mj_qa_section')
|
||||
# elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_domain")
|
||||
# elastic.createIndex( 'mj_qa_domain', 'majles', 'mj_domain')
|
||||
# elastic.restorFileToElastic2('G:/Project2/111/mj_qa_domain.zip', 'mj_qa_domain', 'majles', False, 'mj_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/server112/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')
|
||||
@@ -150,35 +155,35 @@ path_back = 'G:/Project2/111/server112/'
|
||||
# elastic.restorFileToElastic2('G:/Project2/111/mj_qa_section_2_majles_repair.zip', 'mj_qa_section', 'majles', False, 'mj_qa_section')
|
||||
|
||||
|
||||
body= {
|
||||
"query": {
|
||||
"terms": {
|
||||
"qanon_id": [
|
||||
"qq83354",
|
||||
"qq83382",
|
||||
"qq112748",
|
||||
"qq112296",
|
||||
"qq83435",
|
||||
"qq114127",
|
||||
"qq175888",
|
||||
"qq85335",
|
||||
"qq84208",
|
||||
"qq114652",
|
||||
"qq114640"
|
||||
]
|
||||
}
|
||||
},
|
||||
"sort": [
|
||||
{
|
||||
"qanon_id": {
|
||||
"order": "asc"
|
||||
},
|
||||
"child_order": {
|
||||
"order": "asc"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
# body= {
|
||||
# "query": {
|
||||
# "terms": {
|
||||
# "qanon_id": [
|
||||
# "qq83354",
|
||||
# "qq83382",
|
||||
# "qq112748",
|
||||
# "qq112296",
|
||||
# "qq83435",
|
||||
# "qq114127",
|
||||
# "qq175888",
|
||||
# "qq85335",
|
||||
# "qq84208",
|
||||
# "qq114652",
|
||||
# "qq114640"
|
||||
# ]
|
||||
# }
|
||||
# },
|
||||
# "sort": [
|
||||
# {
|
||||
# "qanon_id": {
|
||||
# "order": "asc"
|
||||
# },
|
||||
# "child_order": {
|
||||
# "order": "asc"
|
||||
# }
|
||||
# }
|
||||
# ]
|
||||
# }
|
||||
|
||||
#elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section", "mj_qa_section_Aab", body, False, ["content", "simplifies", "tcode_sub_old", "tcode_main_old", "code-ai", "ai_keywords"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user