arclight 0.4.0 → 1.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc +11 -4
  3. data/.github/workflows/ruby.yml +24 -8
  4. data/.rspec +0 -1
  5. data/.rubocop.yml +289 -3
  6. data/.rubocop_todo.yml +64 -76
  7. data/CONTRIBUTING.md +5 -5
  8. data/Gemfile +15 -10
  9. data/README.md +18 -12
  10. data/app/assets/javascripts/arclight/arclight.js +3 -7
  11. data/app/assets/javascripts/arclight/oembed_viewer.js +64 -39
  12. data/app/assets/javascripts/arclight/truncate_controller.js +27 -0
  13. data/app/assets/stylesheets/arclight/application.scss +1 -5
  14. data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +104 -130
  15. data/app/assets/stylesheets/arclight/modules/icons.scss +14 -3
  16. data/app/assets/stylesheets/arclight/modules/layout.scss +121 -100
  17. data/app/assets/stylesheets/arclight/modules/mastheads.scss +15 -57
  18. data/app/assets/stylesheets/arclight/modules/repositories.scss +2 -2
  19. data/app/assets/stylesheets/arclight/modules/repository_card.scss +4 -48
  20. data/app/assets/stylesheets/arclight/modules/search_results.scss +86 -35
  21. data/app/assets/stylesheets/arclight/modules/show_collection.scss +5 -32
  22. data/app/assets/stylesheets/arclight/modules/truncator.scss +56 -0
  23. data/app/assets/stylesheets/arclight/variables.scss +7 -4
  24. data/app/components/arclight/access_component.html.erb +14 -0
  25. data/app/components/arclight/access_component.rb +25 -0
  26. data/app/components/arclight/bookmark_component.html.erb +25 -0
  27. data/app/components/arclight/bookmark_component.rb +9 -0
  28. data/app/components/arclight/breadcrumb_component.rb +40 -0
  29. data/app/components/arclight/breadcrumbs_hierarchy_component.html.erb +34 -0
  30. data/app/components/arclight/breadcrumbs_hierarchy_component.rb +25 -0
  31. data/app/components/arclight/collection_context_component.html.erb +12 -0
  32. data/app/components/arclight/collection_context_component.rb +27 -0
  33. data/app/components/arclight/collection_info_component.html.erb +28 -0
  34. data/app/components/arclight/collection_info_component.rb +26 -0
  35. data/app/components/arclight/collection_sidebar_component.html.erb +15 -0
  36. data/app/components/arclight/collection_sidebar_component.rb +41 -0
  37. data/app/{views/catalog/_search_results_repository.html.erb → components/arclight/constraints_component.html.erb} +2 -1
  38. data/app/components/arclight/constraints_component.rb +17 -0
  39. data/app/components/arclight/document_collection_context_component.html.erb +29 -0
  40. data/app/components/arclight/document_collection_context_component.rb +28 -0
  41. data/app/components/arclight/document_collection_hierarchy_component.html.erb +46 -0
  42. data/app/components/arclight/document_collection_hierarchy_component.rb +62 -0
  43. data/app/components/arclight/document_component.html.erb +39 -0
  44. data/app/components/arclight/document_component.rb +49 -0
  45. data/app/components/arclight/document_components_hierarchy_component.html.erb +32 -0
  46. data/app/components/arclight/document_components_hierarchy_component.rb +28 -0
  47. data/app/components/arclight/document_download_component.html.erb +24 -0
  48. data/app/components/arclight/document_download_component.rb +71 -0
  49. data/app/components/arclight/embed_component.html.erb +10 -0
  50. data/app/components/arclight/embed_component.rb +43 -0
  51. data/app/components/arclight/group_component.html.erb +30 -0
  52. data/app/components/arclight/group_component.rb +23 -0
  53. data/app/components/arclight/header_component.html.erb +5 -0
  54. data/app/components/arclight/header_component.rb +10 -0
  55. data/app/components/arclight/index_metadata_field_component.html.erb +17 -0
  56. data/app/components/arclight/index_metadata_field_component.rb +20 -0
  57. data/app/components/arclight/masthead_component.html.erb +15 -0
  58. data/app/components/arclight/masthead_component.rb +10 -0
  59. data/app/components/arclight/metadata_section_component.html.erb +13 -0
  60. data/app/components/arclight/metadata_section_component.rb +22 -0
  61. data/app/components/arclight/oembed_viewer_component.html.erb +5 -0
  62. data/app/components/arclight/oembed_viewer_component.rb +16 -0
  63. data/app/components/arclight/online_content_filter_component.html.erb +15 -0
  64. data/app/components/arclight/online_content_filter_component.rb +19 -0
  65. data/app/components/arclight/online_status_indicator_component.rb +19 -0
  66. data/app/components/arclight/repository_breadcrumb_component.html.erb +10 -0
  67. data/app/components/arclight/repository_breadcrumb_component.rb +17 -0
  68. data/app/components/arclight/repository_location_component.html.erb +20 -0
  69. data/app/components/arclight/repository_location_component.rb +10 -0
  70. data/app/components/arclight/search_bar_component.html.erb +25 -0
  71. data/app/components/arclight/search_bar_component.rb +32 -0
  72. data/app/components/arclight/search_result_breadcrumbs_component.html.erb +3 -0
  73. data/app/components/arclight/search_result_breadcrumbs_component.rb +37 -0
  74. data/app/components/arclight/search_result_component.html.erb +20 -0
  75. data/app/components/arclight/search_result_component.rb +24 -0
  76. data/app/components/arclight/search_result_title_component.html.erb +13 -0
  77. data/app/components/arclight/search_result_title_component.rb +15 -0
  78. data/app/components/arclight/sidebar_component.html.erb +9 -0
  79. data/app/components/arclight/sidebar_component.rb +19 -0
  80. data/app/components/arclight/upper_metadata_layout_component.rb +10 -0
  81. data/app/components/blacklight/icons/bookmark_component.rb +12 -0
  82. data/app/components/blacklight/icons/collection_component.rb +14 -0
  83. data/app/components/blacklight/icons/compact_component.rb +12 -0
  84. data/app/components/blacklight/icons/container_component.rb +14 -0
  85. data/app/components/blacklight/icons/ead_component.rb +12 -0
  86. data/app/components/blacklight/icons/file_component.rb +14 -0
  87. data/app/components/blacklight/icons/folder_component.rb +12 -0
  88. data/app/components/blacklight/icons/online_component.rb +15 -0
  89. data/app/components/blacklight/icons/pdf_component.rb +12 -0
  90. data/app/components/blacklight/icons/repository_component.rb +12 -0
  91. data/app/controllers/arclight/repositories_controller.rb +4 -4
  92. data/app/{controllers/concerns → helpers}/arclight/ead_format_helpers.rb +4 -7
  93. data/app/helpers/arclight/field_config_helpers.rb +26 -0
  94. data/app/helpers/arclight_helper.rb +16 -254
  95. data/app/models/arclight/document_downloads.rb +12 -15
  96. data/app/models/arclight/parent.rb +5 -0
  97. data/app/models/arclight/parents.rb +2 -1
  98. data/app/models/arclight/requests/aeon_external_request.rb +1 -1
  99. data/app/models/arclight/requests/aeon_web_ead.rb +8 -3
  100. data/app/models/arclight/requests/google_form.rb +8 -3
  101. data/app/models/concerns/arclight/catalog.rb +25 -15
  102. data/app/models/concerns/arclight/search_behavior.rb +12 -26
  103. data/app/models/concerns/arclight/solr_document.rb +70 -73
  104. data/app/presenters/arclight/show_presenter.rb +34 -7
  105. data/app/views/arclight/_requests.html.erb +2 -2
  106. data/app/views/arclight/repositories/_repository.html.erb +21 -40
  107. data/app/views/arclight/repositories/index.html.erb +3 -1
  108. data/app/views/arclight/repositories/show.html.erb +4 -6
  109. data/app/views/arclight/requests/_aeon_external_request_endpoint.html.erb +4 -5
  110. data/app/views/arclight/requests/_aeon_web_ead.html.erb +3 -4
  111. data/app/views/arclight/requests/_google_form.html.erb +4 -6
  112. data/app/views/catalog/_group.html.erb +1 -18
  113. data/app/views/catalog/_group_toggle.html.erb +1 -1
  114. data/app/views/catalog/_search_results_header.html.erb +3 -0
  115. data/app/views/catalog/hierarchy.html.erb +19 -0
  116. data/app/views/catalog/index.html.erb +16 -7
  117. data/app/views/shared/_breadcrumbs.html.erb +2 -14
  118. data/app/views/shared/_main_menu_links.html.erb +1 -1
  119. data/arclight.gemspec +13 -11
  120. data/config/breadcrumbs.rb +24 -0
  121. data/config/i18n-tasks.yml +9 -8
  122. data/config/importmap.rb +3 -0
  123. data/config/locales/arclight.en.yml +31 -30
  124. data/config/routes.rb +1 -1
  125. data/docker-compose.yml +16 -0
  126. data/lib/arclight/digital_object.rb +2 -1
  127. data/lib/arclight/engine.rb +18 -37
  128. data/lib/arclight/exceptions.rb +1 -0
  129. data/lib/arclight/hash_absolute_xpath.rb +2 -1
  130. data/lib/arclight/normalized_id.rb +2 -0
  131. data/lib/arclight/normalized_title.rb +2 -0
  132. data/lib/arclight/repository.rb +45 -56
  133. data/lib/arclight/routes/hierarchy.rb +19 -0
  134. data/lib/arclight/routes.rb +8 -0
  135. data/lib/arclight/traject/ead2_component_config.rb +292 -0
  136. data/lib/arclight/traject/ead2_config.rb +66 -287
  137. data/lib/arclight/version.rb +1 -1
  138. data/lib/arclight/year_range.rb +4 -3
  139. data/lib/arclight.rb +6 -1
  140. data/lib/generators/arclight/install_generator.rb +59 -21
  141. data/lib/generators/arclight/templates/arclight.scss +4 -3
  142. data/lib/generators/arclight/templates/catalog_controller.rb +150 -165
  143. data/lib/generators/arclight/templates/config/locales/arclight.en.yml +53 -0
  144. data/lib/generators/arclight/templates/config/repositories.yml +20 -27
  145. data/lib/tasks/index.rake +14 -17
  146. data/package.json +11 -13
  147. data/solr/conf/schema.xml +42 -38
  148. data/solr/conf/solrconfig.xml +34 -31
  149. data/tasks/arclight.rake +8 -7
  150. data/template.rb +1 -2
  151. metadata +147 -120
  152. data/.babelrc +0 -3
  153. data/app/assets/javascripts/arclight/collection_navigation.js +0 -100
  154. data/app/assets/javascripts/arclight/collection_scrollspy.js +0 -6
  155. data/app/assets/javascripts/arclight/context_navigation.js +0 -351
  156. data/app/assets/javascripts/arclight/truncator.js.erb +0 -29
  157. data/app/assets/stylesheets/arclight/bootstrap_overrides.scss +0 -26
  158. data/app/assets/stylesheets/arclight/modules/context_navigation.scss +0 -75
  159. data/app/controllers/concerns/arclight/field_config_helpers.rb +0 -102
  160. data/app/factories/blacklight_field_configuration_factory.rb +0 -30
  161. data/app/views/arclight/repositories/_in_person_repository.html.erb +0 -19
  162. data/app/views/arclight/repositories/_repository_contact.html.erb +0 -9
  163. data/app/views/arclight/viewers/_oembed.html.erb +0 -8
  164. data/app/views/catalog/_access_contents.html.erb +0 -15
  165. data/app/views/catalog/_arclight_abstract_or_scope.html.erb +0 -5
  166. data/app/views/catalog/_arclight_bookmark_control.html.erb +0 -38
  167. data/app/views/catalog/_arclight_document_header_icon.html.erb +0 -1
  168. data/app/views/catalog/_arclight_document_index_header.html.erb +0 -13
  169. data/app/views/catalog/_arclight_document_index_header_hierarchy_default.html.erb +0 -0
  170. data/app/views/catalog/_arclight_document_index_header_online_contents_default.html.erb +0 -0
  171. data/app/views/catalog/_arclight_index_compact_default.html.erb +0 -22
  172. data/app/views/catalog/_arclight_index_default.html.erb +0 -45
  173. data/app/views/catalog/_arclight_index_group_document_compact_default.html.erb +0 -19
  174. data/app/views/catalog/_arclight_index_group_document_default.html.erb +0 -18
  175. data/app/views/catalog/_arclight_online_content_indicator.html.erb +0 -3
  176. data/app/views/catalog/_arclight_rangelimit.html.erb +0 -24
  177. data/app/views/catalog/_arclight_viewer_default.html.erb +0 -1
  178. data/app/views/catalog/_collection_contents.html.erb +0 -4
  179. data/app/views/catalog/_collection_context.html.erb +0 -15
  180. data/app/views/catalog/_collection_context_nav.html.erb +0 -12
  181. data/app/views/catalog/_collection_online_contents.html.erb +0 -17
  182. data/app/views/catalog/_component_context.html.erb +0 -5
  183. data/app/views/catalog/_containers.html.erb +0 -3
  184. data/app/views/catalog/_context_card.html.erb +0 -27
  185. data/app/views/catalog/_context_sidebar.html.erb +0 -8
  186. data/app/views/catalog/_custom_metadata.html.erb +0 -16
  187. data/app/views/catalog/_document_downloads.html.erb +0 -14
  188. data/app/views/catalog/_group_header_compact_default.html.erb +0 -15
  189. data/app/views/catalog/_group_header_default.html.erb +0 -20
  190. data/app/views/catalog/_home.html.erb +0 -1
  191. data/app/views/catalog/_index_breadcrumb_default.html.erb +0 -6
  192. data/app/views/catalog/_index_collection_context_default.html.erb +0 -53
  193. data/app/views/catalog/_index_default.html.erb +0 -17
  194. data/app/views/catalog/_index_header.html.erb +0 -7
  195. data/app/views/catalog/_index_header_online_contents_default.html.erb +0 -1
  196. data/app/views/catalog/_index_online_contents_default.html.erb +0 -6
  197. data/app/views/catalog/_online_content_label.html.erb +0 -5
  198. data/app/views/catalog/_search_form.html.erb +0 -34
  199. data/app/views/catalog/_search_results.html.erb +0 -28
  200. data/app/views/catalog/_show_actions_box_default.html.erb +0 -27
  201. data/app/views/catalog/_show_breadcrumbs_default.html.erb +0 -6
  202. data/app/views/catalog/_show_collection.html.erb +0 -66
  203. data/app/views/catalog/_show_default.html.erb +0 -70
  204. data/app/views/catalog/_show_upper_metadata_collection.html.erb +0 -1
  205. data/app/views/catalog/_show_upper_metadata_default.html.erb +0 -14
  206. data/app/views/catalog/_sort_and_per_page.html.erb +0 -8
  207. data/app/views/catalog/_within_collection_dropdown.html.erb +0 -26
  208. data/app/views/layouts/catalog_result.html.erb +0 -7
  209. data/app/views/shared/_context_sidebar.html.erb +0 -8
  210. data/app/views/shared/_header_navbar.html.erb +0 -61
  211. data/app/views/shared/_show_breadcrumbs.html.erb +0 -27
  212. data/lib/arclight/viewer.rb +0 -45
  213. data/lib/arclight/viewers/oembed.rb +0 -57
  214. data/solr/conf/scripts.conf +0 -24
  215. data/vendor/assets/javascripts/responsiveTruncator.js +0 -69
  216. data/vendor/assets/javascripts/stickyfill.js +0 -480
