Patched search results
Publish Library / Build NPM Project (push) Successful in 3m16s
Publish Library / Tag Version (push) Successful in 19s

This commit is contained in:
2026-09-20 20:29:28 -04:00
parent e12c3e3cc6
commit 0a7e87f6b7
3 changed files with 18 additions and 25 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ export function rerank(hits, termList) {
const title = fieldScore(hit.title, termList, {fuzzy: true});
const summary = fieldScore(hit.summary, termList);
const titleLower = (hit.title || '').toLowerCase();
const summaryLower = (hit.summary || '').toLowerCase();
const summaryLower = (hit.summary?._text || '').toLowerCase();
const phrase = termList.join(' ').toLowerCase();
const titleExactPhrase = titleLower.includes(phrase) ? 1 : 0;