• 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/format.rb
1
require_relative './format/bib_format'
1✔
2
require_relative './format/bib_types'
1✔
3

4
# Adapted from: https://github.com/billdueber/traject_umich_format
5
class Format
1✔
6
  # @!attribute [r] record
7
  #   The record passed into the constructor
8
  # @!attribute [r] bib_format
9
  #   The bib format code as computed from the passed record
10
  # @!attribute [r] types
11
  #   A (possibly empty) array of type codes as computed from record data
12
  attr_reader :bib_format, :record, :types
1✔
13

14
  # Construct a Formats object from the given record, calcuclating
15
  # the bib_format and types
16
  #
17
  # @param [MARC::Record] record
18
  def initialize(marc_record)
1✔
UNCOV
19
    @record     = marc_record
×
UNCOV
20
    @bib_format = BibFormat.new(record).code
×
UNCOV
21
    @types      = BibTypes.new(@bib_format, record).codes
×
22
  end
23

24
  def format_and_types
1✔
25
    types = @types.dup
×
26
    types.unshift bib_format
×
27
    types
×
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