arclight 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bde9aafc125ea48ead373cf37dd8a0928c21e18ee33582ee67cc942f92a8bb7
4
- data.tar.gz: bfcd7d32cd0338df72900909e9b7f97342f9cb2fabc2ac976e10aa652f7c85de
3
+ metadata.gz: 8fa0be8b6a63486a158607273080d3bc226029d05c8d8b76b73f72a60dc6afa3
4
+ data.tar.gz: 155b435d83af03435aff13db82a1509148da62a84fa960135d1c73b5dfa335ae
5
5
  SHA512:
6
- metadata.gz: fefcf5ac8d97af4cb54dbab7ce4de66a0bfc550ccc77211e7c54e0cf3d62e393ff0f2c2713bfeaaa362886d621c8080e13a91a617cd812f3b3226c3382d00360
7
- data.tar.gz: 679402a84519e35f035e3a60646333ec4fbfb76c767a972badb1332784a630bdf6af24ec14e4c4637f4251ed37cc3e296ea4ddfbd0ba0819f472afb0375cd890
6
+ metadata.gz: 22eeea5a79c6fc8a777a42eff6f9c0ebd2be7bead5a4a3e92277be5a88936b5628b89042999c7b21c3963824767dadc0448f9912ebf9d76fbd9b630e98dfa7e6
7
+ data.tar.gz: d5b7a8fa47adfa754db93b8fe0012b7bf51c38f6c10a801b762610b4ca0621fae43a9f80cef4bb71264a90ecebb2bfe002f6b99b02ab36698e86fda7e10e6842
@@ -7,6 +7,9 @@ module Arclight
7
7
  class Parent
8
8
  attr_reader :id, :label, :eadid, :level
9
9
 
10
+ alias global_id id
11
+ Arclight.deprecation.deprecate_methods(self, global_id: 'Call `id` instead')
12
+
10
13
  def initialize(id:, label:, eadid:, level:)
11
14
  @id = id
12
15
  @label = label
@@ -5,10 +5,11 @@ module Arclight
5
5
  # Object for parsing and formalizing Solr_Ead "Parents"
6
6
  # https://github.com/awead/solr_ead/blob/8cf7ffaa66e0e4c9c0b12f5646d6c2e20984cd99/lib/solr_ead/behaviors.rb#L54-L57
7
7
  class Parents
8
- attr_reader :ids, :labels, :levels
8
+ attr_reader :ids, :legacy_ids, :labels, :levels
9
9
 
10
- def initialize(ids:, labels:, eadid:, levels:)
10
+ def initialize(ids:, legacy_ids:, labels:, eadid:, levels:)
11
11
  @ids = ids
12
+ @legacy_ids = legacy_ids
12
13
  @labels = labels
13
14
  @eadid = eadid
14
15
  @levels = levels
@@ -21,17 +22,18 @@ module Arclight
21
22
  ##
22
23
  # @return [Array[Arclight::Parent]]
23
24
  def as_parents
24
- ids.map.with_index { |id, idx| Arclight::Parent.new(id: id, label: labels[idx], eadid: eadid, level: levels[idx]) }
25
+ (ids.presence || legacy_ids).map.with_index { |id, idx| Arclight::Parent.new(id: id, label: labels[idx], eadid: eadid, level: levels[idx]) }
25
26
  end
26
27
 
27
28
  ##
28
29
  # @param [SolrDocument] document
29
30
  def self.from_solr_document(document)
30
31
  ids = document.parent_ids
32
+ legacy_ids = document.legacy_parent_ids.map { |legacy_id| document.eadid == legacy_id ? legacy_id : "#{document.eadid}#{legacy_id}" }
31
33
  labels = document.parent_labels
32
34
  eadid = document.eadid
33
35
  levels = document.parent_levels
34
- new(ids: ids, labels: labels, eadid: eadid, levels: levels)
36
+ new(ids: ids, legacy_ids: legacy_ids, labels: labels, eadid: eadid, levels: levels)
35
37
  end
36
38
  end
37
39
  end
@@ -8,6 +8,8 @@ module Arclight
8
8
 
9
9
  included do
10
10
  attribute :parent_ids, :array, 'parent_ids_ssim'
11
+ attribute :legacy_parent_ids, :array, 'parent_ssim'
12
+ Arclight.deprecation.deprecate_methods(self, legacy_parent_ids: 'Use `parent_ids` instead')
11
13
  attribute :parent_labels, :array, 'parent_unittitles_ssm'
12
14
  attribute :parent_levels, :array, 'parent_levels_ssm'
13
15
  attribute :unitid, :string, 'unitid_ssm'
@@ -304,6 +304,7 @@ SEARCHABLE_NOTES_FIELDS.map do |selector|
304
304
  end
