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)

This commit is contained in:
Chad Yates 2024-04-29 00:01:25 -07:00 • committed by GitHub
parent 80bc83b878
commit 804e0809a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);