Create index for fuse
This commit is contained in:
parent
f2cc16341d
commit
7f8445b138
|
@ -7,7 +7,9 @@ function createTitleSearch() {
|
||||||
const options = {
|
const options = {
|
||||||
keys: ['title'],
|
keys: ['title'],
|
||||||
}
|
}
|
||||||
let fuse = new Fuse(documents, options)
|
|
||||||
|
const fuseIndex = Fuse.createIndex(options.keys, documents)
|
||||||
|
let fuse = new Fuse(documents, options, fuseIndex)
|
||||||
|
|
||||||
resolve({
|
resolve({
|
||||||
documents,
|
documents,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user