data/lib/tasks/index.rake CHANGED
@@ -18,26 +18,23 @@ require 'benchmark'
18
18
  #
19
19
  namespace :arclight do
20
20
  desc 'Index an EAD document, use FILE=<path/to/ead.xml> and REPOSITORY_ID=<myid>'
21
- task :index do
21
+ # We need :environment to have access to the Blacklight confg
22
+ task index: :environment do
22
23
  raise 'Please specify your EAD document, ex. FILE=<path/to/ead.xml>' unless ENV['FILE']
23
24
 
24
- print "Loading #{ENV['FILE']} into index...\n"
25
- solr_url = begin
26
- Blacklight.default_index.connection.base_uri
27
- rescue StandardError
28
- ENV['SOLR_URL'] || 'http://127.0.0.1:8983/solr/blacklight-core'
29
- end
30
- elapsed_time = Benchmark.realtime {
31
- `bundle exec traject -u #{solr_url} -i xml -c #{Arclight::Engine.root}/lib/arclight/traject/ead2_config.rb #{ENV['FILE']}`
32
- }
33
- print "Indexed #{ENV['FILE']} (in #{elapsed_time.round(3)} secs).\n"
25
+ print "Loading #{ENV.fetch('FILE', nil)} into index...\n"
26
+ solr_url = ENV.fetch('SOLR_URL', Blacklight.default_index.connection.base_uri)
27
+ elapsed_time = Benchmark.realtime do
28
+ `bundle exec traject -u #{solr_url} -i xml -c #{Arclight::Engine.root}/lib/arclight/traject/ead2_config.rb #{ENV.fetch('FILE', nil)}`
29
+ end
30
+ print "Indexed #{ENV.fetch('FILE', nil)} (in #{elapsed_time.round(3)} secs).\n"
34
31
  end
