mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-03 04:10:43 +00:00
Fix KeyError: static_boostring_score (#507)
This commit is contained in:
parent
53fe63680f
commit
eefab3dc1e
@ -148,7 +148,14 @@ class ElasticSearchIndex():
|
||||
def update_dataset(self, last_unixtime=None):
|
||||
if last_unixtime:
|
||||
sql = """
|
||||
SELECT * FROM dict_dataset WHERE from_unixtime(modified_time) >= DATE_SUB(from_unixtime(%f), INTERVAL 1 HOUR)
|
||||
SELECT d.*,
|
||||
COALESCE(s.static_boosting_score,1) as static_boosting_score
|
||||
FROM dict_dataset d
|
||||
LEFT JOIN cfg_search_score_boost s
|
||||
ON d.id = s.id
|
||||
WHERE d.urn not like "hive:///dev_foundation_tables%%"
|
||||
and d.urn not like "hive:///dev_foundation_views%%"
|
||||
and from_unixtime(d.modified_time) >= DATE_SUB(from_unixtime(%f), INTERVAL 1 HOUR)
|
||||
""" % last_unixtime
|
||||
else:
|
||||
sql = """
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user