diff options
| author | Mirek Kratochvil <miroslav.kratochvil@uni.lu> | 2023-10-19 14:01:25 +0200 |
|---|---|---|
| committer | Mirek Kratochvil <miroslav.kratochvil@uni.lu> | 2023-10-19 14:01:25 +0200 |
| commit | 7cd0443f9cf34a5278fa5bb90a5ca9bfce425890 (patch) | |
| tree | c5d8cbb223b9dc5fbe1369a6e85726a34ea43f3b | |
| parent | de3fa4b1bc16d27c9184abaef566d1874deeb136 (diff) | |
| download | reploy-7cd0443f9cf34a5278fa5bb90a5ca9bfce425890.tar.gz reploy-7cd0443f9cf34a5278fa5bb90a5ca9bfce425890.tar.bz2 | |
fixup the indexing
| -rw-r--r-- | scripts/make-search-index.js | 8 |
1 files 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) }) |
