瀏覽代碼

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

dongzhaorui 2 年之前
父節點
當前提交
1ddee68bcf
共有 1 個文件被更改,包括 2 次插入1 次删除
  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)
     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
     return total