Merge pull request #107 from lbryio/filipnyquist-patch-81

Added back #81
This commit is contained in:
filipnyquist 2018-08-23 12:33:37 +02:00 committed by GitHub
commit 59675a89ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,