35
32
 
36
33
  desc 'Index a directory of EADs, use DIR=<path/to/directory> and REPOSITORY_ID=<myid>'
37
34
  task :index_dir do
38
35
  raise 'Please specify your directory, ex. DIR=<path/to/directory>' unless ENV['DIR']
39
36
 
40
- Dir.glob(File.join(ENV['DIR'], '*.xml')).each do |file|
37
+ Dir.glob(File.join(ENV.fetch('DIR', nil), '*.xml')).each do |file|
41
38
  system("rake arclight:index FILE=#{file}")
42
39
  end
43
40
  end
@@ -46,7 +43,7 @@ namespace :arclight do
46
43
  task :index_url do
47
44
  raise 'Please specify your EAD document, ex. URL=<http[s]://domain/path/to/ead.xml>' unless ENV['URL']
48
45
 
49
- ead = Nokogiri::XML(open(ENV['URL']))
46
+ ead = Nokogiri::XML(open(ENV.fetch('URL', nil)))
50
47
  tmp = Tempfile.new(["#{Time.now.to_i}-", '.xml'], encoding: 'utf-8')
51
48
  begin
52
49
  tmp.write ead
@@ -64,15 +61,15 @@ namespace :arclight do
64
61
  task :index_url_batch do
65
62
  raise 'Please specify your URLs file, ex. BATCH=<path/to/urls.txt>' unless ENV['BATCH']
66
63
 
67
- File.open(ENV['BATCH']).each_line do |l|
64
+ File.open(ENV.fetch('BATCH', nil)).each_line do |l|
68
65
  ENV['URL'] = l.chomp
69
66
  next if ENV['URL'].empty?
70
67
 
71
- unless ENV['URL'] =~ /\A#{URI.regexp(%w[http https])}\z/
72
- puts "Skipping invalid looking url #{ENV['URL']}"
68
+ unless ENV.fetch('URL', nil) =~ /\A#{URI::DEFAULT_PARSER.make_regexp(%w[http https])}\z/
69
+ puts "Skipping invalid looking url #{ENV.fetch('URL', nil)}"
73
70
  next
74
71
  end
75
- puts "Indexing #{ENV['URL']}"
72
+ puts "Indexing #{ENV.fetch('URL', nil)}"
76
73
  Rake::Task['arclight:index_url'].invoke
77
74
  Rake::Task['arclight:index_url'].reenable
78
75
  end
data/package.json CHANGED
@@ -1,16 +1,14 @@
1
1
  {
2
2
  "name": "arclight",
3
- "description": "",
4
- "main": "index.js",
5
- "dependencies": {
6
- "@babel/core": "^7.5.5",
7
- "@babel/plugin-external-helpers": "^7.2.0",
8
- "@babel/plugin-transform-modules-umd": "^7.2.0",
9
- "@babel/preset-env": "^7.5.5"
10
- },
3
+ "version": "1.0.0-beta1",
4
+ "description": "The frontend for arclight",
5
+ "main": "app/assets/javascript/arclight/arclight.js",
6
+ "files": [
7
+ "app/assets"
8
+ ],
11
9
  "devDependencies": {
12
- "eslint": "^3.19.0",
13
- "eslint-config-airbnb-base": "^11.1.3",
10
+ "eslint": "^8.26.0",
11
+ "eslint-config-airbnb-base": "^15.0.0",
14
12
  "eslint-plugin-import": "^2.2.0"
15
13
  },
16
14
  "scripts": {
@@ -20,12 +18,12 @@
20
18
  },
21
19
  "repository": {
22
20
  "type": "git",
23
- "url": "git+https://github.com/sul-dlss/arclight.git"
21
+ "url": "git+https://github.com/projectblacklight/arclight.git"
24
22
  },
25
23
  "author": "",
26
24
  "license": "Apache-2.0",
27
25
  "bugs": {
28
- "url": "https://github.com/sul-dlss/arclight/issues"
26
+ "url": "https://github.com/projectblacklight/arclight/issues"
29
27
  },
30
- "homepage": "https://github.com/sul-dlss/arclight#readme"
28
+ "homepage": "https://github.com/projectblacklight/arclight#readme"
31
29
  }
