Weight search to favour document title

This commit is contained in:
Akbar Rahman 2021-11-17 14:44:11 +00:00
parent e331e4ce97
commit c5e2140738
Signed by: alvierahman90
GPG Key ID: 20609519444A1269

View File

@ -4,7 +4,24 @@ const TAGS = "tags"
const TITLE = "title"
const fuse = new Fuse(data, {
keys: [ HEADERS, PATH, TAGS, TITLE ],
keys: [
{
name: HEADERS,
weight: 1
},
{
name: PATH,
weight: 1
},
{
name: TAGS,
weight: 1
},
{
name: TITLE,
weight: 1.5
}
],
includeMatches: true
})