Weight search to favour document title
This commit is contained in:
parent
e331e4ce97
commit
c5e2140738
19
search.js
19
search.js
@ -4,7 +4,24 @@ const TAGS = "tags"
|
|||||||
const TITLE = "title"
|
const TITLE = "title"
|
||||||
|
|
||||||
const fuse = new Fuse(data, {
|
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
|
includeMatches: true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user