diff --git a/server/controllers/lighthouse.js b/server/controllers/lighthouse.js index 15cf059..d564184 100644 --- a/server/controllers/lighthouse.js +++ b/server/controllers/lighthouse.js @@ -80,6 +80,14 @@ function getResults (input) { }, }, }; + // Try prefix query without an @ if it exists + const channelIdentifier = { + 'prefix': { + 'name': { + 'value': escapedQuery.replace(/^@/gi, ''), 'boost': 50, + }, + }, + }; const splitName = () => { let queries = []; @@ -253,6 +261,7 @@ function getResults (input) { conBoost, funcScoreClaimWeight, funcScoreChannelWeight, + channelIdentifier, ], 'must': [ channelSearch,