From 44987923fcf0db564042452366d9750aee656a4a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 18 May 2024 20:49:03 -0300 Subject: search: try a "kind" field --- src/static/js/search-worker.js | 5 +++++ src/util/search-spec.js | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'src') 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', -- cgit 1.3.0-6-gf8a5