Converted script scores to field_value_factor scores. This allows for a missing parameter to avoid the errors.
This commit is contained in:
parent
101e55d924
commit
31f47fea76
1 changed files with 8 additions and 8 deletions
|
@ -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,
|
||||
},
|
||||
},
|
||||
};
|
||||
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,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue