Commit 7f816745 by 黄静

hj

parent 74d1467e
......@@ -2,12 +2,12 @@ from DBUtils.PooledDB import PooledDB
import pymysql,json
from flask import request
# MYSQL_HOST = '47.95.76.74' # 外网地址
# PORT = 3306 # 外网端口
# USER = 'root'
# PASSWORD = 'Gongsibao2018'
# DB = 'ent_data'
# pool = PooledDB(pymysql, 8, host=MYSQL_HOST, user=USER, passwd=PASSWORD, db=DB, port=PORT)
MYSQL_HOST = '47.95.76.74' # 外网地址
PORT = 3306 # 外网端口
USER = 'root'
PASSWORD = 'Gongsibao2018'
DB = 'ent_data'
pool = PooledDB(pymysql, 8, host=MYSQL_HOST, user=USER, passwd=PASSWORD, db=DB, port=PORT)
"""检索类别英文名字"""
def select_label(lable_type):
......
......@@ -224,7 +224,7 @@ class HX:
querybody['query']['bool']['must'].append(dsl)
print('查询语法:', querybody)
searched = self.es.search(index=self.index_name, doc_type=self.index_type, body=querybody, request_timeout=1000)
searched = self.es.search(index=self.index_name, doc_type=self.index_type, body=querybody)
company_hx_list = []
if (searched["hits"]["total"] > 0):
for row in searched["hits"]["hits"]:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment