Browse Source

数据时效性-修改

jialuyao 5 days ago
parent
commit
804f5116db
1 changed files with 9 additions and 4 deletions
  1. 9 4
      tools/联通项目/extract_site_es.py

+ 9 - 4
tools/联通项目/extract_site_es.py

@@ -8,7 +8,11 @@ from tqdm import tqdm  # 进度条库
 urllib3.disable_warnings()
 timeout = 180
 # 连接配置
-es_host = "http://127.0.0.1:19800"
+# es_host = "http://127.0.0.1:19800"
+# es_username = "jianyuGr"
+# es_password = "we3g8glKfe#"
+
+es_host = "http://127.0.0.1:19905"
 es_username = "jianyuGr"
 es_password = "we3g8glKfe#"
 
@@ -24,11 +28,11 @@ def query_time_range_data():
         query = {
             "query": {
                 "range": {
-                    "publishtime": {
+                    "comeintime": {
                         # "gte": 1752422400,
                         # "lte": 1753027199
                         "gte": 1751299200,
-                        "lte": 1753372800
+                        "lte": 1753718400
                     }
                 }
             },
@@ -38,7 +42,8 @@ def query_time_range_data():
 
         # 初始化Scroll
         resp = es.search(
-            index="bidding_v1",
+            # index="bidding_v1",
+            index="biddingall",
             scroll='2m',  # 保持scroll上下文2分钟
             body=query
         )