fixup the indexing
This commit is contained in:
parent
de3fa4b1bc
commit
7cd0443f9c
|
@ -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)
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue