about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-10-27 02:10:38 +0200
committerGitHub <noreply@github.com>2022-10-27 02:10:38 +0200
commitf6bcf86caf6a88b020c435bfab4c1ba8d70dd6db (patch)
tree50f91b698af774288b0a5c1ea571785d154870c5
parent52ebfb7792c29eba1472ec358c2420ba443ba24d (diff)
Fix wrong math function used in search query (#19481)
-rw-r--r--app/services/account_search_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/account_search_service.rb b/app/services/account_search_service.rb
index de1dc7b8e..9f2330a94 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)",
         },
       },
     }