Merge remote-tracking branch 'parent/main' into upstream-20240531

This commit is contained in:
KMY 2024-05-31 08:27:09 +09:00
commit 13ad383039
101 changed files with 1486 additions and 1232 deletions

View file

@ -2,15 +2,25 @@
class StatusesSearchService < BaseService
def call(query, account = nil, options = {})
@query = query&.strip
@account = account
@options = options
@limit = options[:limit].to_i
@offset = options[:offset].to_i
@searchability = options[:searchability]&.to_sym
MastodonOTELTracer.in_span('StatusesSearchService#call') do |span|
@query = query&.strip
@account = account
@options = options
@limit = options[:limit].to_i
@offset = options[:offset].to_i
@searchability = options[:searchability]&.to_sym
convert_deprecated_options!
convert_deprecated_options!
status_search_results
span.add_attributes(
'search.offset' => @offset,
'search.limit' => @limit,
'search.backend' => Chewy.enabled? ? 'elasticsearch' : 'database'
)
status_search_results.tap do |results|
span.set_attribute('search.results.count', results.size)
end
end
end
private