Merge pull request #107 from lbryio/filipnyquist-patch-81
Added back #81
This commit is contained in:
commit
59675a89ec
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
|
const matPhraseName = { // Match search text as phrase - Name
|
||||||
'match_phrase': {
|
'match_phrase': {
|
||||||
'name': {
|
'name': {
|
||||||
|
@ -160,6 +169,7 @@ function getResults (input) {
|
||||||
'bool': {
|
'bool': {
|
||||||
'should': [
|
'should': [
|
||||||
conBoost,
|
conBoost,
|
||||||
|
funcScore,
|
||||||
],
|
],
|
||||||
'must': [
|
'must': [
|
||||||
channelSearch,
|
channelSearch,
|
||||||
|
|
Loading…
Reference in a new issue