Strip @ prefix subquery #170

Merged
tiger5226 merged 1 commit from strip_prefex into master 2019-11-20 22:14:05 +01:00

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,