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

pulibrary / bibdata / f04bc944-f9b4-4a42-8b26-dcacd0e3e688

11 Mar 2025 10:27PM UTC coverage: 34.017% (-58.1%) from 92.162%
f04bc944-f9b4-4a42-8b26-dcacd0e3e688

Pull #2653

circleci

christinach
Add new lc_subject_facet field.
Helps with the vocabulary work https://github.com/pulibrary/orangelight/pull/3386
In this new field we index only the lc subject heading and the subdivisions
So that when the user searches using the Details section, they can query solr for
all the subject headings and their divisions.

This is needed for the Subject browse Vocabulary work.
example: "lc_subject_facet": [
             "Booksellers and bookselling—Italy—Directories",
             "Booksellers and bookselling-Italy",
             "Booksellers and bookselling"
              ]
Pull Request #2653: Add new lc_subject_facet field.

1 of 3 new or added lines in 1 file covered. (33.33%)

2215 existing lines in 93 files now uncovered.

1294 of 3804 relevant lines covered (34.02%)

0.99 hits per line

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

50.0
/marc_to_solr/lib/composite_cache_map.rb
1
# Composite of CacheMaps
2
# Provides the ability to build a cache from multiple Solr endpoints
3
class CompositeCacheMap
1✔
4
  # Constructor
5
  # @param cache_maps [Array<CacheMap>] the CacheMap instances for each endpoint
6
  def initialize(cache_maps:)
1✔
UNCOV
7
    @cache_maps = cache_maps
×
8
  end
9

10
  # Seed the cache
11
  # @param page [Integer] the page number at which to start the caching
12
  def seed!(page: 1)
1✔
13
    @cache_maps.each { |cache_map| cache_map.seed!(page:) }
×
14
  end
15

16
  # Retrieve the cached values
17
  # @return [Hash] the values cached from the Solr response
18
  def values
1✔
19
    @values ||= @cache_maps.map { |cache_map| cache_map.values }.reduce(&:merge)
×
20
  end
21

22
  # Fetch the first BibID mapped to an ARK from the cache
23
  # @param ark [String] the ARK mapped to the BibID
24
  # @return [String, nil] the BibID (or nil if it has not been mapped)
25
  def fetch(ark)
1✔
UNCOV
26
    bib_ids = @cache_maps.map { |cache_map| cache_map.fetch(ark) }
×
UNCOV
27
    bib_ids.compact.first
×
28
  end
29
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