dor_indexing 1.1.0 → 1.2.0

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: 6afcf7ed5cead21abd1886790e5ae5130e79eb69dd2c11a25eeadfde3767fcc3
4
- data.tar.gz: cad79ae3ee2bfd7dced9c3a929b1896126b58df869af4df42c3ba3b026421f5e
3
+ metadata.gz: 4f96b1edca0c99a853cac890e429096d4ee379121eec7e27f720f7d2104df009
4
+ data.tar.gz: aebbbf721ff6be98736396ca4090eb70b27c3bf52979d4a6418a3d773a4eff99
5
5
  SHA512:
6
- metadata.gz: ac4f607a9da1b3fb2446c9100c76e842fde2c37b238ada8aaa64dc6fd48979a688b6d46707ce64140d2901d4c55eb8dac477005c88871522dc57d9dd4410cf0d
7
- data.tar.gz: 87ab7383e836eb2f28e7a0f22dde0fe0f1b2b55a1b97b4f88341673635604ef29d865bcb2729c85eafb6811fc449431a5c5e7962977e71b0721746326ef56625
6
+ metadata.gz: f37e66d699421ae5c886b4e6561a2779783e258e5923bd1213fc4ddd3221bf7f69b0ee97a2dff57ff0500a3ad63a942df73bb2236a545839bedba6bd0ce27c61
7
+ data.tar.gz: 2dc30cddf8d8f9660ad0dbcc9c821364bc205694f2503668a6f40ec6d8ccca300d404ac8fcf6ff71e32829b06959708623d8236642d7c2568e45ac2d7e97d22a
data/Gemfile CHANGED
@@ -7,7 +7,6 @@ gemspec
7
7
 
8
8
  # Development dependencies
9
9
  gem 'byebug'
10
- gem 'dor-workflow-client', '~> 5.0'
11
10
  gem 'rake', '~> 13.0'
12
11
  gem 'rspec', '~> 3.0'
13
12
  gem 'rubocop'
data/Gemfile.lock CHANGED
@@ -1,8 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dor_indexing (1.1.0)
5
- cocina-models (~> 0.94.0)
4
+ dor_indexing (1.2.0)
5
+ cocina-models (~> 0.94.1)
6
+ dor-workflow-client (~> 7.0)
6
7
  honeybadger
7
8
  marc-vocab (~> 0.3.0)
8
9
  solrizer
@@ -12,7 +13,7 @@ PATH
12
13
  GEM
13
14
  remote: https://rubygems.org/
14
15
  specs:
15
- activesupport (7.1.2)
16
+ activesupport (7.1.3)
16
17
  base64
17
18
  bigdecimal
18
19
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -25,9 +26,9 @@ GEM
25
26
  ast (2.4.2)
26
27
  attr_extras (7.1.0)
27
28
  base64 (0.2.0)
28
- bigdecimal (3.1.5)
29
+ bigdecimal (3.1.6)
29
30
  byebug (11.1.3)
30
- cocina-models (0.94.0)
31
+ cocina-models (0.94.2)
31
32
  activesupport
32
33
  deprecation
33
34
  dry-struct (~> 1.0)
@@ -44,13 +45,13 @@ GEM
44
45
  thor
45
46
  zeitwerk (~> 2.1)
46
47
  commonmarker (0.23.10)
47
- concurrent-ruby (1.2.2)
48
+ concurrent-ruby (1.2.3)
48
49
  connection_pool (2.4.1)
49
50
  deprecation (1.1.0)
50
51
  activesupport
51
52
  diff-lcs (1.5.0)
52
53
  docile (1.4.0)
53
- dor-workflow-client (5.1.0)
54
+ dor-workflow-client (7.0.2)
54
55
  activesupport (>= 3.2.1, < 8)
55
56
  deprecation (>= 0.99.0)
56
57
  faraday (~> 2.0)
@@ -99,7 +100,7 @@ GEM
99
100
  multi_json
100
101
  language_server-protocol (3.17.0.3)
101
102
  marc-vocab (0.3.0)
102
- minitest (5.20.0)
103
+ minitest (5.21.2)
103
104
  mods (3.0.4)
104
105
  edtf (~> 3.0)
105
106
  iso-639
@@ -121,7 +122,7 @@ GEM
121
122
  openapi_parser (1.0.0)
122
123
  optimist (3.1.0)
123
124
  parallel (1.24.0)
124
- parser (3.3.0.2)
125
+ parser (3.3.0.5)
125
126
  ast (~> 2.4.1)
126
127
  racc
127
128
  patience_diff (1.2.0)
@@ -146,11 +147,11 @@ GEM
146
147
  rspec-support (3.12.1)
147
148
  rss (0.3.0)
148
149
  rexml
149
- rubocop (1.59.0)
150
+ rubocop (1.60.1)
150
151
  json (~> 2.3)
151
152
  language_server-protocol (>= 3.17.0)
152
153
  parallel (~> 1.10)
153
- parser (>= 3.2.2.4)
154
+ parser (>= 3.3.0.2)
154
155
  rainbow (>= 2.2.2, < 4.0)
