« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/util/searchSchema.js7
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 = {