Use full text search instead of ilike for search functionality

This commit is contained in:
thiloho
2024-08-14 21:37:19 +02:00
parent 0e3fb96dda
commit 3eb05da564
5 changed files with 90 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ export const load: PageServerLoad = async ({ fetch, cookies, url }) => {
const baseFetchUrl = `${API_BASE_PREFIX}/website`;
if (searchQuery) {
params.append("title", `ilike.*${searchQuery}*`);
params.append("title_search", `wfts(english).${searchQuery}`);
}
switch (sortBy) {