From 556ac8aea17963fed5fe14b8adfe8881f0f192d4 Mon Sep 17 00:00:00 2001 From: jsgoldstein Date: Wed, 23 Aug 2023 09:40:09 -0400 Subject: [PATCH] Update Account Search to prioritize username over display name (#26623) --- 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 a15b6912110fed..b437ff47593ee4 100644 --- a/app/services/account_search_service.rb +++ b/app/services/account_search_service.rb @@ -124,7 +124,7 @@ def core_query multi_match: { query: @query, type: 'bool_prefix', - fields: %w(username username.* display_name display_name.*), + fields: %w(username^2 username.*^2 display_name display_name.*), }, } end