Skip to content

Commit

Permalink
tweak fuse opts
Browse files Browse the repository at this point in the history
-rm default opts,
- add ignoreLocation (to search everywhere not just 1st 60 chars)
- ref https://fusejs.io/concepts/scoring-theory.html#scoring-theory
  • Loading branch information
adityatelange committed Jan 30, 2021
1 parent 624b1d0 commit f64c44c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions assets/js/fastsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ function loadSearch() {
if (data) {
// fuse.js options; check fuse.js website for details
var options = {
isCaseSensitive: false,
shouldSort: true,
location: 0,
distance: 100,
threshold: 0.4,
minMatchCharLength: 0,
ignoreLocation: true,
keys: [
'title',
'permalink',
Expand Down

0 comments on commit f64c44c

Please sign in to comment.