From 804e0809a134add74dda19acc3cefbe57056c9a4 Mon Sep 17 00:00:00 2001 From: Chad Yates Date: Mon, 29 Apr 2024 00:01:25 -0700 Subject: [PATCH] Fix issue with @codebase provider when n becomes odd due to a divide by 2 during the full text search portion of the query. (#1204) --- core/indexing/FullTextSearch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/indexing/FullTextSearch.ts b/core/indexing/FullTextSearch.ts index ab82fc926..4195cdf5c 100644 --- a/core/indexing/FullTextSearch.ts +++ b/core/indexing/FullTextSearch.ts @@ -121,7 +121,7 @@ export class FullTextSearchCodebaseIndex implements CodebaseIndex { let results = await db.all(query, [ ...tagStrings, ...(filterPaths || []), - n, + Math.ceil(n), ]); results = results.filter((result) => result.rank <= bm25Threshold);