From 9c930d17b1f6c012e38a0e166cac98250f9cb2fb Mon Sep 17 00:00:00 2001 From: Syfaro Date: Sun, 26 Jan 2020 22:52:57 -0600 Subject: [PATCH] Workaround for BKtree. --- src/models.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/models.rs b/src/models.rs index 7259f7e..38320bb 100644 --- a/src/models.rs +++ b/src/models.rs @@ -132,7 +132,8 @@ pub fn image_query_sync( FROM tweet_media WHERE tweet_media.tweet_id = hashes.twitter_id AND - tweet_media.hash = hashes.hash + tweet_media.hash <@ (hashes.hash, 0) + LIMIT 1 ) tm ON hashes.twitter_id IS NOT NULL WHERE {}", hash_where_clause);