155
156
  regexp_parser (>= 1.8, < 3.0)
156
157
  rexml (>= 3.2.5, < 4.0)
@@ -205,7 +206,6 @@ PLATFORMS
205
206
 
206
207
  DEPENDENCIES
207
208
  byebug
208
- dor-workflow-client (~> 5.0)
209
209
  dor_indexing!
210
210
  rake (~> 13.0)
211
211
  rspec (~> 3.0)
data/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ [![Gem Version](https://badge.fury.io/rb/dor_indexing.svg)](https://badge.fury.io/rb/dor_indexing)
2
+ [![CircleCI](https://circleci.com/gh/sul-dlss/dor_indexing.svg?style=svg)](https://circleci.com/gh/sul-dlss/dor_indexing)
3
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/debefc8907cf263f45e9/test_coverage)](https://codeclimate.com/github/sul-dlss/dor_indexing/test_coverage)
4
+
1
5
  # DorIndexing
2
6
 
3
7
  DorIndexing is a Ruby gem that creates Solr documents from Cocina objects for the purposes of indexing. It was extracted from DOR Indexing App.
data/dor_indexing.gemspec CHANGED
@@ -31,7 +31,8 @@ Gem::Specification.new do |spec|
31
31
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
32
  spec.require_paths = ['lib']
33
33
 
34
- spec.add_dependency 'cocina-models', '~> 0.94.0'
34
+ spec.add_dependency 'cocina-models', '~> 0.94.1'
35
+ spec.add_dependency 'dor-workflow-client', '~> 7.0'
35
36
  spec.add_dependency 'honeybadger'
36
37
  spec.add_dependency 'marc-vocab', '~> 0.3.0'
37
38
  spec.add_dependency 'solrizer'
@@ -21,15 +21,22 @@ class DorIndexing
21
21
  def to_solr
22
22
  {
23
23
  # title
24
- 'sw_display_title_tesim' => title,
24
+ 'main_title_tenim' => main_title, # for searching; 2 more field types are copyFields in solr schema.xml
25
+ 'full_title_tenim' => full_title, # for searching; 1 more field type is copyField in solr schema.xml
26
+ 'additional_titles_tenim' => additional_titles, # for searching; 1 more field type is copyField in solr schema.xml
27
+ 'display_title_ss' => display_title, # for display in Argo
28
+ 'sw_display_title_tesim' => display_title, # for display in Argo DEPRECATED in favor of display_title_ss
29
+
25
30
  # contributor
26
31
  'author_text_nostem_im' => author_primary, # primary author tokenized but not stemmed
27
32
  'sw_author_tesim' => author_primary, # used for author display in Argo
28
33
  'contributor_text_nostem_im' => author_all, # author names should be tokenized but not stemmed
29
34
  'contributor_orcids_ssim' => orcids,
35
+
30
36
  # topic
31
37
  'topic_ssim' => stanford_mods_record.topic_facet&.uniq,
32
38
  'topic_tesim' => stemmable_topics,
39
+
33
40
  # publication
34
41
  'originInfo_date_created_tesim' => creation_date,
35
42
  'originInfo_publisher_tesim' => publisher_name,
@@ -85,7 +92,19 @@ class DorIndexing
85
92
  DorIndexing::Builders::OrcidBuilder.build(Array(cocina.description.contributor))
86
93
  end
87
94
 
88
- def title
95
+ def main_title
96
+ Cocina::Models::Builders::TitleBuilder.main_title(cocina.description.title)
97
+ end
98
+
99
+ def full_title
100
+ Cocina::Models::Builders::TitleBuilder.full_title(cocina.description.title)
101
+ end
102
+
103
+ def additional_titles
104
+ Cocina::Models::Builders::TitleBuilder.additional_titles(cocina.description.title)
105
+ end
106
+
107
+ def display_title
89
108
  Cocina::Models::Builders::TitleBuilder.build(cocina.description.title)
90
109
  end
91
110
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class DorIndexing
4
- VERSION = '1.1.0'
4
+ VERSION = '1.2.0'
5
5
  end
@@ -32,7 +32,6 @@ class DorIndexing
32
32
  def add_status(solr_doc)
33
33
  # This is the status on the Argo show page (e.g. "v4 In accessioning (described, published, deposited)")
34
34
  solr_doc['status_ssi'] = status_service.display
35
- return unless status_service.info[:status_code]
36
35
 
37
36
  # This is used for Argo's "Processing Status" facet
38
37
  solr_doc['processing_status_text_ssi'] = status_service.display_simplified
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dor_indexing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Littman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-19 00:00:00.000000000 Z
11
+ date: 2024-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocina-models
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.94.0
19
+ version: 0.94.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.94.0
26
+ version: 0.94.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: dor-workflow-client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '7.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '7.0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: honeybadger
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -166,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
180
  - !ruby/object:Gem::Version
167
181
  version: '0'
168
182
  requirements: []
169
- rubygems_version: 3.4.14
183
+ rubygems_version: 3.4.13
170
184
  signing_key:
171
185
  specification_version: 4
172
186
  summary: Library for creating Solr documents for SDR indexing.