dongzhaorui 3 éve
szülő
commit
14915cc935
1 módosított fájl, 2 hozzáadás és 4 törlés
  1. 2 4
      find_source/common/databases.py

+ 2 - 4
find_source/common/databases.py

@@ -111,9 +111,7 @@ def es_query(title: str, publish_time: int):
                 "fields": ["title"]
                 "fields": ["title"]
             }
             }
         })
         })
-    conditions.append({
-        "range": {"publishtime": {"from": stime, "to": etime}}
-    })
+    conditions.append({"range": {"publishtime": {"from": stime, "to": etime}}})
     query = {
     query = {
         "query": {
         "query": {
             "bool": {
             "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'])
     count = len(result['hits']['hits'])
     return count
     return count