Create index for fuse

This commit is contained in:
Peter Stuifzand 2020-05-31 22:22:09 +02:00
parent f2cc16341d
commit 7f8445b138

View File

@ -7,7 +7,9 @@ function createTitleSearch() {
const options = {
keys: ['title'],
}
let fuse = new Fuse(documents, options)
const fuseIndex = Fuse.createIndex(options.keys, documents)
let fuse = new Fuse(documents, options, fuseIndex)
resolve({
documents,