data/solr/conf/schema.xml CHANGED
@@ -150,7 +150,8 @@
150
150
  <analyzer type="index">
151
151
  <tokenizer class="solr.WhitespaceTokenizerFactory" />
152
152
  <filter class="solr.KeywordRepeatFilterFactory" />
153
- <filter class="solr.WordDelimiterGraphFilterFactory"/>
153
+ <filter class="solr.WordDelimiterGraphFilterFactory" />
154
+ <filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" />
154
155
  <filter class="solr.EnglishPossessiveFilterFactory"/>
155
156
  <filter class="solr.ICUFoldingFilterFactory" />
156
157
  <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
@@ -162,7 +163,7 @@
162
163
  <tokenizer class="solr.WhitespaceTokenizerFactory" />
163
164
  <filter class="solr.KeywordRepeatFilterFactory" />
164
165
  <filter class="solr.WordDelimiterGraphFilterFactory"/>
165
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
166
+ <filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" />
166
167
  <filter class="solr.ICUFoldingFilterFactory" />
167
168
  <filter class="solr.EnglishPossessiveFilterFactory"/>
168
169
  <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
@@ -190,7 +191,6 @@
190
191
  catenateAll="1"
191
192
  />
192
193
  <filter class="solr.ICUFoldingFilterFactory" />
193
- <filter class="solr.WordDelimiterGraphFilterFactory"/>
194
194
  </analyzer>
195
195
  </fieldType>
196
196
 
@@ -244,8 +244,8 @@
244
244
  </analyzer>
245
245
  </fieldType>
246
246
 
