From 0d99c9adf4c056911065d750203cf0290b6d273c Mon Sep 17 00:00:00 2001 From: init_mahdi Date: Wed, 5 Nov 2025 17:27:39 +0330 Subject: [PATCH] lvl zero --- app/monir/__init__.py | 0 app/monir/elastic_helper.py | 791 +++++++++ app/monir/new_schema/1.json | 2076 ++++++++++++++++++++++ app/monir/new_schema/mn_meet.json | 279 +++ app/monir/new_schema/mn_meet_entity.json | 125 ++ app/monir/new_schema/mn_sections.json | 209 +++ app/monir/new_schema/mn_term.json | 82 + app/monir/new_schema/monir.json | 325 ++++ app/monir/readme.md | 16 + app/monir/sanad_exmple1.json | 71 + app/monir/sanad_exmple2.json | 71 + app/monir/sanad_old_schema.json | 462 +++++ app/monir/sanad_stuff.py | 0 app/monir/steps_old_schema.json | 78 + 14 files changed, 4585 insertions(+) create mode 100644 app/monir/__init__.py create mode 100644 app/monir/elastic_helper.py create mode 100644 app/monir/new_schema/1.json create mode 100644 app/monir/new_schema/mn_meet.json create mode 100644 app/monir/new_schema/mn_meet_entity.json create mode 100644 app/monir/new_schema/mn_sections.json create mode 100644 app/monir/new_schema/mn_term.json create mode 100644 app/monir/new_schema/monir.json create mode 100644 app/monir/readme.md create mode 100644 app/monir/sanad_exmple1.json create mode 100644 app/monir/sanad_exmple2.json create mode 100644 app/monir/sanad_old_schema.json create mode 100644 app/monir/sanad_stuff.py create mode 100644 app/monir/steps_old_schema.json diff --git a/app/monir/__init__.py b/app/monir/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/monir/elastic_helper.py b/app/monir/elastic_helper.py new file mode 100644 index 0000000..3f77c53 --- /dev/null +++ b/app/monir/elastic_helper.py @@ -0,0 +1,791 @@ +import zipfile +import sys +import os +import json +from time import sleep +from elasticsearch import Elasticsearch,helpers + +class ElasticHelper(): + + counter = 0 + total = 0 + id = "" + path_mappings = os.getcwd() + '/repo/_other/' + + def __init__(self, es_url="http://127.0.0.1:6900", es_pass="", es_user="elastic", path_mappings = ""): + + if path_mappings : + self.path_mappings = path_mappings + + if es_pass == '' : + self.es = Elasticsearch(es_url) + else: + self.es = Elasticsearch( + es_url, + http_auth=(es_user, es_pass), + ) + + print(es_url) + print(self.es) + + self.success_connect = False + for a in range(0,10): + try : + if not self.es.ping(): + print('elastic not ping, sleep 30 s : ', a) + sleep(5) + continue + else: + self.success_connect = True + break + + except Exception as e: + break + if not self.success_connect : + print('******','not access to elastic service') + return + + + self.counter = 0 + self.total = 0 + self.id = "" + + + def get_doctument(self, index_name, id): + res = self.es.get(index=index_name, id=id) + return res + + def exist_doctument(self, index_name, id): + res = self.es.exists(index=index_name, id=id) + return res + + def update_index_doc(self, is_update_state, index_name_o, eid, data): + if is_update_state: + resp = self.es.update(index=index_name_o, id=eid, doc=data) + # resp = self.es.update(index=index_name_o, id=eid, body={'doc':data}) + else: + resp = self.es.index(index=index_name_o, id=eid, document=data) + return resp + + + def exportToJsonForAI(self, path_back, index_name, out_name= '', body={}, fields=[], mode='normal', collapse_field = '') : + print('*' * 50, ' start backup -->', index_name) + self.counter = 0 + sid = None + + out = out_name + if out_name == '' : + out = index_name + + s_res = self.es.search( + index=index_name, + scroll='5m', + size=1000, + body=body + ) + self.total = s_res["hits"]["total"]['value'] + + print('start index = %s' % index_name) + print('total = %d' % self.total) + + sid = s_res['_scroll_id'] + scroll_size = len(s_res['hits']['hits']) + pack_count = 1 + out_json = [] + if mode == 'dict' or collapse_field: + out_json = {} + + prev_collapse_value = '' + pack_collapse = [] + while scroll_size > 0: + "Scrolling..." + self.counter += scroll_size + print("progress -> %.2f %%" % ((self.counter / self.total)*100)) + + #### for test + # if pack_count > 2 : + # break + pack_count += 1 + ############################# + for item in s_res['hits']['hits']: + id = item['_id'] + item2=None + if mode =='id' : # فقط شناسه ها نیاز هست + item2=id + elif fields : + item2={} + item2['id']= id + for kf in fields : + #print(kf) + if kf in item['_source'] : + # print(item['_source'][kf]) + item2[kf] = item['_source'][kf] + elif '.' in kf : + cols = kf.split('.') + subsource = item['_source'] + for sub in cols : + if sub in subsource : + subsource = subsource[sub] + continue + else: + break + key = kf.replace(".", "__") + item2[key] = subsource + + #exit() + else : + item2={} + item2=item + + if collapse_field and collapse_field in item['_source']: + collapse_value = item['_source'][collapse_field] + if not prev_collapse_value : + prev_collapse_value = collapse_value + + if not collapse_value == prev_collapse_value : + out_json[prev_collapse_value] = pack_collapse + pack_collapse = [] + prev_collapse_value = collapse_value + + pack_collapse.append(item2) + + elif mode == 'dict': + out_json[id]=item2 + else : + out_json.append(item2) + + + s_res = self.es.scroll(scroll_id=sid, scroll='2m', request_timeout=100000) + sid = s_res['_scroll_id'] + scroll_size = len(s_res['hits']['hits']) + + sid = None + + if collapse_field and prev_collapse_value and pack_collapse : + out_json[prev_collapse_value] = pack_collapse + + with open(path_back + "/"+ out, "w", encoding="utf-8") as fout: + json.dump(out_json, fout, ensure_ascii=False, indent=4) + + ############################## + + def backupIndexToZipfile(self, path_back, index_name, file_name= '', body={}, byzip = True, fields=[], noFields=[]) : + print('*' * 50, ' start backup -->', index_name) + self.counter = 0 + sid = None + + out = index_name + + if file_name == '' : + file_name = index_name + + + if body == {} : + s_res = self.es.search( + index=index_name, + scroll='5m', + size=1000 + ) + else: + s_res = self.es.search( + index=index_name, + scroll='5m', + size=1000, + body=body + ) + + self.total = s_res["hits"]["total"]['value'] + if self.total == 0 : + print('total index_name by query = %d' % self.total) + return False + + if byzip: + fout = zipfile.ZipFile(path_back + "/"+ file_name + '.zip', 'w') + else: + fout = open( path_back + "/"+ file_name + '.json', 'a+' , encoding='utf-8') + + + print('start index = %s' % index_name) + print('total = %d' % self.total) + + sid = s_res['_scroll_id'] + scroll_size = len(s_res['hits']['hits']) + file_count = 1 + while scroll_size > 0: + "Scrolling..." + self.counter += scroll_size + print("progress -> %.2f %%" % ((self.counter / self.total)*100)) + ############################# + out_json = [] + for item in s_res['hits']['hits']: + if fields : + item2={} + item2['id']=item['_id'] + item2['_source']={} + for kf in fields : + if kf in item['_source'] : + item2['_source'][kf] = item['_source'][kf] + else : + item2=item + + if noFields : + for kf in noFields : + if kf in item2['_source']: + del item2['_source'][kf] + + + out_json.append(item2) + + + text = json.dumps(out_json, ensure_ascii=False) + out_json = [] + if byzip: + filename = out + str(file_count) + '.json' + file_count +=1 + fout.writestr(filename, text.encode('utf-8'), zipfile.ZIP_DEFLATED ) + else: + fout.write(text) + + ############################## + s_res = self.es.scroll(scroll_id=sid, scroll='2m', request_timeout=100000) + sid = s_res['_scroll_id'] + scroll_size = len(s_res['hits']['hits']) + sid = None + fout.close() + + + def restorFileToElastic(self, path_back, index_name, app_key = '', queryDelete = True, map_name='') : + if not os.path.exists(path_back) : + print(' **** error *** path not exist: ', path_back) + return False + + file_path = path_back + '/' + index_name + '.zip' + if not os.path.exists(file_path ) : + return False + + if queryDelete : + # اگر وجود داشته باشد، از کاربر برای حذفش سوال میکند + if self.deleteIndex(index_name) : + self.createIndex(index_name, app_key, map_name) + self.zipFileToElastic(file_path, index_name) + else : # اگر وجود داشته باشد پرش می کند و کاری نمیکند + self.createIndex(index_name, app_key, map_name) + self.zipFileToElastic(file_path, index_name) + + def restorFileToElastic2(self, path_file, index_name, app_key = '', queryDelete = True, map_name='') : + if not os.path.exists(path_file) : + print(' **** error *** path not exist: ', path_file) + return False + + file_path = path_file + if not os.path.exists(file_path ) : + return False + + if queryDelete : + # اگر وجود داشته باشد، از کاربر برای حذفش سوال میکند + if self.deleteIndex(index_name) : + self.createIndex(index_name, app_key, map_name) + self.zipFileToElastic(file_path, index_name) + else : # اگر وجود داشته باشد پرش می کند و کاری نمیکند + self.createIndex(index_name, app_key, map_name) + self.zipFileToElastic(file_path, index_name) + + + def renameElasticIndex(self, index_name_i, index_name_o, app_key = '', map_name='') : + + if self.createIndex(index_name_o, app_key, map_name) : + res = self.es.reindex( + body={ + "source": {"index": index_name_i}, + "dest": {"index": index_name_o} + }, + wait_for_completion=False) + + print(type(res)) + print(res) + + taskid = res["task"] if res["task"] else "" + #tasks = client.TasksClient(self.es) + tasks = self.es.tasks + while True : + res = tasks.get(task_id = taskid) + if res["completed"] : + break + + # print( res["task"]) + print( '----', index_name_o, ' imported : ', res["task"]["status"]["total"] , ' / ', res["task"]["status"]["created"]) + sleep(1) + print( '----', index_name_o, ' complated') + + + def deleteIndex(self, index_name) : + if not self.es.indices.exists(index=index_name) : + print(' ' * 10, " for delete NOT exist index :", index_name ) + return True + + question = 'Is DELETE elastic index (' + index_name +') ? ' + if self.query_yes_no(question) : + self.es.indices.delete(index = index_name) + print('%' * 10 , " Finish DELETE index :", index_name ) + return True + else : + return False + + def query_yes_no(self, question, default="no"): + valid = { "yes": True, "y": True, "ye": True, "no": False, "n": False } + if default is None: + prompt = " [y/n] " + elif default == "yes": + prompt = " [Y/n] " + elif default == "no": + prompt = " [y/N] " + else: + raise ValueError("invalid default answer: '%s'" % default) + + while True: + print('%'*10, ' quistion ', '%'*10 , '\n') + sys.stdout.write(question + prompt) + choice = input().lower() + if default is not None and choice == "": + return valid[default] + elif choice in valid: + return valid[choice] + else: + sys.stdout.write("لطفا یکی از موارد روبرو را وارد کنید : 'yes' or 'no' " "(or 'y' or 'n').\n") + + def createIndexIfNotExist(self, index_name_o, mapping_o=""): + try: + if not self.es.indices.exists(index=index_name_o): + response = self.es.indices.create(index=index_name_o, body=mapping_o) + # print out the response: + print("create index response:", response) + except: + print("....... index exist ! ... not created") + + + def createIndex(self, index_name, app_key='', map_name=''): + + path_base = self.path_mappings + path_mapping1 = path_base + 'general/' + if app_key == '' : + app_key = 'tavasi' + path_mapping2 = path_base + app_key + '/' + + + if map_name == '': + map_name = index_name + + if self.es.indices.exists(index=index_name) : + print("============== exist index :", index_name ) + return True + + if map_name == 'mj_rg_section' or map_name == 'semantic_search' : + map_name = 'mj_qa_section' + elif map_name[-3]=='_ai': + map_name=[0-len(map_name)-3] + print(map_name) + + mapping_file_path = path_mapping1 + map_name + '.json' + print("mapping_file_path : " , mapping_file_path) + if not os.path.isfile(mapping_file_path): + if not os.path.isfile(mapping_file_path): + mapping_file_path = path_mapping2 + map_name + '.json' + + print("mapping_file_path : " , mapping_file_path) + + # Create Index With Mapping + if os.path.isfile(mapping_file_path): + mapping_file = open( mapping_file_path,'r', encoding='utf-8' ) + mapping_file_read = mapping_file.read() + mapping_data = json.loads(mapping_file_read) + mapping_file.close() + if self.es.indices.exists(index=index_name) : + print("============== exist index :", index_name ) + else : + self.es.indices.create(index = index_name , body = mapping_data) + return True + else: + print('*** error not find maping file elastic : *******', mapping_file_path) + return False + + + def updateBulkList(self, listData, index_name): + chunk_size=1000 + raise_on_error=False + raise_on_exception=False + stats_only=True + yield_ok = False + + actions=[] + for item in listData: + actions.append({ + "_op_type": "update", + "_index": index_name, + "_id" : item['_id'], + "doc": item['_source'] + } + ) + helpers.bulk(self.es, actions, chunk_size, raise_on_error, raise_on_exception, stats_only, yield_ok ) + + def importBulkList(self, listData, index_name): + chunk_size=100000 + raise_on_error=False + raise_on_exception=False + stats_only=True + yield_ok = False + + for item in listData: + actions = [{ + "_op_type": "index", + "_index": index_name, + "_id" : item['_id'], + "_source": item['_source'] + } + ] + helpers.bulk(self.es, actions, chunk_size, raise_on_error, raise_on_exception, stats_only, yield_ok ) + + + def importJsonDataToElastic(self, jsonData, index_name, fields=[]): + chunk_size=1000 + raise_on_error=False + raise_on_exception=False + stats_only=True + yield_ok = False + + actions=[] + + for item in jsonData: + id = item['_id'] if item['_id'] else item['id'] + source = item['_source'] + if fields : + source = {} + for col in fields : + if col in item['_source'] : + source[col] = item['_source'] + + + actions.append({ + "_op_type": "index", + "_index": index_name, + "_id" : id, + "_source": source + }) + helpers.bulk(self.es, actions, chunk_size, raise_on_error, raise_on_exception, stats_only, yield_ok ) + + + def fileToElastic(self, file_path, index_name, limit_pack = -1, fields=[]): + if not os.path.exists(file_path): + print("file zip:" , file_path , " not exist") + return + print("index:" , index_name , '=>' , file_path ) + self.counter = 0 + with open(file_path) as file: + data = json.loads(file.read()) + self.importJsonDataToElastic(data, index_name, fields) + + self.es.indices.refresh(index=index_name) + print(self.es.cat.count(index=index_name, format="json")) + + def zipFileToElastic(self, file_path, index_name, limit_pack = -1, fields=[]): + if not os.path.exists(file_path): + print("file zip:" , file_path , " not exist for imort to elastic : ", index_name ) + return + + fileNo = 0 + with zipfile.ZipFile(file_path, 'r') as zObject: + fileNo +=1 + print("="*10, " zip fileNo: " , fileNo ," - ( ", index_name," ) | File Numbers:" ,len(zObject.namelist()) , "=" * 10) + + packNo = 0 + self.counter = 0 + for filename in zObject.namelist(): + packNo += 1 + if limit_pack != -1 : + if packNo > limit_pack : + print('limit_data ', index_name, ' ', limit_pack) + break + + print("index:" , index_name , '=>' , filename ) + with zObject.open(filename) as file: + data = json.loads(file.read()) + self.importJsonDataToElastic(data, index_name, fields) + + self.es.indices.refresh(index=index_name) + print(self.es.cat.count(index=index_name, format="json")) + print(" END Of Import to elastic ", index_name ,"\n") + + + def iterateJsonFile(self, file_path, isZip=True, limit_pack = -1): + if not os.path.exists(file_path): + print("file zip:" , file_path , " not exist iterateJsonFile " ) + return + + if isZip : + fileNo = 0 + with zipfile.ZipFile(file_path, 'r') as zObject: + fileNo +=1 + print("="*10, " zip fileNo: " , fileNo ," iterateJsonFile - | File Numbers:" ,len(zObject.namelist()) , "=" * 10) + + packNo = 0 + self.counter = 0 + for filename in zObject.namelist(): + packNo += 1 + if limit_pack != -1 : + if packNo > limit_pack : + print('limit_data iterateJsonFile ', limit_pack) + break + + print("index iterateJsonFile :", '=>' , filename ) + with zObject.open(filename) as file: + data = json.loads(file.read()) + # Yield each entry + # yield data + yield from ({"source": hit["_source"], "id": hit["_id"]} for hit in data) + else : + with open(filename, 'r', encoding='utf-8') as file: + data = json.loads(file.read()) + # Yield each entry + # yield from (hit for hit in data) + #return data + yield from ({"source": hit["_source"], "id": hit["_id"]} for hit in data) + + + def es_iterate_all_documents(self, index, body="", pagesize=250, scroll_timeout="25m", **kwargs): + """ + Helper to iterate ALL values from a single index + Yields all the documents. + """ + is_first = True + while True: + # Scroll next + if is_first: # Initialize scroll + # result = self.es.search(index=index, scroll="2m", **kwargs, body={ + # "size": pagesize + # }) + if body : + result = self.es.search( + index=index, + scroll=scroll_timeout, + **kwargs, + size=pagesize, + body=body + ) + else : + result = self.es.search( + index=index, + scroll=scroll_timeout, + **kwargs, + size=pagesize + ) + + self.total = result["hits"]["total"]["value"] + if self.total > 0: + print("total = %d" % self.total) + is_first = False + else: + # result = es.scroll(body={ + # "scroll_id": scroll_id, + # "scroll": scroll_timeout + # }) + result = self.es.scroll(scroll_id=scroll_id, scroll=scroll_timeout) + + scroll_id = result["_scroll_id"] + hits = result["hits"]["hits"] + self.counter += len(hits) + if self.total > 0 : + print("progress -> %.2f %%" % ((self.counter / self.total) * 100)) + # Stop after no more docs + if not hits: + break + # Yield each entry + yield from ({"source": hit["_source"], "id": hit["_id"]} for hit in hits) + + + def removeCustomFileds(self, index_name_i, fields=[], renameFileds={}, body={}, bulk_update_size=200): + try: + _list = [] + try: + _list = self.es_iterate_all_documents(index_name_i, body) + except Exception as e: + print(e) + + bulk_data = [] + count = 0 + total_count = 0 + for mentry in _list: + count += 1 + + entry = mentry["source"] + id = mentry["id"] + # print(id) + eid = id + + # if (count % 100) == 0 : + # print("%s -> %.2f " % (id , (count / self.total) if self.total > 0 else 0)) + + data_filled = False + data = entry + for col in fields: + if col in data : + del data[col] + + elif '.' in col : + cols = col.split('.') + subsource = entry + for sub in cols : + dCol = subsource.get(sub, None) + if dCol : + subsource = dCol + else : + break + + for col in renameFileds.items(): + if col in data : + dCol = data[col] + data[renameFileds[col]] = dCol + del data[col] + + bulk_data.append({ + '_id': eid, + '_source' : data + }) + + # انتقال دسته جمعی کدها به الاستیک + if len(bulk_data) >= bulk_update_size: + total_count += len(bulk_data) + print('=' * 5, ' update bulk --> ' , 'total='+ str(total_count) , str(count)) + self.importBulkList(bulk_data, index_name_i) + bulk_data = [] + + + if len(bulk_data) >= 0: + total_count += len(bulk_data) + print('=' * 5, ' update bulk --> ' , 'total='+ str(total_count) , str(count)) + self.importBulkList(bulk_data, index_name_i) + bulk_data = [] + + except Exception as e: + # print("1111") + print(e) + + # save_error(id, e) + + + def moveCustomFileds(self, index_name_i, index_name_o, fields=[], renameFileds={}): + try: + body = {} + list = [] + try: + list = self.es_iterate_all_documents(index_name_i) + except Exception as e: + print(e) + + count = 0 + for mentry in list: + count += 1 + + entry = mentry["source"] + id = mentry["id"] + # print(id) + eid = id + + if (count % 100) == 0 : + print("%s -> %.2f " % (id , (count / self.total) if self.total > 0 else 0)) + + data_filled = False + data = {} + for col in fields: + + if '.' in col : + cols = col.split('.') + subsource = entry + for sub in cols : + dCol = subsource.get(sub, None) + if dCol : + subsource = dCol + else : + break + else : + dCol = entry.get(col, None) + + if dCol is None: + continue + + if col in renameFileds : + data[renameFileds[col]] = dCol + else: + data[col] = dCol + + data_filled = True + + if not data_filled : + continue + + try: + resp = self.update_index_doc(True, index_name_o, eid, data) + except Exception as e: + print(e) + # save_error(id, e) + + except Exception as e: + # print("1111") + print(e) + + # save_error(id, e) + + def mappingIndex(self, index_name_i): + # فقط از طریق کیبانا میشه تغییر مپ داد + + # با پایتون نمیشه + # باید ایندکس جدیدی با مپ مطلوب ایجاد کرد و رایندکس کرد + pass + + def updateByQueryIndex(self, index_name_i, body): + ## sample + # body = { + # "script": { + # "inline": "ctx._source.Device='Test'", + # "lang": "painless" + # }, + # "query": { + # "match": { + # "Device": "Boiler" + # } + # } + # } + try: + self.es.update_by_query(body=body, index=index_name_i) + + except Exception as e: + print(e) + # save_error(id, e) + + + def deleteByQueryIndex(self, index_name_i, body): + ## sample + # body = { + # "query": { + # "match": { + # "Device": "Boiler" + # } + # } + # } + try: + self.es.delete_by_query(index=index_name_i, body=body ) + + except Exception as e: + print(e) + # save_error(id, e) + + def delete_by_ids(self, index_name_i, ids): + try: + # ids = ['test1', 'test2', 'test3'] + + query = {"query": {"terms": {"_id": ids}}} + res = self.es.delete_by_query(index=index_name_i, body=query) + print(res) + + except Exception as e: + print(e) + # save_error(id, e) + diff --git a/app/monir/new_schema/1.json b/app/monir/new_schema/1.json new file mode 100644 index 0000000..8d485e3 --- /dev/null +++ b/app/monir/new_schema/1.json @@ -0,0 +1,2076 @@ +{ + "took": 16, + "timed_out": false, + "_shards": { + "total": 1, + "successful": 1, + "skipped": 0, + "failed": 0 + }, + "hits": { + "total": { + "value": 10000, + "relation": "gte" + }, + "max_score": null, + "hits": [] + }, + "aggregations": { + "title": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 0, + "buckets": [ + { + "key": "سند پژوهشی", + "doc_count": 9752, + "attachment_link": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 9312, + "buckets": [ + { + "key": "/Quick/Download/106338", + "doc_count": 10 + }, + { + "key": "/Quick/Download/106339", + "doc_count": 7 + }, + { + "key": "/Quick/Download/106344", + "doc_count": 6 + }, + { + "key": "/Quick/Download/106346", + "doc_count": 6 + }, + { + "key": "/Quick/Download/106350", + "doc_count": 6 + }, + { + "key": "/Quick/Download/106348", + "doc_count": 5 + }, + { + "key": "/Quick/Download/106349", + "doc_count": 5 + }, + { + "key": "/Quick/Download/108444", + "doc_count": 5 + }, + { + "key": "/Quick/Download/108595", + "doc_count": 5 + }, + { + "key": "/Quick/Download/108599", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110755", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110757", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110760", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110762", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110769", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110771", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110774", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110776", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110821", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110822", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110826", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110827", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110831", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110832", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110840", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110841", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110857", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110858", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110862", + "doc_count": 5 + }, + { + "key": "/Quick/Download/110863", + "doc_count": 5 + }, + { + "key": "/Quick/Download/106333", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106336", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106341", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106343", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106376", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106381", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106383", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106385", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106390", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106391", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106398", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106400", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106402", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106405", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106407", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106410", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106413", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106415", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106417", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106419", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106421", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106423", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106425", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106428", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106431", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106433", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106440", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106442", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106445", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106456", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106484", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106487", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106490", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106493", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106502", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106511", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106516", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106519", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106522", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106525", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106528", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106533", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106536", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106539", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106542", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106545", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106548", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106553", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106556", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106559", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106562", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106565", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106568", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106571", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106578", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106581", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106584", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106587", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106590", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106593", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106596", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106599", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106602", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106605", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106608", + "doc_count": 4 + }, + { + "key": "/Quick/Download/106613", + "doc_count": 4 + }, + { + "key": "/Quick/Download/107233", + "doc_count": 4 + }, + { + "key": "/Quick/Download/107236", + "doc_count": 4 + }, + { + "key": "/Quick/Download/107239", + "doc_count": 4 + }, + { + "key": "/Quick/Download/107242", + "doc_count": 4 + } + ] + } + }, + { + "key": "سند اولیه", + "doc_count": 2514, + "attachment_link": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 1967, + "buckets": [ + { + "key": "/Quick/Download/339106", + "doc_count": 30 + }, + { + "key": "/Quick/Download/339558", + "doc_count": 24 + }, + { + "key": "/Quick/Download/339561", + "doc_count": 24 + }, + { + "key": "/Quick/Download/339562", + "doc_count": 24 + }, + { + "key": "/Quick/Download/339107", + "doc_count": 21 + }, + { + "key": "/Quick/Download/339559", + "doc_count": 20 + }, + { + "key": "/Quick/Download/339560", + "doc_count": 20 + }, + { + "key": "/Quick/Download/250317", + "doc_count": 12 + }, + { + "key": "/Quick/Download/339109", + "doc_count": 12 + }, + { + "key": "/Quick/Download/262244", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262245", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262247", + "doc_count": 8 + }, + { + "key": "/Quick/Download/339105", + "doc_count": 8 + }, + { + "key": "/Quick/Download/339108", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262246", + "doc_count": 6 + }, + { + "key": "/Quick/Download/339104", + "doc_count": 6 + }, + { + "key": "/Quick/Download/340367", + "doc_count": 5 + }, + { + "key": "/Quick/Download/340369", + "doc_count": 5 + }, + { + "key": "/Quick/Download/340370", + "doc_count": 5 + }, + { + "key": "/Quick/Download/308928", + "doc_count": 4 + }, + { + "key": "/Quick/Download/308929", + "doc_count": 4 + }, + { + "key": "/Quick/Download/308930", + "doc_count": 4 + }, + { + "key": "/Quick/Download/308931", + "doc_count": 4 + }, + { + "key": "/Quick/Download/339059", + "doc_count": 4 + }, + { + "key": "/Quick/Download/339060", + "doc_count": 4 + }, + { + "key": "/Quick/Download/339221", + "doc_count": 4 + }, + { + "key": "/Quick/Download/339222", + "doc_count": 4 + }, + { + "key": "/Quick/Download/339223", + "doc_count": 4 + }, + { + "key": "/Quick/Download/339234", + "doc_count": 4 + }, + { + "key": "/Quick/Download/339235", + "doc_count": 4 + }, + { + "key": "/Quick/Download/339236", + "doc_count": 4 + }, + { + "key": "/Quick/Download/339237", + "doc_count": 4 + }, + { + "key": "/Quick/Download/339718", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340119", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340120", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340121", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340122", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340123", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340366", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340368", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340406", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340407", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340408", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340409", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340410", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340434", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340437", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340438", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340439", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340440", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340443", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340458", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340459", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340460", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340461", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340462", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340463", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340464", + "doc_count": 4 + }, + { + "key": "/Quick/Download/363449", + "doc_count": 4 + }, + { + "key": "/Quick/Download/374222", + "doc_count": 4 + }, + { + "key": "/Quick/Download/374223", + "doc_count": 4 + }, + { + "key": "/Quick/Download/374224", + "doc_count": 4 + }, + { + "key": "/Quick/Download/374225", + "doc_count": 4 + }, + { + "key": "/Quick/Download/374226", + "doc_count": 4 + }, + { + "key": "/Quick/Download/374227", + "doc_count": 4 + }, + { + "key": "/Quick/Download/374228", + "doc_count": 4 + }, + { + "key": "/Quick/Download/374229", + "doc_count": 4 + }, + { + "key": "/Quick/Download/374230", + "doc_count": 4 + }, + { + "key": "/Quick/Download/374232", + "doc_count": 4 + }, + { + "key": "/Quick/Download/247902", + "doc_count": 3 + }, + { + "key": "/Quick/Download/247903", + "doc_count": 3 + }, + { + "key": "/Quick/Download/247904", + "doc_count": 3 + }, + { + "key": "/Quick/Download/308927", + "doc_count": 3 + }, + { + "key": "/Quick/Download/339227", + "doc_count": 3 + }, + { + "key": "/Quick/Download/339228", + "doc_count": 3 + }, + { + "key": "/Quick/Download/339232", + "doc_count": 3 + }, + { + "key": "/Quick/Download/339233", + "doc_count": 3 + }, + { + "key": "/Quick/Download/339239", + "doc_count": 3 + }, + { + "key": "/Quick/Download/339240", + "doc_count": 3 + }, + { + "key": "/Quick/Download/339553", + "doc_count": 3 + }, + { + "key": "/Quick/Download/339714", + "doc_count": 3 + }, + { + "key": "/Quick/Download/339715", + "doc_count": 3 + }, + { + "key": "/Quick/Download/339716", + "doc_count": 3 + }, + { + "key": "/Quick/Download/339717", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340118", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340411", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340412", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340413", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340414", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340415", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340416", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340417", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340418", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340419", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340420", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340421", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340431", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340432", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340435", + "doc_count": 3 + }, + { + "key": "/Quick/Download/340436", + "doc_count": 3 + } + ] + } + }, + { + "key": "کنترل", + "doc_count": 2476, + "attachment_link": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 2005, + "buckets": [ + { + "key": "/Quick/Download/249111", + "doc_count": 14 + }, + { + "key": "/Quick/Download/249108", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249131", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249135", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249136", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249137", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249142", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249143", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249144", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249146", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249147", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249148", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249149", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249150", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249151", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249152", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249153", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249154", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249155", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249157", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249159", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249160", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249133", + "doc_count": 6 + }, + { + "key": "/Quick/Download/249139", + "doc_count": 6 + }, + { + "key": "/Quick/Download/251634", + "doc_count": 6 + }, + { + "key": "/Quick/Download/249938", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249951", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249953", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249954", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249955", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249959", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249963", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249965", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249966", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249967", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249968", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249969", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249971", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249972", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249973", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249974", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249975", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249982", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249984", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249985", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249986", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249987", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249988", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249989", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249990", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249993", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249994", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249995", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249996", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249997", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249998", + "doc_count": 4 + }, + { + "key": "/Quick/Download/249999", + "doc_count": 4 + }, + { + "key": "/Quick/Download/250000", + "doc_count": 4 + }, + { + "key": "/Quick/Download/250001", + "doc_count": 4 + }, + { + "key": "/Quick/Download/250002", + "doc_count": 4 + }, + { + "key": "/Quick/Download/250003", + "doc_count": 4 + }, + { + "key": "/Quick/Download/250005", + "doc_count": 4 + }, + { + "key": "/Quick/Download/250258", + "doc_count": 4 + }, + { + "key": "/Quick/Download/250259", + "doc_count": 4 + }, + { + "key": "/Quick/Download/250260", + "doc_count": 4 + }, + { + "key": "/Quick/Download/250315", + "doc_count": 4 + }, + { + "key": "/Quick/Download/251318", + "doc_count": 4 + }, + { + "key": "/Quick/Download/251321", + "doc_count": 4 + }, + { + "key": "/Quick/Download/251341", + "doc_count": 4 + }, + { + "key": "/Quick/Download/251342", + "doc_count": 4 + }, + { + "key": "/Quick/Download/251402", + "doc_count": 4 + }, + { + "key": "/Quick/Download/248653", + "doc_count": 3 + }, + { + "key": "/Quick/Download/248656", + "doc_count": 3 + }, + { + "key": "/Quick/Download/248661", + "doc_count": 3 + }, + { + "key": "/Quick/Download/248663", + "doc_count": 3 + }, + { + "key": "/Quick/Download/248667", + "doc_count": 3 + }, + { + "key": "/Quick/Download/249939", + "doc_count": 3 + }, + { + "key": "/Quick/Download/249956", + "doc_count": 3 + }, + { + "key": "/Quick/Download/249957", + "doc_count": 3 + }, + { + "key": "/Quick/Download/249958", + "doc_count": 3 + }, + { + "key": "/Quick/Download/249960", + "doc_count": 3 + }, + { + "key": "/Quick/Download/249961", + "doc_count": 3 + }, + { + "key": "/Quick/Download/249962", + "doc_count": 3 + }, + { + "key": "/Quick/Download/249964", + "doc_count": 3 + }, + { + "key": "/Quick/Download/249970", + "doc_count": 3 + }, + { + "key": "/Quick/Download/249983", + "doc_count": 3 + }, + { + "key": "/Quick/Download/249991", + "doc_count": 3 + }, + { + "key": "/Quick/Download/249992", + "doc_count": 3 + }, + { + "key": "/Quick/Download/250004", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251316", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251320", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251322", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251323", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251324", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251325", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251326", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251327", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251336", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251337", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251339", + "doc_count": 3 + } + ] + } + }, + { + "key": "پیاده تایپ", + "doc_count": 1853, + "attachment_link": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 1425, + "buckets": [ + { + "key": "/Quick/Download/262937", + "doc_count": 10 + }, + { + "key": "/Quick/Download/262938", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262939", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262940", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262942", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262943", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262946", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262949", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262950", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262952", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262953", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262954", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262958", + "doc_count": 8 + }, + { + "key": "/Quick/Download/262959", + "doc_count": 8 + }, + { + "key": "/Quick/Download/249145", + "doc_count": 6 + }, + { + "key": "/Quick/Download/374257", + "doc_count": 6 + }, + { + "key": "/Quick/Download/374249", + "doc_count": 5 + }, + { + "key": "/Quick/Download/374250", + "doc_count": 5 + }, + { + "key": "/Quick/Download/374251", + "doc_count": 5 + }, + { + "key": "/Quick/Download/374252", + "doc_count": 5 + }, + { + "key": "/Quick/Download/374254", + "doc_count": 5 + }, + { + "key": "/Quick/Download/374255", + "doc_count": 5 + }, + { + "key": "/Quick/Download/374256", + "doc_count": 5 + }, + { + "key": "/Quick/Download/374258", + "doc_count": 5 + }, + { + "key": "/Quick/Download/374259", + "doc_count": 5 + }, + { + "key": "/Quick/Download/207147", + "doc_count": 4 + }, + { + "key": "/Quick/Download/207164", + "doc_count": 4 + }, + { + "key": "/Quick/Download/207216", + "doc_count": 4 + }, + { + "key": "/Quick/Download/217356", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227403", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227404", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227562", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227563", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227564", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227565", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227566", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227567", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227568", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227577", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227578", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227579", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227580", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227631", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227633", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227634", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227635", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227636", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227637", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227638", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227640", + "doc_count": 4 + }, + { + "key": "/Quick/Download/227641", + "doc_count": 4 + }, + { + "key": "/Quick/Download/262961", + "doc_count": 4 + }, + { + "key": "/Quick/Download/340365", + "doc_count": 4 + }, + { + "key": "/Quick/Download/341574", + "doc_count": 4 + }, + { + "key": "/Quick/Download/353390", + "doc_count": 4 + }, + { + "key": "/Quick/Download/72349", + "doc_count": 4 + }, + { + "key": "/Quick/Download/72353", + "doc_count": 4 + }, + { + "key": "/Quick/Download/114017", + "doc_count": 3 + }, + { + "key": "/Quick/Download/114208", + "doc_count": 3 + }, + { + "key": "/Quick/Download/114212", + "doc_count": 3 + }, + { + "key": "/Quick/Download/114215", + "doc_count": 3 + }, + { + "key": "/Quick/Download/114288", + "doc_count": 3 + }, + { + "key": "/Quick/Download/114646", + "doc_count": 3 + }, + { + "key": "/Quick/Download/250957", + "doc_count": 3 + }, + { + "key": "/Quick/Download/250958", + "doc_count": 3 + }, + { + "key": "/Quick/Download/250959", + "doc_count": 3 + }, + { + "key": "/Quick/Download/250960", + "doc_count": 3 + }, + { + "key": "/Quick/Download/250961", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251054", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262850", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262851", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262852", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262853", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262854", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262855", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262856", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262928", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262929", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262930", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262931", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262933", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262934", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262936", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262941", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262944", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262945", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262947", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262948", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262951", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262955", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262956", + "doc_count": 3 + }, + { + "key": "/Quick/Download/262957", + "doc_count": 3 + }, + { + "key": "/Quick/Download/288933", + "doc_count": 3 + }, + { + "key": "/Quick/Download/288934", + "doc_count": 3 + }, + { + "key": "/Quick/Download/288935", + "doc_count": 3 + }, + { + "key": "/Quick/Download/288936", + "doc_count": 3 + }, + { + "key": "/Quick/Download/288937", + "doc_count": 3 + }, + { + "key": "/Quick/Download/288938", + "doc_count": 3 + }, + { + "key": "/Quick/Download/288939", + "doc_count": 3 + }, + { + "key": "/Quick/Download/288940", + "doc_count": 3 + } + ] + } + }, + { + "key": "تطبیق", + "doc_count": 513, + "attachment_link": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 249, + "buckets": [ + { + "key": "/Quick/Download/328997", + "doc_count": 30 + }, + { + "key": "/Quick/Download/328998", + "doc_count": 30 + }, + { + "key": "/Quick/Download/329001", + "doc_count": 12 + }, + { + "key": "/Quick/Download/329002", + "doc_count": 12 + }, + { + "key": "/Quick/Download/249134", + "doc_count": 6 + }, + { + "key": "/Quick/Download/249138", + "doc_count": 6 + }, + { + "key": "/Quick/Download/249156", + "doc_count": 6 + }, + { + "key": "/Quick/Download/249158", + "doc_count": 6 + }, + { + "key": "/Quick/Download/251661", + "doc_count": 4 + }, + { + "key": "/Quick/Download/261873", + "doc_count": 4 + }, + { + "key": "/Quick/Download/251052", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251340", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251659", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251660", + "doc_count": 3 + }, + { + "key": "/Quick/Download/251664", + "doc_count": 3 + }, + { + "key": "/Quick/Download/261875", + "doc_count": 3 + }, + { + "key": "/Quick/Download/261876", + "doc_count": 3 + }, + { + "key": "/Quick/Download/261877", + "doc_count": 3 + }, + { + "key": "/Quick/Download/261878", + "doc_count": 3 + }, + { + "key": "/Quick/Download/286425", + "doc_count": 3 + }, + { + "key": "/Quick/Download/286736", + "doc_count": 3 + }, + { + "key": "/Quick/Download/288299", + "doc_count": 3 + }, + { + "key": "/Quick/Download/288301", + "doc_count": 3 + }, + { + "key": "/Quick/Download/328986", + "doc_count": 3 + }, + { + "key": "/Quick/Download/248654", + "doc_count": 2 + }, + { + "key": "/Quick/Download/249823", + "doc_count": 2 + }, + { + "key": "/Quick/Download/250318", + "doc_count": 2 + }, + { + "key": "/Quick/Download/251480", + "doc_count": 2 + }, + { + "key": "/Quick/Download/251487", + "doc_count": 2 + }, + { + "key": "/Quick/Download/251562", + "doc_count": 2 + }, + { + "key": "/Quick/Download/261701", + "doc_count": 2 + }, + { + "key": "/Quick/Download/261868", + "doc_count": 2 + }, + { + "key": "/Quick/Download/262008", + "doc_count": 2 + }, + { + "key": "/Quick/Download/262510", + "doc_count": 2 + }, + { + "key": "/Quick/Download/262516", + "doc_count": 2 + }, + { + "key": "/Quick/Download/286426", + "doc_count": 2 + }, + { + "key": "/Quick/Download/288264", + "doc_count": 2 + }, + { + "key": "/Quick/Download/288269", + "doc_count": 2 + }, + { + "key": "/Quick/Download/288298", + "doc_count": 2 + }, + { + "key": "/Quick/Download/288344", + "doc_count": 2 + }, + { + "key": "/Quick/Download/289029", + "doc_count": 2 + }, + { + "key": "/Quick/Download/298934", + "doc_count": 2 + }, + { + "key": "/Quick/Download/341586", + "doc_count": 2 + }, + { + "key": "/Quick/Download/341587", + "doc_count": 2 + }, + { + "key": "/Quick/Download/341588", + "doc_count": 2 + }, + { + "key": "/Quick/Download/341589", + "doc_count": 2 + }, + { + "key": "/Quick/Download/341590", + "doc_count": 2 + }, + { + "key": "/Quick/Download/341591", + "doc_count": 2 + }, + { + "key": "/Quick/Download/341592", + "doc_count": 2 + }, + { + "key": "/Quick/Download/341593", + "doc_count": 2 + }, + { + "key": "/Quick/Download/341594", + "doc_count": 2 + }, + { + "key": "/Quick/Download/341595", + "doc_count": 2 + }, + { + "key": "/Quick/Download/341596", + "doc_count": 2 + }, + { + "key": "/Quick/Download/341597", + "doc_count": 2 + }, + { + "key": "/Quick/Download/136040", + "doc_count": 1 + }, + { + "key": "/Quick/Download/136042", + "doc_count": 1 + }, + { + "key": "/Quick/Download/136044", + "doc_count": 1 + }, + { + "key": "/Quick/Download/248625", + "doc_count": 1 + }, + { + "key": "/Quick/Download/248628", + "doc_count": 1 + }, + { + "key": "/Quick/Download/248652", + "doc_count": 1 + }, + { + "key": "/Quick/Download/248669", + "doc_count": 1 + }, + { + "key": "/Quick/Download/248718", + "doc_count": 1 + }, + { + "key": "/Quick/Download/248719", + "doc_count": 1 + }, + { + "key": "/Quick/Download/248792", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249082", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249229", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249306", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249372", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249403", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249456", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249555", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249702", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249772", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249825", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249826", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249827", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249852", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249856", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249857", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249940", + "doc_count": 1 + }, + { + "key": "/Quick/Download/249941", + "doc_count": 1 + }, + { + "key": "/Quick/Download/250066", + "doc_count": 1 + }, + { + "key": "/Quick/Download/250179", + "doc_count": 1 + }, + { + "key": "/Quick/Download/250319", + "doc_count": 1 + }, + { + "key": "/Quick/Download/250359", + "doc_count": 1 + }, + { + "key": "/Quick/Download/250360", + "doc_count": 1 + }, + { + "key": "/Quick/Download/250368", + "doc_count": 1 + }, + { + "key": "/Quick/Download/250574", + "doc_count": 1 + }, + { + "key": "/Quick/Download/250807", + "doc_count": 1 + }, + { + "key": "/Quick/Download/251018", + "doc_count": 1 + }, + { + "key": "/Quick/Download/251420", + "doc_count": 1 + }, + { + "key": "/Quick/Download/251421", + "doc_count": 1 + }, + { + "key": "/Quick/Download/251560", + "doc_count": 1 + }, + { + "key": "/Quick/Download/251561", + "doc_count": 1 + }, + { + "key": "/Quick/Download/251563", + "doc_count": 1 + }, + { + "key": "/Quick/Download/251605", + "doc_count": 1 + }, + { + "key": "/Quick/Download/251657", + "doc_count": 1 + }, + { + "key": "/Quick/Download/261694", + "doc_count": 1 + }, + { + "key": "/Quick/Download/261695", + "doc_count": 1 + }, + { + "key": "/Quick/Download/261696", + "doc_count": 1 + } + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/app/monir/new_schema/mn_meet.json b/app/monir/new_schema/mn_meet.json new file mode 100644 index 0000000..8de50b9 --- /dev/null +++ b/app/monir/new_schema/mn_meet.json @@ -0,0 +1,279 @@ +{ + "main_type": { + "type": "keyword" + }, + "sub_type": { + "type": "keyword" + }, + + "id": { + "type": "keyword" + }, + "person_code": { + "type": "keyword" + }, + "research_code": { + "type": "keyword" + }, + "meet_code": { + "type": "keyword" + }, + "old_meet_id": { + "type": "integer" + }, + + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "meet_no": { + "type": "integer" + }, + + "term_info": { + "properties": { + "id": { + "type": "keyword" + }, + "format": { + "type": "keyword" + }, + "author": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + + "subtitle": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + + "subjects": { + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + "allwords": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + + "tags": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "keywords": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "verb": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + + "sanad_year": { + "type": "integer" + }, + "sanad_date": { + "type": "date" + }, + + "amplify": { + "type": "text" + }, + "ralation": { + "type": "keyword" + }, + "city": { + "type": "keyword" + }, + "place": { + "type": "keyword" + }, + "address": { + "type": "text" + }, + + + "audience": { + "type": "text" + }, + "attendees": { + "type": "text" + }, + + "report_info": { + "properties": { + "film_count": { + "type": "integer" + }, + "sound_count": { + "type": "integer" + }, + "photo_count": { + "type": "integer" + }, + "file_count": { + "type": "integer" + }, + "is_address": {"type": "integer"}, + "is_mindex": {"type": "integer"}, + "is_mintro": {"type": "integer"}, + "is_sanad_data1": {"type": "integer"}, + "is_sanad_data2": {"type": "integer"} + } + }, + + + "mindex": { + "type": "text", + "fields": { + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian", + "search_analyzer": "phrase_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + } + } + }, + "mintro": { + "type": "text", + "fields": { + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian", + "search_analyzer": "phrase_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + } + } + }, + "content": { + "type": "text", + "fields": { + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian", + "search_analyzer": "phrase_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + } + } + }, + + "completion" : { + "type" : "completion", + "analyzer" : "simple", + "preserve_separators" : true, + "preserve_position_increments" : true, + "max_input_length" : 50 + }, + "sort_date_timestamp": { + "type": "long" + }, + "permit_tags":{ + "type": "keyword" + }, + "resource_info": { + "type": "text", + "fields": { + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + } + } + } + } \ No newline at end of file diff --git a/app/monir/new_schema/mn_meet_entity.json b/app/monir/new_schema/mn_meet_entity.json new file mode 100644 index 0000000..463957d --- /dev/null +++ b/app/monir/new_schema/mn_meet_entity.json @@ -0,0 +1,125 @@ +{ + "main_type": { + "type": "keyword" + }, + "sub_type": { + "type": "keyword" + }, + + "id": { + "type": "keyword" + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "content": { + "type": "text", + "fields": { + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian", + "search_analyzer": "phrase_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + } + } + }, + + "permit_tags":{ + "type": "keyword" + }, + "search_state":{ + "type": "keyword" + }, + "user_create":{ + "type": "keyword" + }, + "time_create":{ + "type": "date" + }, + "time_edit":{ + "type": "date" + }, + "file_links": { + "properties": { + "title": {"type": "keyword"}, + "link": {"type": "text"}, + "type": {"type": "text"}, + "description": {"type": "text"} + } + }, + + "meet_info": { + "properties": { + "id": { + "type": "keyword" + }, + "format": { + "type": "keyword" + }, + "author": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + "term_info": { + "properties": { + "id": { + "type": "keyword" + }, + "format": { + "type": "keyword" + }, + "author": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + } +} \ No newline at end of file diff --git a/app/monir/new_schema/mn_sections.json b/app/monir/new_schema/mn_sections.json new file mode 100644 index 0000000..6eb6d28 --- /dev/null +++ b/app/monir/new_schema/mn_sections.json @@ -0,0 +1,209 @@ +{ + "main_type": { + "type": "keyword" + }, + "id": { + "type": "keyword" + }, + "html": { + "type": "text" + }, + "content": { + "type": "text", + "fields": { + "fa": { + "type": "text", + "analyzer": "normal_analyzer_fa", + "search_analyzer": "normal_analyzer_fa", + "search_quote_analyzer": "phrase_analyzer_fa" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_fa", + "search_analyzer": "phrase_analyzer_fa", + "search_quote_analyzer": "phrase_analyzer_fa" + } + } + }, + + "meet_info": { + "properties": { + "id": { + "type": "keyword" + }, + "format": { + "type": "keyword" + }, + "author": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + "term_info": { + "properties": { + "id": { + "type": "keyword" + }, + "format": { + "type": "keyword" + }, + "author": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + "tree_info": { + "properties": { + "parent_id": { + "type": "keyword" + }, + "child_order": { + "type": "double" + }, + "level": { + "type": "integer" + }, + "full_path": { + "type": "text" + }, + "title": { + "type": "text" + }, + "path_headings": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + + "content_len": { + "type": "integer" + }, + "word_len": { + "type": "integer" + }, + + + "tags": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "keywords": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + + "sort_date_timestamp": { + "type": "long" + }, + "nlp_parses": { + "properties": { + "main_type": { + "type": "keyword" + }, + "nlp_type": { + "type": "keyword" + }, + "begin": { + "type": "integer" + }, + "end": { + "type": "integer" + }, + "text": { + "type": "text" + }, + "referes": { + "type": "keyword" + }, + "dependency_infos": { + "type": "nested" + } + } + }, + + "embeddings": { + "type": "dense_vector", + "dims": 768, + "index": true, + "similarity": "cosine" + }, + "file_links": { + "properties": { + "title": {"type": "keyword"}, + "link": {"type": "text"}, + "type": {"type": "text"} + } + }, + + "time_edit": { + "type": "date" + }, + "user_edit": { + "type": "integer" + }, + "user_logs": { + "properties": { + "id": { + "type": "keyword" + }, + "user_id": { + "type": "integer" + }, + "username": { + "type": "keyword" + }, + "time_edit": { + "type": "date" + }, + "property": { + "type": "keyword" + } + } + } +} \ No newline at end of file diff --git a/app/monir/new_schema/mn_term.json b/app/monir/new_schema/mn_term.json new file mode 100644 index 0000000..c48cf02 --- /dev/null +++ b/app/monir/new_schema/mn_term.json @@ -0,0 +1,82 @@ +{ + "id": { + "type": "keyword" + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "content": { + "type": "text", + "fields": { + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian", + "search_analyzer": "phrase_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + } + } + }, + "author": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + + "main_type": { + "type": "keyword" + }, + "begin_date": { + "type": "date" + }, + "end_date": { + "type": "date" + }, + "begin_year": { + "type": "integer" + }, + + "tags": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "keywords": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "format": { + "type": "keyword" + }, + +} \ No newline at end of file diff --git a/app/monir/new_schema/monir.json b/app/monir/new_schema/monir.json new file mode 100644 index 0000000..81ab398 --- /dev/null +++ b/app/monir/new_schema/monir.json @@ -0,0 +1,325 @@ +{ + "id": { + "type": "keyword" + }, + "person_code": { + "type": "keyword" + }, + "research_code": { + "type": "keyword" + }, + "meet_code": { + "type": "keyword" + }, + "old_meet_id": { + "type": "integer" + }, + "Allwords": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "author": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + --"branch": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "meet_no": { + "type": "integer" + }, + "subject": { + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "text", + "fielddata": true, + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + "subtitle": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "tags": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "keywords": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "verb": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "format": { + "type": "text", + "fielddata": true, + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "begin_year": { + "type": "integer", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 20 + } + } + }, + "begin_date": { + "type": "date" + }, + "end_date": { + "type": "date" + }, + "amplify": { + "type": "text" + }, + "ralation": { + "type": "keyword" + }, + "city": { + "type": "keyword" + }, + "place": { + "type": "keyword" + }, + "address": { + "type": "text" + }, + "films": { + "type": "integer" + }, + "sounds": { + "type": "integer" + }, + "photos": { + "type": "integer" + }, + "in_tadvin": { + "type": "boolean" + }, + "video_links": { + "properties": { + "title": {"type": "keyword"}, + "link": {"type": "text"} + } + }, + "sound_links": { + "properties": { + "title": {"type": "keyword"}, + "link": {"type": "text"} + } + }, + "photo_links": { + "properties": { + "title": {"type": "keyword"}, + "link": {"type": "text"} + } + }, + "file_links": { + "properties": { + "title": {"type": "keyword"}, + "link": {"type": "text"}, + "text": {"type": "text"}, + "date": {"type": "date"}, + "in_search": {"type": "boolean"} + } + }, + "audience": { + "type": "text", + "fielddata": true + }, + "attendees": { + "type": "text" + }, + "report_tmp": { + "properties": { + "address": {"type": "integer"}, + "mindex": {"type": "integer"}, + "mintro": {"type": "integer"}, + "sanad_data1": {"type": "integer"}, + "sanad_data2": {"type": "integer"} + } + }, + "mindex": { + "type": "text", + "fields": { + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian", + "search_analyzer": "phrase_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + } + } + }, + "mintro": { + "type": "text", + "fields": { + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian", + "search_analyzer": "phrase_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + } + } + }, + "content": { + "type": "text", + "fields": { + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian", + "search_analyzer": "phrase_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + } + } + }, + "version_info": { + "properties": { + "number" : {"type": "integer"}, + "title": {"type": "keyword"}, + "timestamp": {"type": "long"} + } + }, + "next_page": { + "type": "integer" + }, + "completion" : { + "type" : "completion", + "analyzer" : "simple", + "preserve_separators" : true, + "preserve_position_increments" : true, + "max_input_length" : 50 + }, + "sort_date_timestamp": { + "type": "long" + }, + "permit_tags":{ + "type": "keyword" + }, + "resource_info": { + "type": "text", + "fields": { + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian", + "search_analyzer": "phrase_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + } + } + }, + "user_owner":{ + "type": "integer" + }, + "draft_step":{ + "type": "keyword" + } + } \ No newline at end of file diff --git a/app/monir/readme.md b/app/monir/readme.md new file mode 100644 index 0000000..d9b46c6 --- /dev/null +++ b/app/monir/readme.md @@ -0,0 +1,16 @@ +https://dbdiagram.io/home + +project-name: normalize-db-Farhangestan + +project STEPS: + ----- start sanad + 1- create-flowchart-normalize-db + 2- check- any conflict in merge and unmerge + 3- create new es.index + 4- test data with example + 5- put all data to new es.index + 6- check merge and unmerge + ----- end sanad + + 7- start for steps + \ No newline at end of file diff --git a/app/monir/sanad_exmple1.json b/app/monir/sanad_exmple1.json new file mode 100644 index 0000000..6168e71 --- /dev/null +++ b/app/monir/sanad_exmple1.json @@ -0,0 +1,71 @@ +{ + "_index": "mn_sanad", + "_id": "pm145554", + "_score": 1, + "_source": { + "sort_date_timestamp": 530928000, + "subtitle": "گروه اقتصاد(تشریح نمودار فلسفه منطق)", + "file_links": [ + { + "text": "... string ...\n\n ...", + "link": "/Quick/Download/107434", + "in_search": true, + "title": "سند اولیه (ت. منسومی)" + } + ], + "begin_year": 1365, + "research_code": "001104", + "version_info": { + "timestamp": 1714988336, + "number": 1, + "title": "سند اولیه (بازخوانی)" + }, + "meet_lid": "001104004", + "allwords": "", + "keywords": "", + "permit_tags": "p5", + "person_code": "001", + "id": 5455, + "subject": [], + "city": "نامشخص", + "begin_date": "1986-10-29T00:00:00", + "author": "سید منیر الدین حسینی الهاشمی(ره)", + "ralation": "", + "research_id": 7548, + "mintro": "", + "content": "... string ...\n\n ...", + "branch": "بررسی کلیات روش دسته بندی و تنظیم امور (دوره اول)", + "sound_links": [ + { + "link": "/Quick/Download/276920", + "title": "ضبط ریاست" + }, + { + "link": "/Quick/Download/276921", + "title": "ضبط ریاست" + } + ], + "RowNum": 4679, + "resource_info": "", + "in_tadvin": true, + "end_date": "1986-10-29T00:00:00", + "format": "جلسه علمی", + "mindex": "", + "video_links": [], + "meet_id": 145554, + "films": 0, + "verb": "", + "address": "", + "attendees": "", + "tags": [], + "amplify": "", + "sounds": 2, + "photos": 0, + "meet_no": 4, + "title": "گروه اقتصاد(تشریح نمودار فلسفه منطق)", + "audience": "", + "place": "", + "meet_code": "1365080701", + "photo_links": [] + } +} \ No newline at end of file diff --git a/app/monir/sanad_exmple2.json b/app/monir/sanad_exmple2.json new file mode 100644 index 0000000..5951e2e --- /dev/null +++ b/app/monir/sanad_exmple2.json @@ -0,0 +1,71 @@ +{ + "_index": "mn_sanad", + "_id": "pm145552", + "_score": 1, + "_source": { + "sort_date_timestamp": 529718400, + "subtitle": "گروه اقتصاد", + "file_links": [ + { + "text": "... string ...\n\n ...", + "link": "/Quick/Download/107429", + "in_search": true, + "title": "سند اولیه (ت. منسومی)" + } + ], + "begin_year": 1365, + "research_code": "001104", + "version_info": { + "timestamp": 1714988321, + "number": 1, + "title": "سند اولیه (بازخوانی)" + }, + "meet_lid": "001104002", + "allwords": "", + "keywords": "", + "permit_tags": "p5", + "person_code": "001", + "id": 5453, + "subject": [], + "city": "نامشخص", + "begin_date": "1986-10-15T00:00:00", + "author": "سید منیر الدین حسینی الهاشمی(ره)", + "ralation": "", + "research_id": 7548, + "mintro": "", + "content": "... string ...\n\n ...", + "branch": "بررسی کلیات روش دسته بندی و تنظیم امور (دوره اول)", + "sound_links": [ + { + "link": "/Quick/Download/276917", + "title": "ضبط ریاست" + }, + { + "link": "/Quick/Download/276916", + "title": "ضبط ریاست" + } + ], + "RowNum": 4677, + "resource_info": "", + "in_tadvin": true, + "end_date": "1986-10-15T00:00:00", + "format": "جلسه علمی", + "mindex": "", + "video_links": [], + "meet_id": 145552, + "films": 0, + "verb": "", + "address": "", + "attendees": "", + "tags": [], + "amplify": "", + "sounds": 2, + "photos": 0, + "meet_no": 2, + "title": "گروه اقتصاد", + "audience": "", + "place": "", + "meet_code": "1365072301", + "photo_links": [] + } +} \ No newline at end of file diff --git a/app/monir/sanad_old_schema.json b/app/monir/sanad_old_schema.json new file mode 100644 index 0000000..f04fe47 --- /dev/null +++ b/app/monir/sanad_old_schema.json @@ -0,0 +1,462 @@ +{ + "date_detection": false, + "properties": { + "Allwords": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "RowNum": { + "type": "long" + }, + "address": { + "type": "text" + }, + "allwords": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "amplify": { + "type": "text" + }, + "attendees": { + "type": "text" + }, + "audience": { + "type": "text", + "fielddata": true + }, + "audio_links": { + "properties": { + "link": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + "author": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "begin_date": { + "type": "date" + }, + "begin_year": { + "type": "integer", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 20 + } + } + }, + "branch": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "city": { + "type": "keyword" + }, + "completion": { + "type": "completion", + "analyzer": "simple", + "preserve_separators": true, + "preserve_position_increments": true, + "max_input_length": 50 + }, + "content": { + "type": "text", + "fields": { + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian" + } + } + }, + "date_edit": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "draft_step": { + "type": "keyword" + }, + "end_date": { + "type": "date" + }, + "file_links": { + "properties": { + "date": { + "type": "date" + }, + "in_search": { + "type": "boolean" + }, + "link": { + "type": "text" + }, + "text": { + "type": "text" + }, + "title": { + "type": "keyword" + } + } + }, + "films": { + "type": "integer" + }, + "format": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + }, + "fielddata": true + }, + "id": { + "type": "keyword" + }, + "in_tadvin": { + "type": "boolean" + }, + "keywords": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "meet_code": { + "type": "keyword" + }, + "meet_id": { + "type": "long" + }, + "meet_lid": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "meet_no": { + "type": "integer" + }, + "mindex": { + "type": "text", + "fields": { + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian" + } + } + }, + "mintro": { + "type": "text", + "fields": { + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian" + } + } + }, + "next_page": { + "type": "integer" + }, + "old_meet_id": { + "type": "integer" + }, + "permit_tags": { + "type": "keyword" + }, + "person_code": { + "type": "keyword" + }, + "photo_links": { + "properties": { + "link": { + "type": "text" + }, + "title": { + "type": "keyword" + } + } + }, + "photos": { + "type": "integer" + }, + "place": { + "type": "keyword" + }, + "province": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "ralation": { + "type": "keyword" + }, + "report_tmp": { + "properties": { + "address": { + "type": "integer" + }, + "mindex": { + "type": "integer" + }, + "mintro": { + "type": "integer" + }, + "sanad_data1": { + "type": "integer" + }, + "sanad_data2": { + "type": "integer" + } + } + }, + "research_code": { + "type": "keyword" + }, + "research_id": { + "type": "long" + }, + "resource_info": { + "type": "text", + "fields": { + "ar": { + "type": "text", + "analyzer": "normal_analyzer_arabic", + "search_analyzer": "normal_analyzer_arabic", + "search_quote_analyzer": "phrase_analyzer_arabic" + }, + "fa": { + "type": "text", + "analyzer": "normal_analyzer_persian", + "search_analyzer": "normal_analyzer_persian", + "search_quote_analyzer": "phrase_analyzer_persian" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_persian" + } + } + }, + "sort_date_timestamp": { + "type": "long" + }, + "sound_links": { + "properties": { + "link": { + "type": "text" + }, + "title": { + "type": "keyword" + } + } + }, + "sounds": { + "type": "integer" + }, + "subject": { + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + }, + "fielddata": true + } + } + }, + "subtitle": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "tags": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "time_edit": { + "type": "long" + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "user_edit": { + "type": "long" + }, + "user_log": { + "properties": { + "property": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "time_edit": { + "type": "long" + }, + "user_id": { + "type": "long" + }, + "username": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + } + } + }, + "user_owner": { + "type": "integer" + }, + "verb": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "version_info": { + "properties": { + "number": { + "type": "integer" + }, + "timestamp": { + "type": "long" + }, + "title": { + "type": "keyword" + } + } + }, + "version_number": { + "type": "long" + }, + "video_links": { + "properties": { + "link": { + "type": "text" + }, + "title": { + "type": "keyword" + } + } + } + } +} \ No newline at end of file diff --git a/app/monir/sanad_stuff.py b/app/monir/sanad_stuff.py new file mode 100644 index 0000000..e69de29 diff --git a/app/monir/steps_old_schema.json b/app/monir/steps_old_schema.json new file mode 100644 index 0000000..f94b8f9 --- /dev/null +++ b/app/monir/steps_old_schema.json @@ -0,0 +1,78 @@ +{ + "date_detection": false, + "properties": { + "attachment": { + "properties": { + "description": { + "type": "text" + }, + "link": { + "type": "keyword" + }, + "type": { + "type": "keyword" + } + } + }, + "data": { + "type": "text", + "fields": { + "fa": { + "type": "text", + "analyzer": "normal_analyzer_fa", + "search_analyzer": "normal_analyzer_fa", + "search_quote_analyzer": "phrase_analyzer_fa" + }, + "ph": { + "type": "text", + "analyzer": "phrase_analyzer_fa" + } + } + }, + "data_type": { + "type": "keyword" + }, + "description": { + "type": "text" + }, + "entity_type": { + "type": "keyword" + }, + "history_number": { + "type": "integer" + }, + "ref_id": { + "type": "keyword" + }, + "ref_key": { + "type": "keyword" + }, + "ref_property": { + "type": "keyword" + }, + "second_id": { + "type": "keyword" + }, + "time_edit": { + "type": "date" + }, + "title": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "user_id": { + "type": "integer" + }, + "username": { + "type": "keyword" + }, + "version_number": { + "type": "long" + } + } +} \ No newline at end of file