Revert "added channel effective amount to the claim weight." #147
2 changed files with 6 additions and 17 deletions
|
@ -63,22 +63,13 @@ function getResults (input) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const funcScoreClaimWeight = { // 100 LBC adds 1 point to the score
|
const funcScore = { // 100 LBC adds 1 point to the score
|
||||||
'function_score': {
|
'function_score': {
|
||||||
'field_value_factor': {
|
'script_score': {
|
||||||
'field' : 'effective_amount',
|
'script': {
|
||||||
'factor' : effectiveFactor,
|
'source': `${effectiveFactor} * doc['effective_amount'].value`,
|
||||||
'missing': 1,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
|
||||||
const funcScoreChannelWeight = { // 100 LBC adds 1 point to the score
|
|
||||||
'function_score': {
|
|
||||||
'field_value_factor': {
|
|
||||||
'field' : 'certificate_amount',
|
|
||||||
'factor' : effectiveFactor,
|
|
||||||
'missing': 1,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const matPhraseName = { // Match search text as phrase - Name
|
const matPhraseName = { // Match search text as phrase - Name
|
||||||
|
@ -185,8 +176,7 @@ function getResults (input) {
|
||||||
'bool': {
|
'bool': {
|
||||||
'should': [
|
'should': [
|
||||||
conBoost,
|
conBoost,
|
||||||
funcScoreClaimWeight,
|
funcScore,
|
||||||
funcScoreChannelWeight,
|
|
||||||
],
|
],
|
||||||
'must': [
|
'must': [
|
||||||
channelSearch,
|
channelSearch,
|
||||||
|
|
|
@ -172,7 +172,6 @@ function getClaimsSince (time, lastID, MaxClaimsInCall) {
|
||||||
`p.name as channel,` +
|
`p.name as channel,` +
|
||||||
`c.bid_state,` +
|
`c.bid_state,` +
|
||||||
`c.effective_amount,` +
|
`c.effective_amount,` +
|
||||||
`COALESCE(p.effective_amount,0.0) as certificate_amount,` +
|
|
||||||
`c.claim_id as claimId,` +
|
`c.claim_id as claimId,` +
|
||||||
`c.value_as_json as value ` +
|
`c.value_as_json as value ` +
|
||||||
`FROM claim c ` +
|
`FROM claim c ` +
|
||||||
|
|
Loading…
Reference in a new issue