From 7cd0443f9cf34a5278fa5bb90a5ca9bfce425890 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Thu, 19 Oct 2023 14:01:25 +0200 Subject: [PATCH] fixup the indexing --- scripts/make-search-index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/make-search-index.js b/scripts/make-search-index.js index 38ed214..4bf8aa8 100644 --- a/scripts/make-search-index.js +++ b/scripts/make-search-index.js @@ -44,13 +44,13 @@ lunr.tokenizer.separator = /(\p{P}|\p{S}|\p{Z}|\p{C})+/u var idx = lunr(function () { this.ref('link') - this.field('name', {boost: 9}) - this.field('tag', {boost: 3}) + this.field('name', {boost: 50}) + this.field('tag', {boost: 10}) this.field('text') documents.forEach(function (doc) { - const {link, title, text, tags} = doc; - this.add({link, title, text, tag:tags.map(x => x.join(" ")).join("\n")}) + const {link, name, text, tags} = doc; + this.add({link, name, text, tag:tags.map(x => x.join(" ")).join("\n")}) }, this) })