Explorar o código

update:es1.x 切换 ex7.x 做准备

dongzhaorui %!s(int64=2) %!d(string=hai) anos
pai
achega
1ddee68bcf
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      A数据处理/sync_data/send_data.py

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

@@ -144,7 +144,8 @@ def es_query(title, publish_time):
         }
     }
     result = ecli.search(body=query, index=ES_INDEX, request_timeout=100)
-    total = int(result["hits"]["total"])
+    total = int(result["hits"]["total"])  # es1.x版本(即将废弃)
+    # total = int(result["hits"]["total"]['value']) # es7.x版本(等待切换)
     return total