247
- <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
248
- <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
247
+ <!-- A specialized field for geospatial search filters and distance sorting. -->
248
+ <fieldType name="location" class="solr.LatLonPointSpatialField" docValues="true" />
249
249
 
250
250
  <fieldType name="_nest_path_" class="solr.NestPathField" />
251
251
 
@@ -280,9 +280,9 @@
280
280
  <field name="id" type="string" indexed="true" stored="true" required="true" />
281
281
  <field name="_version_" type="plong" indexed="true" stored="true" multiValued="false" />
282
282
  <field name="timestamp" type="pdate" indexed="true" stored="true" default="NOW" multiValued="false"/>
283
- <!-- default, catch all search field -->
283
+ <!-- default, catch all search field, also used for search term highlighting (requires stored="true") -->
284
284
  <field name="text" type="text" indexed="true" stored="true" multiValued="true"/>
285
- <field name="unitid_identifier_match" type="identifier_match" indexed="true" multiValued="true" />
285
+ <field name="unitid_identifier_match" type="identifier_match" indexed="true" stored="false" multiValued="true" />
286
286
 
287
287
  <field name="_root_" type="string" indexed="true" stored="true" docValues="false" />
288
288
  <field name="_nest_parent_" type="string" indexed="true" stored="true"/>
@@ -307,7 +307,9 @@
307
307
  unknown fields indexed and/or stored by default -->
308
308
  <!--dynamicField name="*" type="ignored" multiValued="true" /-->
309
309
 
310
+ <!-- To play nice with atomic updates, only use non-stored fields for copyFields -->
310
311
  <dynamicField name="*_tesim" type="text_en" stored="true" indexed="true" multiValued="true" />
312
+ <dynamicField name="*_tesm" type="text_en" stored="true" indexed="false" multiValued="true" />
311
313
  <dynamicField name="*_teim" type="text_en" stored="false" indexed="true" multiValued="true" />
312
314
  <dynamicField name="*_si" type="string" stored="false" indexed="true" multiValued="false" />
313
315
  <dynamicField name="*_sim" type="string" stored="false" indexed="true" multiValued="true" />
@@ -315,7 +317,9 @@
315
317
  <dynamicField name="*_ssi" type="string" stored="true" indexed="true" multiValued="false" />
316
318
  <dynamicField name="*_ssim" type="string" stored="true" indexed="true" multiValued="true" />
317
319
  <dynamicField name="*_isim" type="pint" stored="true" indexed="true" multiValued="true" />
320
+ <dynamicField name="*_is" type="pint" stored="true" indexed="false" multiValued="false" />
318
321
  <dynamicField name="*_ii" type="pint" stored="false" indexed="true" multiValued="false" />
322
+ <dynamicField name="*_isi" type="pint" stored="true" indexed="true" multiValued="false" />
319
323
  </fields>
320
324
 
321
325
  <!-- Field to use to determine and enforce document uniqueness.
@@ -330,42 +334,42 @@
330
334
  <!-- Copy Fields -->
331
335
 
332
336
  <!-- field-based searches -->
333
- <copyField source="normalized_title_ssm" dest="title_tesim"/>
334
- <copyField source="places_ssm" dest="place_tesim"/>
335
- <copyField source="names_ssim" dest="name_tesim"/>
336
- <copyField source="access_subjects_ssim" dest="subject_tesim"/>
337
+ <copyField source="normalized_title_ssm" dest="normalized_title_teim"/>
338
+ <copyField source="places_ssim" dest="place_teim"/>
339
+ <copyField source="names_ssim" dest="name_teim"/>
340
+ <copyField source="access_subjects_ssim" dest="subject_teim"/>
337
341
 
338
342
  <!-- The catch all `text` field -->
339
343
  <!-- grab the fielded searches -->
340
344
  <copyField source="normalized_title_ssm" dest="text" />
341
- <copyField source="places_ssm" dest="text" />
345
+ <copyField source="places_ssim" dest="text" />
342
346
  <copyField source="names_ssim" dest="text" />
343
347
  <copyField source="access_subjects_ssim" dest="text" />
344
348
  <!-- grab the searchable notes -->
