• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / orangelight / 00dbc10b-d747-4ad7-b211-7b26d753abbb

14 Aug 2025 01:25PM UTC coverage: 0.483% (-94.9%) from 95.343%
00dbc10b-d747-4ad7-b211-7b26d753abbb

push

circleci

web-flow
Merge pull request #5181 from pulibrary/dependabot/bundler/activestorage-7.2.2.2

Bump activestorage from 7.2.2.1 to 7.2.2.2

47 of 9721 relevant lines covered (0.48%)

0.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/services/faceted_query_service.rb
1
# frozen_string_literal: true
2

3
class FacetedQueryService
×
4
  # Constructor
5
  # @param blacklight_context [Class] Blacklight Class providing the global context
6
  def initialize(blacklight_context, rows = 10)
×
7
    @blacklight_context = blacklight_context
×
8
    @rows = rows
×
9
  end
×
10

11
  # Retrieve a response from the Solr endpoint for a faceted query
12
  # @param fq [String] the Solr facet query
13
  # @return [Faraday::Response] the HTTP response to the query
14
  def get_fq_solr_response(fq)
×
15
    solr_url = @blacklight_context.connection_config[:url]
×
16
    conn = Faraday.new(url: solr_url) do |faraday|
×
17
      faraday.request  :url_encoded             # form-encode POST params
×
18
      faraday.adapter  Faraday.default_adapter  # make requests with Net::HTTP
×
19
    end
×
20
    facet_request = \
×
21
      "#{core_url}select?fq=#{fq}&fl=id,title_display,title_vern_display,author_display,\
×
22
      isbn_display,issn_display,lccn_display,oclc_s,holdings_1display,electronic_portfolio_s\
×
23
      &rows=#{@rows}&wt=json"
×
24
    conn.get facet_request
×
25
  end
×
26

27
  # Retrieve the URL for the current Blacklight Solr core
28
  # @return [String] the URL
29
  def core_url
×
30
    @blacklight_context.default_index.connection.uri.to_s.gsub(%r{^.*\/solr}, '/solr')
×
31
  end
×
32
end
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc