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 committed by Jeremy Kauffman
parent 34df58e967
commit 5c68e32abb

View file

@ -98,6 +98,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 = [];
@ -271,6 +279,7 @@ function getResults (input) {
conBoost,
funcScoreClaimWeight,
funcScoreChannelWeight,
channelIdentifier,
],
'must': [
...dynamicFilters(),