diff --git a/lbry/wallet/server/db/elasticsearch/constants.py b/lbry/wallet/server/db/elasticsearch/constants.py index 8461c6ab7..1d93ba025 100644 --- a/lbry/wallet/server/db/elasticsearch/constants.py +++ b/lbry/wallet/server/db/elasticsearch/constants.py @@ -73,6 +73,7 @@ RANGE_FIELDS = { ALL_FIELDS = RANGE_FIELDS | TEXT_FIELDS | FIELDS REPLACEMENTS = { + 'trending_mixed': 'trending_score' # 'name': 'normalized_name', 'txid': 'tx_id', 'nout': 'tx_nout', diff --git a/lbry/wallet/server/db/elasticsearch/search.py b/lbry/wallet/server/db/elasticsearch/search.py index ec8677d44..de1f6b59b 100644 --- a/lbry/wallet/server/db/elasticsearch/search.py +++ b/lbry/wallet/server/db/elasticsearch/search.py @@ -183,7 +183,7 @@ class SearchIndex: decay_factor = 2 * (2.0 ** (-1 / self._trending_half_life)) decay_script = """ if (ctx._source.trending_score == null) { ctx._source.trending_score = 0.0; } - if ((-0.000001 <= ctx._source.trending_score) && (ctx._source.trending_score <= 0.000001)) { + if ((-0.1 <= ctx._source.trending_score) && (ctx._source.trending_score <= 0.1)) { ctx._source.trending_score = 0.0; } else if (ctx._source.effective_amount >= %s) { ctx._source.trending_score *= %s;