tweak fuse opts

-rm default opts,
- add ignoreLocation (to search everywhere not just 1st 60 chars)
- ref https://fusejs.io/concepts/scoring-theory.html#scoring-theory
This commit is contained in:
Aditya Telange 2021-01-30 11:56:09 +05:30
parent 624b1d0afb
commit f64c44c8d2
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -14,12 +14,9 @@ function loadSearch() {
if (data) { if (data) {
// fuse.js options; check fuse.js website for details // fuse.js options; check fuse.js website for details
var options = { var options = {
isCaseSensitive: false,
shouldSort: true,
location: 0,
distance: 100, distance: 100,
threshold: 0.4, threshold: 0.4,
minMatchCharLength: 0, ignoreLocation: true,
keys: [ keys: [
'title', 'title',
'permalink', 'permalink',