added channel effective amount to the claim weight. #141

Merged
tiger5226 merged 2 commits from add_channel_weight into master 2019-02-25 03:52:38 +01:00
Showing only changes of commit 31f47fea76 - Show all commits

View file

@ -65,19 +65,19 @@ function getResults (input) {
};
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,
nikooo777 commented 2019-02-13 13:37:26 +01:00 (Migrated from github.com)
Review

are you sure this works? I'd expect it to be

          'source': `${effectiveFactor * doc['certificate_amount'].value}`,

(and same above)

are you sure this works? I'd expect it to be ```suggestion 'source': `${effectiveFactor * doc['certificate_amount'].value}`, ``` (and same above)
},
},
};
const funcScoreChannelWeight = { // 100 LBC adds 1 point to the score
'function_score': {
'script_score': {
'script': {
'source': `${effectiveFactor} * doc['certificate_amount'].value`,
},
'field_value_factor': {
'field' : 'certificate_amount',
'factor' : effectiveFactor,
'missing': 1,
},
},
};