3
0
dongzhaorui 2 жил өмнө
parent
commit
42686de0ac

+ 2 - 3
A数据处理/sync_data/send_data.py

@@ -81,7 +81,7 @@ mongodb = mcli[MONGO_DB]
 
 # es
 ES_HOST = "172.17.145.178"
-ES_PORT = 9800
+ES_PORT = 9200
 ES_INDEX = "biddingall"
 ecli = Elasticsearch([{"host": ES_HOST, "port": ES_PORT}])
 
@@ -144,8 +144,7 @@ def es_query(title, publish_time):
         }
     }
     result = ecli.search(body=query, index=ES_INDEX, request_timeout=100)
-    total = int(result["hits"]["total"])  # es1.x版本(即将废弃)
-    # total = int(result["hits"]["total"]['value']) # es7.x版本(等待切换)
+    total = int(result["hits"]["total"]['value']) # es7.x版本(等待切换)
     return total