Skip to content

Commit

Permalink
Add 255a to description_display (#2341)
Browse files Browse the repository at this point in the history
Co-authored-by: Jane Sandberg <[email protected]>
  • Loading branch information
Beck-Davis and sandbergja authored Apr 10, 2024
1 parent 7c98883 commit f6350b1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion marc_to_solr/lib/traject_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@
# 306 XX a
# 515 XX a
# 362 XX az
to_field 'description_display', extract_marc('254a:255bcdefg:3422abcdefghijklmnopqrstuv:343abcdefghi:352abcdegi:355abcdefghj:507ab:256a:516a:753abc:755axyz:3003abcefg:362az')
to_field 'description_display', extract_marc('254a:255abcdefg:3422abcdefghijklmnopqrstuv:343abcdefghi:352abcdegi:355abcdefghj:507ab:256a:516a:753abc:755axyz:3003abcefg:362az')
to_field 'description_t', extract_marc('254a:255abcdefg:3422abcdefghijklmnopqrstuv:343abcdefghi:352abcdegi:355abcdefghj:507ab:256a:516a:753abc:755axyz:3003abcefg:515a:362az')

to_field 'number_of_pages_citation_display', extract_marc('300a', trim_punctuation: true)
Expand Down
2 changes: 2 additions & 0 deletions spec/fixtures/marc_to_solr/9952690273506421.mrx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<collection><record><leader>01193ced a2200325 a 4500</leader><controlfield tag="001">9952690273506421</controlfield><controlfield tag="005">20230125201443.0</controlfield><controlfield tag="007">aj canzn</controlfield><controlfield tag="008">070815s1911 nyu b 0 eng </controlfield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(NjP)5269027-princetondb</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)ocn166637659</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="z">(NjP)Voyager5269027</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">NjP</subfield><subfield code="b">eng</subfield><subfield code="c">NjP</subfield></datafield><datafield tag="043" ind1=" " ind2=" "><subfield code="a">n-us-nj</subfield></datafield><datafield tag="110" ind1="2" ind2=" "><subfield code="a">Sanborn Map Company.</subfield><subfield code="0">http://id.loc.gov/authorities/names/n80082435</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Leonia</subfield><subfield code="h">[map].</subfield></datafield><datafield tag="255" ind1=" " ind2=" "><subfield code="a">Scales differ.</subfield></datafield><datafield tag="260" ind1=" " ind2=" "><subfield code="a">[New York :</subfield><subfield code="b">Sanborn Map Company,</subfield><subfield code="c">1911]</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">1 map on 3 sheets :</subfield><subfield code="b">col. ;</subfield><subfield code="c">each 64 x 54 cm.</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Includes text.</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Sheets 71-73 of Palisades, N.J. series.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Real property</subfield><subfield code="z">New Jersey</subfield><subfield code="z">Leonia</subfield><subfield code="v">Maps.</subfield></datafield><datafield tag="651" ind1=" " ind2="0"><subfield code="a">Leonia (N.J.)</subfield><subfield code="v">Maps.</subfield></datafield><datafield tag="655" ind1=" " ind2="7"><subfield code="a">Fire insurance maps</subfield><subfield code="z">New Jersey</subfield><subfield code="z">Leonia</subfield><subfield code="y">1911.</subfield><subfield code="2">aat</subfield></datafield><datafield tag="655" ind1=" " ind2="7"><subfield code="a">Maps</subfield><subfield code="z">New Jersey</subfield><subfield code="z">Leonia</subfield><subfield code="y">1911.</subfield><subfield code="2">aat</subfield></datafield><datafield tag="655" ind1=" " ind2="7"><subfield code="a">Maps.</subfield><subfield code="2">lcgft</subfield><subfield code="0">http://id.loc.gov/authorities/genreForms/gf2011026387</subfield></datafield><datafield tag="856" ind1="4" ind2="1"><subfield code="u">http://arks.princeton.edu/ark:/88435/st74ct38j</subfield></datafield><datafield tag="902" ind1=" " ind2=" "><subfield code="a">gls</subfield><subfield code="b">o</subfield><subfield code="6">e</subfield><subfield code="7">d</subfield><subfield code="d">v</subfield><subfield code="f">1</subfield><subfield code="e">20070815</subfield></datafield><datafield tag="904" ind1=" " ind2=" "><subfield code="a">gls</subfield><subfield code="b">g</subfield><subfield code="h">n</subfield><subfield code="c">p</subfield><subfield code="e">20070815</subfield></datafield><datafield tag="914" ind1=" " ind2=" "><subfield code="a">(OCoLC)ocn166637659</subfield><subfield code="b">OCoLC</subfield><subfield code="c">match</subfield><subfield code="d">20230125</subfield><subfield code="e">processed</subfield><subfield code="f">166637659</subfield></datafield></record></collection>
9 changes: 9 additions & 0 deletions spec/marc_to_solr/lib/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def fixture_record(fixture_name, indexer: @indexer)
@sample43 = @indexer.map_record(fixture_record('9935444363506421'))
@sample44 = @indexer.map_record(fixture_record('9913811723506421'))
@sample45 = @indexer.map_record(fixture_record('99127174504906421'))
@record_with_255a = @indexer.map_record(fixture_record('9952690273506421'))
@record_temporary_location = @indexer.map_record(fixture_record('99124695833506421'))
@record_temporary_location_v2 = @indexer.map_record(fixture_record('99124695833506421_custom_holdings'))
@record_at_resource_sharing = @indexer.map_record(fixture_record('19299349640006421'))
Expand Down Expand Up @@ -465,6 +466,14 @@ def fixture_record(fixture_name, indexer: @indexer)
expect(@sample34['notes_index']).to include('DVD ; all regions ; Dolby digital.', 'Originally released as documentary films 1956-1971.')
end
end
describe 'description_display' do
it 'shows tag 255' do
expect(@record_with_255a['description_display']).to include('Scales differ.')
end
it 'shows tag 300' do
expect(@record_with_255a['description_display']).to include('1 map on 3 sheets : col. ; each 64 x 54 cm.')
end
end
describe 'publication end date' do
let(:place) { 'Cincinnati, Ohio :' }
let(:name) { 'American Drama Institute,' }
Expand Down

0 comments on commit f6350b1

Please sign in to comment.