dongzhaorui 3 жил өмнө
parent
commit
14915cc935

+ 2 - 4
find_source/common/databases.py

@@ -111,9 +111,7 @@ def es_query(title: str, publish_time: int):
                 "fields": ["title"]
             }
         })
-    conditions.append({
-        "range": {"publishtime": {"from": stime, "to": etime}}
-    })
+    conditions.append({"range": {"publishtime": {"from": stime, "to": etime}}})
     query = {
         "query": {
             "bool": {
@@ -122,7 +120,7 @@ def es_query(title: str, publish_time: int):
             }
         }
     }
-    result = client.search(index='bidding', body=query, request_timeout=100)
+    result = client.search(index=es_conf['db'], body=query, request_timeout=100)
     count = len(result['hits']['hits'])
     return count