diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/searchSchema.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util/searchSchema.js b/src/util/searchSchema.js index d4e1a8c0..dffd1c1f 100644 --- a/src/util/searchSchema.js +++ b/src/util/searchSchema.js @@ -1,10 +1,11 @@ // Index structures shared by client and server. -export function makeSearchIndexes(FlexSearch) { - const doc = config => +export function makeSearchIndexes(FlexSearch, documentOptions = {}) { + const doc = documentSchema => new FlexSearch.Document({ id: 'reference', - ...config, + ...documentOptions, + ...documentSchema, }); const indexes = { |