305
305
  DID_SEARCHABLE_NOTES_FIELDS.map do |selector|
306
306
  to_field "#{selector}_html_tesm", extract_xpath("./did/#{selector}", to_text: false)
307
+ to_field "#{selector}_tesim", extract_xpath("./did/#{selector}")
307
308
  end
308
309
 
309
310
  # =============================
@@ -240,6 +240,7 @@ end
240
240
 
241
241
  DID_SEARCHABLE_NOTES_FIELDS.map do |selector|
242
242
  to_field "#{selector}_html_tesm", extract_xpath("/ead/archdesc/did/#{selector}", to_text: false)
243
+ to_field "#{selector}_tesim", extract_xpath("/ead/archdesc/did/#{selector}")
243
244
  end
244
245
 
245
246
  NAME_ELEMENTS.map do |selector|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Arclight
4
- VERSION = '1.1.2'
4
+ VERSION = '1.1.3'
5
5
  end
@@ -33,7 +33,6 @@ en:
33
33
  fileplan: File plan
34
34
  odd: Other descriptive data
35
35
  note: Note
36
- did_note: Note
37
36
 
38
37
  access_subjects: Subjects
39
38
  names_coll: Names
data/solr/conf/schema.xml CHANGED
@@ -348,8 +348,7 @@
348
348
  <copyField source="access_subjects_ssim" dest="text" />
349
349
  <copyField source="containers_ssim" dest="text" />
350
350
 
351
- <!-- grab the searchable notes -->
352
- <copyField source="abstract_tesim" dest="text" />
351
+ <!-- grab the searchable notes (SEARCHABLE_NOTES_FIELDS) -->
353
352
  <copyField source="accessrestrict_tesim" dest="text" />
354
353
  <copyField source="accruals_tesim" dest="text" />
355
354
  <copyField source="acqinfo_tesim" dest="text" />
@@ -359,23 +358,24 @@
359
358
  <copyField source="bibliography_tesim" dest="text" />
360
359
  <copyField source="bioghist_tesim" dest="text" />
361
360
  <copyField source="custodhist_tesim" dest="text" />
362
- <copyField source="did_note_tesim" dest="text" />
363
361
  <copyField source="fileplan_tesim" dest="text" />
364
362
  <copyField source="indexes_tesim" dest="text" />
365
363
  <copyField source="language_ssim" dest="text" />
366
- <copyField source="materialspec_tesim" dest="text" />
367
- <copyField source="note_tesim" dest="text" />
368
364
  <copyField source="odd_tesim" dest="text" />
369
365
  <copyField source="originalsloc_tesim" dest="text" />
370
366
  <copyField source="parent_unittitles_tesim" dest="text" />
371
367
  <copyField source="physdesc_tesim" dest="text" />
372
- <copyField source="physloc_tesim" dest="text" />
373
368
  <copyField source="phystech_tesim" dest="text" />
374
369
  <copyField source="processinfo_tesim" dest="text" />
375
370
  <copyField source="relatedmaterial_tesim" dest="text" />
376
371
  <copyField source="scopecontent_tesim" dest="text" />
377
372
  <copyField source="separatedmaterial_tesim" dest="text" />
378
373
  <copyField source="userestrict_tesim" dest="text" />
374
+ <!-- did searchable notes (DID_SEARCHABLE_NOTES_FIELDS) -->
375
+ <copyField source="abstract_tesim" dest="text" />
376
+ <copyField source="materialspec_tesim" dest="text" />
377
+ <copyField source="physloc_tesim" dest="text" />
378
+ <copyField source="note_tesim" dest="text" />
379
379
  <!-- grab structured data that's important -->
380
380
  <copyField source="unitid_ssm" dest="text" />
381
381
  <copyField source="unitid_ssm" dest="unitid_identifier_match" />
@@ -142,12 +142,14 @@
142
142
  ead_ssi
143
143
  ref_ssm
144
144
  unitid_ssm
145
+ unitid_identifier_match
145
146
  </str>
146
147
  <str name="pf_identifier">
147
148
  id^2
148
149
  ead_ssi^2
149
150
  ref_ssm^2
150
151
  unitid_ssm^2
152
+ unitid_identifier_match^2
151
153
  </str>
152
154
  <str name="qf_name">
153
155
  name_teim
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arclight
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Hardy
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2024-03-15 00:00:00.000000000 Z
14
+ date: 2024-03-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: blacklight
@@ -501,7 +501,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
501
501
  - !ruby/object:Gem::Version
502
502
  version: '0'
503
503
  requirements: []
504
- rubygems_version: 3.5.6
504
+ rubygems_version: 3.4.10
505
505
  signing_key:
506
506
  specification_version: 4
507
507
  summary: A Blacklight-based environment to support discovery and delivery for archives