Module: PrependedLinkedData::SearchQuery
- Defined in:
- app/prepends/prepended_linked_data/search_query.rb
Instance Method Summary collapse
-
#search(query, request_header: {}, language: nil, replacements: {}, subauth: nil, context: false, performance_data: false) ⇒ String
Override Qa::Authorities::LinkedData::SearchQuery#search method.
Instance Method Details
#search(query, request_header: {}, language: nil, replacements: {}, subauth: nil, context: false, performance_data: false) ⇒ String
Override Qa::Authorities::LinkedData::SearchQuery#search method
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/prepends/prepended_linked_data/search_query.rb', line 5 def search(query, request_header: {}, language: nil, replacements: {}, subauth: nil, context: false, performance_data: false) # rubocop:disable Metrics/ParameterLists start_time_s = Time.now.to_f request_header = build_request_header(language: language, replacements: replacements, subauth: subauth, format: format, performance_data: performance_data) if request_header.empty? saved_performance_data = performance_data || request_header[:performance_data] request_header[:performance_data] = true ph_record = QaServer::PerformanceHistory.create_record(authority: , action: 'search') @phid = ph_record.id begin full_results = super update_performance_history_record(full_results, start_time_s) rescue Exception => e # rubocop:disable Lint/RescueException ph_record.destroy raise e end requested_results(full_results, saved_performance_data) end |