Strip @ prefix subquery

Signed-off-by: Mark Beamer Jr <markbeamerjr@gmail.com>
This commit is contained in:
Mark Beamer Jr 2019-09-22 01:56:36 -04:00
parent 4b88db1f55
commit e7c97e8420
No known key found for this signature in database
GPG key ID: 1C314FB89AD76973

View file

@ -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,