345
- <copyField source="abstract_teim" dest="text" />
346
- <copyField source="accessrestricct_teim" dest="text" />
347
- <copyField source="accruals_teim" dest="text" />
348
- <copyField source="acqinfo_teim" dest="text" />
349
- <copyField source="altformavail_teim" dest="text" />
350
- <copyField source="appraisal_teim" dest="text" />
351
- <copyField source="arrangement_teim" dest="text" />
352
- <copyField source="bibliography_teim" dest="text" />
353
- <copyField source="bioghist_teim" dest="text" />
354
- <copyField source="custodhist_teim" dest="text" />
355
- <copyField source="did_note_teim" dest="text" />
356
- <copyField source="fileplan_teim" dest="text" />
357
- <copyField source="materialspec_teim" dest="text" />
358
- <copyField source="note_teim" dest="text" />
359
- <copyField source="odd_teim" dest="text" />
360
- <copyField source="originalsloc_teim" dest="text" />
361
- <copyField source="physdesc_teim" dest="text" />
362
- <copyField source="physloc_teim" dest="text" />
363
- <copyField source="phystech_teim" dest="text" />
364
- <copyField source="processinfo_teim" dest="text" />
365
- <copyField source="relatedmaterial_teim" dest="text" />
366
- <copyField source="scopecontent_teim" dest="text" />
367
- <copyField source="separatedmaterial_teim" dest="text" />
368
- <copyField source="userestrict_teim" dest="text" />
349
+ <copyField source="abstract_tesim" dest="text" />
350
+ <copyField source="accessrestricct_tesim" dest="text" />
351
+ <copyField source="accruals_tesim" dest="text" />
352
+ <copyField source="acqinfo_tesim" dest="text" />
353
+ <copyField source="altformavail_tesim" dest="text" />
354
+ <copyField source="appraisal_tesim" dest="text" />
355
+ <copyField source="arrangement_tesim" dest="text" />
356
+ <copyField source="bibliography_tesim" dest="text" />
357
+ <copyField source="bioghist_tesim" dest="text" />
358
+ <copyField source="custodhist_tesim" dest="text" />
359
+ <copyField source="did_note_tesim" dest="text" />
360
+ <copyField source="fileplan_tesim" dest="text" />
361
+ <copyField source="materialspec_tesim" dest="text" />
362
+ <copyField source="note_tesim" dest="text" />
363
+ <copyField source="odd_tesim" dest="text" />
364
+ <copyField source="originalsloc_tesim" dest="text" />
365
+ <copyField source="physdesc_tesim" dest="text" />
366
+ <copyField source="physloc_tesim" dest="text" />
367
+ <copyField source="phystech_tesim" dest="text" />
368
+ <copyField source="processinfo_tesim" dest="text" />
369
+ <copyField source="relatedmaterial_tesim" dest="text" />
370
+ <copyField source="scopecontent_tesim" dest="text" />
371
+ <copyField source="separatedmaterial_tesim" dest="text" />
372
+ <copyField source="userestrict_tesim" dest="text" />
369
373
  <!-- grab structured data that's important -->
370
374
  <copyField source="unitid_ssm" dest="text" />
371
375
  <copyField source="unitid_ssm" dest="unitid_identifier_match" />
@@ -381,9 +385,9 @@
381
385
 
382
386
  <!-- for suggestions -->
383
387
  <copyField source="normalized_title_ssm" dest="suggest"/>
384
- <copyField source="collection_sim" dest="suggest"/>
388
+ <copyField source="collection_ssim" dest="suggest"/>
385
389
  <copyField source="names_ssim" dest="suggest"/>
386
- <copyField source="repository_sim" dest="suggest"/>
390
+ <copyField source="repository_ssim" dest="suggest"/>
387
391
  <copyField source="places_ssim" dest="suggest"/>
388
392
  <copyField source="access_subjects_ssim" dest="suggest"/>
389
393
 
@@ -30,6 +30,7 @@
30
30
  -->
31
31
  <luceneMatchVersion>8.2.0</luceneMatchVersion>
32
32
 
33
+ <lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
33
34
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
34
35
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
35
36
 
@@ -87,45 +88,49 @@
87
88
  <str name="qf">
88
89
  collection_title_tesim^150
89
90
  title_tesim^100
90
- name_tesim^10
91
- place_tesim^10
92
- unitid_identifier_match^5
93
- subject_tesim^2
91
+ normalized_title_teim^100
92
+ unitid_identifier_match^40
93
+ name_teim^10
94
+ place_teim^10
95
+ subject_teim^2
94
96
  text
95
97
  </str>
96
98
  <str name="pf">
97
99
  collection_title_tesim^150
98
100
  title_tesim^100
99
- name_tesim^10
100
- place_tesim^10
101
- unitid_identifier_match^5
102
- subject_tesim^2
101
+ normalized_title_teim^100
102
+ unitid_identifier_match^40
103
+ name_teim^10
104
+ place_teim^10
105
+ subject_teim^2
103
106
  text
104
107
  </str>
105
108
 
106
109
  <str name="qf_name">
107
- name_tesim
110
+ name_teim
108
111
  </str>
109
112
  <str name="pf_name">
110
- name_tesim
113
+ name_teim
111
114
  </str>
112
115
  <str name="qf_place">
113
- place_tesim
116
+ place_teim
114
117
  </str>
