fix bug tokens
This commit is contained in:
+47
-53
@@ -16,14 +16,19 @@ from temp_LawSection_content 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_60')
|
||||
# password=os.getenv('HOST_60_PASS')
|
||||
host=os.getenv('HOST_60')
|
||||
password=os.getenv('HOST_60_PASS')
|
||||
|
||||
# host=os.getenv('HOST_161')
|
||||
# password=os.getenv('HOST_161_PASS')
|
||||
|
||||
# host=os.getenv('HOST_80')
|
||||
# password=os.getenv('HOST_80_PASS')
|
||||
@@ -74,60 +79,49 @@ elastic = ElasticHelper(host, password, "elastic", path_base_map)
|
||||
# elastic.createIndex('mj_qa_section', 'majles', 'mj_qa_section')
|
||||
# elastic.zipFileToElastic(path_back, 'mj_qa_section')
|
||||
|
||||
# elastic.backupIndexToZipfile("G:/Project2/111", "gn_log_action")
|
||||
#selastic.backupIndexToZipfile("G:/Project2/111", "dh_haditha")
|
||||
# elastic.backupIndexToZipfile("G:/Project2/111", "gn_calendar")
|
||||
|
||||
# elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section")
|
||||
#elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section_ai")
|
||||
#elastic.backupIndexToZipfile("G:/Project2/111", "mj_qa_section")
|
||||
# elastic.backupIndexToZipfile("G:/Project2/111", "dh_haditha")
|
||||
#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.restorFileToElastic('G:/Project2/111', 'gn_calendar')
|
||||
|
||||
body= {
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": [
|
||||
{
|
||||
"bool": {
|
||||
"should": [
|
||||
{
|
||||
"match_phrase": {
|
||||
"title.ph": {
|
||||
"query": "نسخ ضمنی",
|
||||
"boost": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match_phrase": {
|
||||
"content.ph": {
|
||||
"query": "نسخ ضمنی",
|
||||
"boost": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"bool": {
|
||||
"filter": {
|
||||
"bool": {
|
||||
"must": [
|
||||
{
|
||||
"term": {
|
||||
"ts_ref.keyword": "اداره کل حقوقی قوه قضاییه"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
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_opinion", "mj_qa_opinion_naskh", body, False, ["content"])
|
||||
#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"])
|
||||
|
||||
#-------------------------------------------------------
|
||||
#### فایده ای نداشت ....!!!
|
||||
@@ -185,7 +179,7 @@ path_back = 'G:/Project2/111'
|
||||
# path_back = 'G:/Project2/_back/back_data/data_majles/elastic/v1.0/full'
|
||||
# elastic.restorFileToElastic(path_back, 'mj_qa_section', 'majles')
|
||||
|
||||
elastic.restorFileToElastic(path_back, 'gn_log_action')
|
||||
# elastic.restorFileToElastic(path_back, 'gn_log_action')
|
||||
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user