Skip to content

Commit bf7a6c3

Browse files
authored
[docs] fix flexsearch usage (#7220)
1 parent 5a4841d commit bf7a6c3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sites/kit.svelte.dev/src/lib/search/search.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ export function init(blocks) {
1717
// we have multiple indexes, so we can rank sections (migration guide comes last)
1818
const max_rank = Math.max(...blocks.map((block) => block.rank ?? 0));
1919

20-
indexes = Array.from(
21-
{ length: max_rank + 1 },
22-
() => new flexsearch.Index({ tokenize: 'forward' })
23-
);
20+
indexes = Array.from({ length: max_rank + 1 }, () => new flexsearch({ tokenize: 'forward' }));
2421

2522
for (const block of blocks) {
2623
const title = block.breadcrumbs[block.breadcrumbs.length - 1];

0 commit comments

Comments
 (0)