UPDATE: rolled back search bar algorithm for now
This commit is contained in:
@@ -24,7 +24,7 @@ def search_results():
|
||||
SELECT bm25(category_fts) AS score, c.category_id, c.category_name
|
||||
FROM categories AS c
|
||||
INNER JOIN category_fts AS f ON c.category_id = f.category_id
|
||||
WHERE f.category_name LIKE ? || '%'
|
||||
WHERE f.category_name LIKE '%' || ? || '%'
|
||||
ORDER BY score ASC
|
||||
LIMIT 3;
|
||||
""", (query,))
|
||||
@@ -34,7 +34,7 @@ def search_results():
|
||||
SELECT bm25(user_fts) AS score, u.user_id, u.username, u.is_live
|
||||
FROM users AS u
|
||||
INNER JOIN user_fts AS f ON u.user_id = f.user_id
|
||||
WHERE f.username LIKE ? || '%'
|
||||
WHERE f.username LIKE '%' || ? || '%'
|
||||
ORDER BY score ASC
|
||||
LIMIT 3;
|
||||
""", (query,))
|
||||
@@ -46,7 +46,7 @@ def search_results():
|
||||
INNER JOIN stream_fts AS f ON s.user_id = f.user_id
|
||||
INNER JOIN users AS u ON s.user_id = u.user_id
|
||||
INNER JOIN categories AS c ON s.category_id = c.category_id
|
||||
WHERE f.title LIKE ? || '%'
|
||||
WHERE f.title LIKE '%' || ? || '%'
|
||||
ORDER BY score ASC
|
||||
LIMIT 3;
|
||||
""", (query,))
|
||||
|
||||
Reference in New Issue
Block a user