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
|
const funcScoreClaimWeight = { // 100 LBC adds 1 point to the score
|
||||||
'function_score': {
|
'function_score': {
|
||||||
'script_score': {
|
'field_value_factor': {
|
||||||
'script': {
|
'field' : 'effective_amount',
|
||||||
'source': `${effectiveFactor} * doc['effective_amount'].value`,
|
'factor' : effectiveFactor,
|
||||||
},
|
'missing': 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const funcScoreChannelWeight = { // 100 LBC adds 1 point to the score
|
const funcScoreChannelWeight = { // 100 LBC adds 1 point to the score
|
||||||
'function_score': {
|
'function_score': {
|
||||||
'script_score': {
|
'field_value_factor': {
|
||||||
'script': {
|
'field' : 'certificate_amount',
|
||||||
'source': `${effectiveFactor} * doc['certificate_amount'].value`,
|
'factor' : effectiveFactor,
|
||||||
},
|
'missing': 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue