Added back #81
Added back: Updated search query to include controlling and effective amount weights. Also made sure the results are sorted properly so highest score is at the top.
This commit is contained in:
parent
af2e3e88b9
commit
b64ef9f97a
1 changed files with 10 additions and 0 deletions
|
@ -56,6 +56,15 @@ function getResults (input) {
|
|||
},
|
||||
},
|
||||
};
|
||||
const funcScore = { // 100 LBC adds 1 point to the score
|
||||
'function_score': {
|
||||
'script_score': {
|
||||
'script': {
|
||||
'source': "0.00000001 * doc['effective_amount'].value",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
const matPhraseName = { // Match search text as phrase - Name
|
||||
'match_phrase': {
|
||||
'name': {
|
||||
|
@ -160,6 +169,7 @@ function getResults (input) {
|
|||
'bool': {
|
||||
'should': [
|
||||
conBoost,
|
||||
funcScore,
|
||||
],
|
||||
'must': [
|
||||
channelSearch,
|
||||
|
|
Loading…
Reference in a new issue