I have a JSON database with 27k+ entries, and I'm using fuse.js to search through them. Each entry has about 500 characters of text in it.
When I search for something with 15+ characters, it takes a few seconds, and even more can slow the server to a halt while it processes it.
e.g. 1 results for 'crunchy munchy cheeeese' found in about 3.40 seconds.
var search = new Fuse(db.sites, {
keys: ['t', 'dc','kw'], // Title, description and keywords
threshold:0.4,
minMatchCharLength:3
})
setInterval(() => {
search.setCollection(db.sites) // Update the documents to the latest ones
}, 120000);
Any help on how to make this faster?