0
0
Fork 0

Change searching with # to include account index (#25638)

This commit is contained in:
jsgoldstein 2023-07-10 14:58:13 -04:00 committed by GitHub
parent af54bf52c8
commit 99be47f8b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 15 deletions

View file

@ -133,8 +133,12 @@ class AccountSearchService < BaseService
end
def must_clause
fields = %w(username username.* display_name display_name.*)
fields << 'text' << 'text.*' if options[:use_searchable_text]
if options[:start_with_hashtag]
fields = %w(text text.*)
else
fields = %w(username username.* display_name display_name.*)
fields << 'text' << 'text.*' if options[:use_searchable_text]
end
[
{