generated from ztimson/template
Patched search results
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user