added channel effective amount to the claim weight.
This commit is contained in:
parent
81986315cb
commit
101e55d924
2 changed files with 13 additions and 2 deletions
server/controllers
|
@ -63,7 +63,7 @@ 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': {
|
||||
|
@ -72,6 +72,15 @@ function getResults (input) {
|
|||
},
|
||||
},
|
||||
};
|
||||
const funcScoreChannelWeight = { // 100 LBC adds 1 point to the score
|
||||
'function_score': {
|
||||
'script_score': {
|
||||
'script': {
|
||||
'source': `${effectiveFactor} * doc['certificate_amount'].value`,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
const matPhraseName = { // Match search text as phrase - Name
|
||||
'match_phrase': {
|
||||
'name': {
|
||||
|
@ -176,7 +185,8 @@ function getResults (input) {
|
|||
'bool': {
|
||||
'should': [
|
||||
conBoost,
|
||||
funcScore,
|
||||
funcScoreClaimWeight,
|
||||
funcScoreChannelWeight,
|
||||
],
|
||||
'must': [
|
||||
channelSearch,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue