From f6bcf86caf6a88b020c435bfab4c1ba8d70dd6db Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 27 Oct 2022 02:10:38 +0200 Subject: [PATCH] Fix wrong math function used in search query (#19481) --- app/services/account_search_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/account_search_service.rb b/app/services/account_search_service.rb index de1dc7b8ed..9f2330a947 100644 --- a/app/services/account_search_service.rb +++ b/app/services/account_search_service.rb @@ -115,7 +115,7 @@ class AccountSearchService < BaseService { script_score: { script: { - source: "log2p(Math.max(doc['followers_count'].value, 0))", + source: "Math.log10(Math.max(doc['followers_count'].value, 0) + 2)", }, }, }