Added reverted changes back in

This commit is contained in:
Mark Beamer Jr 2019-02-26 08:50:26 -05:00
parent 525da56606
commit 5a9ce272b9
No known key found for this signature in database
GPG key ID: 1C314FB89AD76973
2 changed files with 18 additions and 6 deletions
server/controllers

View file

@ -63,12 +63,21 @@ function getResults (input) {
},
},
};
const funcScore = { // 100 LBC adds 1 point to the score
const funcScoreClaimWeight = { // 100 LBC adds 1 point to the score
'function_score': {
'script_score': {
'script': {
'source': `${effectiveFactor} * doc['effective_amount'].value`,
},
'field_value_factor': {
'field' : 'effective_amount',
'factor' : effectiveFactor,
'missing': 1,
},
},
};
const funcScoreChannelWeight = { // 100 LBC adds 1 point to the score
'function_score': {
'field_value_factor': {
'field' : 'certificate_amount',
'factor' : effectiveFactor,
'missing': 1,
},
},
};
@ -176,7 +185,8 @@ function getResults (input) {
'bool': {
'should': [
conBoost,
funcScore,
funcScoreClaimWeight,
funcScoreChannelWeight,
],
'must': [
channelSearch,