From 2f10b3e76a44422ecbba4503bb8d9fbaeb66d7f2 Mon Sep 17 00:00:00 2001 From: Mansive <33560917+Mansive@users.noreply.github.com> Date: Sun, 7 Jan 2024 01:20:48 -0600 Subject: [PATCH] Enable prefix phrase search, adjust max results --- src/app/api/search/route.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/api/search/route.tsx b/src/app/api/search/route.tsx index 1aebbc8..31ef348 100644 --- a/src/app/api/search/route.tsx +++ b/src/app/api/search/route.tsx @@ -19,8 +19,9 @@ export async function GET(request: NextRequest) { try { const results = await xata.db.Books.search(searchParams, { target: ["title"], + prefix: "phrase", fuzziness: 0, - page: { size: 50, offset: 0 }, + page: { size: 35, offset: 0 }, }); // Pasted from Copilot; could probably be done better