diff options
Diffstat (limited to 'src/static/js')
-rw-r--r-- | src/static/js/search-worker.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/static/js/search-worker.js b/src/static/js/search-worker.js index 166be2a2..0b3c8cc5 100644 --- a/src/static/js/search-worker.js +++ b/src/static/js/search-worker.js @@ -1,4 +1,4 @@ -import {makeSearchIndexes} from '../shared-util/searchSchema.js'; +import {makeSearchIndex, searchSpec} from '../shared-util/search-spec.js'; import {withEntries} from '../shared-util/sugar.js'; import FlexSearch from '../lib/flexsearch/flexsearch.bundle.module.min.js'; @@ -21,7 +21,11 @@ main().then( async function main() { indexes = - makeSearchIndexes(FlexSearch); + withEntries(searchSpec, entries => entries + .map(([key, descriptor]) => [ + key, + makeSearchIndex(descriptor, {FlexSearch}), + ])); searchData = await fetch('/search-data/index.json') |