115
118
  <str name="pf_place">
116
- place_tesim
119
+ place_teim
117
120
  </str>
118
121
  <str name="qf_subject">
119
- subject_tesim
122
+ subject_teim
120
123
  </str>
121
124
  <str name="pf_subject">
122
- subject_tesim
125
+ subject_teim
123
126
  </str>
124
127
  <str name="qf_title">
125
128
  title_tesim
129
+ normalized_title_teim
126
130
  </str>
127
131
  <str name="pf_title">
128
132
  title_tesim
133
+ normalized_title_teim
129
134
  </str>
130
135
 
131
136
  <int name="ps">3</int>
@@ -134,20 +139,18 @@
134
139
  <str name="fl">
135
140
  id,
136
141
  score,
137
- abstract_ssm,
138
- accessrestrict_ssm,
139
- child_component_count_isim,
140
- collection_ssm,
141
- collection_unitid_ssm,
142
+ abstract_html_tesm,
143
+ accessrestrict_html_tesm,
144
+ child_component_count_isi,
142
145
  containers_ssim,
143
146
  creator_ssm,
144
147
  extent_ssm,
145
148
  geogname_ssm,
146
149
  has_online_content_ssim,
147
- language_ssm,
150
+ language_ssim,
148
151
  level_ssm,
149
152
  repository_ssm,
150
- scopecontent_ssm,
153
+ scopecontent_html_tesm,
151
154
  title_ssm,
152
155
  normalized_title_ssm,
153
156
  normalized_date_ssm,
@@ -157,22 +160,22 @@
157
160
  ead_ssi,
158
161
  ref_ssm,
159
162
  component_level_isim,
160
- parent_access_restrict_ssm,
161
- parent_access_terms_ssm,
163
+ parent_access_restrict_tesm,
164
+ parent_access_terms_tesm,
162
165
  names_coll_ssim
163
166
  places_ssim
164
167
  </str>
165
168
 
166
169
  <str name="facet">true</str>
167
170
  <str name="facet.mincount">1</str>
168
- <str name="facet.field">level_sim</str>
169
- <str name="facet.field">creator_sim</str>
170
- <str name="facet.field">date_range_sim</str>
171
- <str name="facet.field">names_sim</str>
172
- <str name="facet.field">geogname_sim</str>
173
- <str name="facet.field">access_subjects_sim</str>
174
- <str name="facet.field">repository_sim</str>
175
- <str name="facet.field">collection_sim</str>
171
+ <str name="facet.field">level_ssim</str>
172
+ <str name="facet.field">creator_ssim</str>
173
+ <str name="facet.field">date_range_ssim</str>
174
+ <str name="facet.field">names_ssim</str>
175
+ <str name="facet.field">geogname_ssim</str>
176
+ <str name="facet.field">access_subjects_ssim</str>
177
+ <str name="facet.field">repository_ssim</str>
178
+ <str name="facet.field">collection_ssim</str>
176
179
 
177
180
  <str name="spellcheck">true</str>
178
181
  <str name="spellcheck.dictionary">default</str>
data/tasks/arclight.rake CHANGED
@@ -56,16 +56,17 @@ namespace :arclight do
56
56
  desc 'Seed fixture data to Solr'
57
57
  task :seed do
58
58
  puts 'Seeding index with data from spec/fixtures/ead...'
59
- Dir.glob('spec/fixtures/ead/*.xml').each do |file|
60
- system("FILE=#{file} rake arclight:index") # no REPOSITORY_ID
61
- end
62
59
  Dir.glob('spec/fixtures/ead/*').each do |dir|
63
60
  next unless File.directory?(dir)
64
61
 
65
- system("REPOSITORY_ID=#{File.basename(dir)} " \
66
- 'REPOSITORY_FILE=spec/fixtures/config/repositories.yml ' \
67
- "DIR=#{dir} " \
68
- 'rake arclight:index_dir')
62
+ within_test_app do
63
+ # Sets the REPOSITORY_ID to the name of the file's containing directory
64
+ system("REPOSITORY_ID=#{File.basename(dir)} " \
65
+ "REPOSITORY_FILE=#{Arclight::Engine.root}/spec/fixtures/config/repositories.yml " \
66
+ "DIR=#{Arclight::Engine.root}/#{dir} " \
67
+ 'SOLR_URL=http://127.0.0.1:8983/solr/blacklight-core ' \
68
+ 'rake arclight:index_dir')
69
+ end
69
70
  end
70
71
  end
71
72
  end
data/template.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- gem 'arclight', github: 'sul-dlss/arclight'
4
- gem 'blacklight_range_limit', '~> 7.1'
3
+ gem 'arclight'
5
4
 
6
5
  run 'bundle install'
7
6