« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/static/js/search-worker.js5
-rw-r--r--src/util/search-spec.js4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/static/js/search-worker.js b/src/static/js/search-worker.js
index e79b5d66..44af94fd 100644
--- a/src/static/js/search-worker.js
+++ b/src/static/js/search-worker.js
@@ -385,6 +385,11 @@ function queryGenericIndex(index, query, options) {
   const interestingFieldCombinations = [
     ['primaryName', 'contributors', 'groups'],
     ['primaryName', 'groups'],
+    ['kind', 'contributors', 'primaryName'],
+    ['kind', 'contributors', 'groups'],
+    ['kind', 'groups', 'primaryName'],
+    ['kind', 'groups'],
+    ['kind', 'contributors'],
     ['contributors', 'groups'],
     ['primaryName', 'contributors'],
     ['primaryName'],
diff --git a/src/util/search-spec.js b/src/util/search-spec.js
index 4a112a22..a990d022 100644
--- a/src/util/search-spec.js
+++ b/src/util/search-spec.js
@@ -112,6 +112,9 @@ export const searchSpec = {
     process(thing, opts) {
       const fields = {};
 
+      fields.kind =
+        thing.constructor[Symbol.for('Thing.referenceType')];
+
       fields.primaryName =
         thing.name;
 
@@ -168,6 +171,7 @@ export const searchSpec = {
     },
 
     index: [
+      'kind',
       'primaryName',
       'additionalNames',
       'contributors',