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.
- checksums.yaml +4 -4
- data/.eslintrc +11 -4
- data/.github/workflows/ruby.yml +24 -8
- data/.rspec +0 -1
- data/.rubocop.yml +289 -3
- data/.rubocop_todo.yml +64 -76
- data/CONTRIBUTING.md +5 -5
- data/Gemfile +15 -10
- data/README.md +18 -12
- data/app/assets/javascripts/arclight/arclight.js +3 -7
- data/app/assets/javascripts/arclight/oembed_viewer.js +64 -39
- data/app/assets/javascripts/arclight/truncate_controller.js +27 -0
- data/app/assets/stylesheets/arclight/application.scss +1 -5
- data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +104 -130
- data/app/assets/stylesheets/arclight/modules/icons.scss +14 -3
- data/app/assets/stylesheets/arclight/modules/layout.scss +121 -100
- data/app/assets/stylesheets/arclight/modules/mastheads.scss +15 -57
- data/app/assets/stylesheets/arclight/modules/repositories.scss +2 -2
- data/app/assets/stylesheets/arclight/modules/repository_card.scss +4 -48
- data/app/assets/stylesheets/arclight/modules/search_results.scss +86 -35
- data/app/assets/stylesheets/arclight/modules/show_collection.scss +5 -32
- data/app/assets/stylesheets/arclight/modules/truncator.scss +56 -0
- data/app/assets/stylesheets/arclight/variables.scss +7 -4
- data/app/components/arclight/access_component.html.erb +14 -0
- data/app/components/arclight/access_component.rb +25 -0
- data/app/components/arclight/bookmark_component.html.erb +25 -0
- data/app/components/arclight/bookmark_component.rb +9 -0
- data/app/components/arclight/breadcrumb_component.rb +40 -0
- data/app/components/arclight/breadcrumbs_hierarchy_component.html.erb +34 -0
- data/app/components/arclight/breadcrumbs_hierarchy_component.rb +25 -0
- data/app/components/arclight/collection_context_component.html.erb +12 -0
- data/app/components/arclight/collection_context_component.rb +27 -0
- data/app/components/arclight/collection_info_component.html.erb +28 -0
- data/app/components/arclight/collection_info_component.rb +26 -0
- data/app/components/arclight/collection_sidebar_component.html.erb +15 -0
- data/app/components/arclight/collection_sidebar_component.rb +41 -0
- data/app/{views/catalog/_search_results_repository.html.erb → components/arclight/constraints_component.html.erb} +2 -1
- data/app/components/arclight/constraints_component.rb +17 -0
- data/app/components/arclight/document_collection_context_component.html.erb +29 -0
- data/app/components/arclight/document_collection_context_component.rb +28 -0
- data/app/components/arclight/document_collection_hierarchy_component.html.erb +46 -0
- data/app/components/arclight/document_collection_hierarchy_component.rb +62 -0
- data/app/components/arclight/document_component.html.erb +39 -0
- data/app/components/arclight/document_component.rb +49 -0
- data/app/components/arclight/document_components_hierarchy_component.html.erb +32 -0
- data/app/components/arclight/document_components_hierarchy_component.rb +28 -0
- data/app/components/arclight/document_download_component.html.erb +24 -0
- data/app/components/arclight/document_download_component.rb +71 -0
- data/app/components/arclight/embed_component.html.erb +10 -0
- data/app/components/arclight/embed_component.rb +43 -0
- data/app/components/arclight/group_component.html.erb +30 -0
- data/app/components/arclight/group_component.rb +23 -0
- data/app/components/arclight/header_component.html.erb +5 -0
- data/app/components/arclight/header_component.rb +10 -0
- data/app/components/arclight/index_metadata_field_component.html.erb +17 -0
- data/app/components/arclight/index_metadata_field_component.rb +20 -0
- data/app/components/arclight/masthead_component.html.erb +15 -0
- data/app/components/arclight/masthead_component.rb +10 -0
- data/app/components/arclight/metadata_section_component.html.erb +13 -0
- data/app/components/arclight/metadata_section_component.rb +22 -0
- data/app/components/arclight/oembed_viewer_component.html.erb +5 -0
- data/app/components/arclight/oembed_viewer_component.rb +16 -0
- data/app/components/arclight/online_content_filter_component.html.erb +15 -0
- data/app/components/arclight/online_content_filter_component.rb +19 -0
- data/app/components/arclight/online_status_indicator_component.rb +19 -0
- data/app/components/arclight/repository_breadcrumb_component.html.erb +10 -0
- data/app/components/arclight/repository_breadcrumb_component.rb +17 -0
- data/app/components/arclight/repository_location_component.html.erb +20 -0
- data/app/components/arclight/repository_location_component.rb +10 -0
- data/app/components/arclight/search_bar_component.html.erb +25 -0
- data/app/components/arclight/search_bar_component.rb +32 -0
- data/app/components/arclight/search_result_breadcrumbs_component.html.erb +3 -0
- data/app/components/arclight/search_result_breadcrumbs_component.rb +37 -0
- data/app/components/arclight/search_result_component.html.erb +20 -0
- data/app/components/arclight/search_result_component.rb +24 -0
- data/app/components/arclight/search_result_title_component.html.erb +13 -0
- data/app/components/arclight/search_result_title_component.rb +15 -0
- data/app/components/arclight/sidebar_component.html.erb +9 -0
- data/app/components/arclight/sidebar_component.rb +19 -0
- data/app/components/arclight/upper_metadata_layout_component.rb +10 -0
- data/app/components/blacklight/icons/bookmark_component.rb +12 -0
- data/app/components/blacklight/icons/collection_component.rb +14 -0
- data/app/components/blacklight/icons/compact_component.rb +12 -0
- data/app/components/blacklight/icons/container_component.rb +14 -0
- data/app/components/blacklight/icons/ead_component.rb +12 -0
- data/app/components/blacklight/icons/file_component.rb +14 -0
- data/app/components/blacklight/icons/folder_component.rb +12 -0
- data/app/components/blacklight/icons/online_component.rb +15 -0
- data/app/components/blacklight/icons/pdf_component.rb +12 -0
- data/app/components/blacklight/icons/repository_component.rb +12 -0
- data/app/controllers/arclight/repositories_controller.rb +4 -4
- data/app/{controllers/concerns → helpers}/arclight/ead_format_helpers.rb +4 -7
- data/app/helpers/arclight/field_config_helpers.rb +26 -0
- data/app/helpers/arclight_helper.rb +16 -254
- data/app/models/arclight/document_downloads.rb +12 -15
- data/app/models/arclight/parent.rb +5 -0
- data/app/models/arclight/parents.rb +2 -1
- data/app/models/arclight/requests/aeon_external_request.rb +1 -1
- data/app/models/arclight/requests/aeon_web_ead.rb +8 -3
- data/app/models/arclight/requests/google_form.rb +8 -3
- data/app/models/concerns/arclight/catalog.rb +25 -15
- data/app/models/concerns/arclight/search_behavior.rb +12 -26
- data/app/models/concerns/arclight/solr_document.rb +70 -73
- data/app/presenters/arclight/show_presenter.rb +34 -7
- data/app/views/arclight/_requests.html.erb +2 -2
- data/app/views/arclight/repositories/_repository.html.erb +21 -40
- data/app/views/arclight/repositories/index.html.erb +3 -1
- data/app/views/arclight/repositories/show.html.erb +4 -6
- data/app/views/arclight/requests/_aeon_external_request_endpoint.html.erb +4 -5
- data/app/views/arclight/requests/_aeon_web_ead.html.erb +3 -4
- data/app/views/arclight/requests/_google_form.html.erb +4 -6
- data/app/views/catalog/_group.html.erb +1 -18
- data/app/views/catalog/_group_toggle.html.erb +1 -1
- data/app/views/catalog/_search_results_header.html.erb +3 -0
- data/app/views/catalog/hierarchy.html.erb +19 -0
- data/app/views/catalog/index.html.erb +16 -7
- data/app/views/shared/_breadcrumbs.html.erb +2 -14
- data/app/views/shared/_main_menu_links.html.erb +1 -1
- data/arclight.gemspec +13 -11
- data/config/breadcrumbs.rb +24 -0
- data/config/i18n-tasks.yml +9 -8
- data/config/importmap.rb +3 -0
- data/config/locales/arclight.en.yml +31 -30
- data/config/routes.rb +1 -1
- data/docker-compose.yml +16 -0
- data/lib/arclight/digital_object.rb +2 -1
- data/lib/arclight/engine.rb +18 -37
- data/lib/arclight/exceptions.rb +1 -0
- data/lib/arclight/hash_absolute_xpath.rb +2 -1
- data/lib/arclight/normalized_id.rb +2 -0
- data/lib/arclight/normalized_title.rb +2 -0
- data/lib/arclight/repository.rb +45 -56
- data/lib/arclight/routes/hierarchy.rb +19 -0
- data/lib/arclight/routes.rb +8 -0
- data/lib/arclight/traject/ead2_component_config.rb +292 -0
- data/lib/arclight/traject/ead2_config.rb +66 -287
- data/lib/arclight/version.rb +1 -1
- data/lib/arclight/year_range.rb +4 -3
- data/lib/arclight.rb +6 -1
- data/lib/generators/arclight/install_generator.rb +59 -21
- data/lib/generators/arclight/templates/arclight.scss +4 -3
- data/lib/generators/arclight/templates/catalog_controller.rb +150 -165
- data/lib/generators/arclight/templates/config/locales/arclight.en.yml +53 -0
- data/lib/generators/arclight/templates/config/repositories.yml +20 -27
- data/lib/tasks/index.rake +14 -17
- data/package.json +11 -13
- data/solr/conf/schema.xml +42 -38
- data/solr/conf/solrconfig.xml +34 -31
- data/tasks/arclight.rake +8 -7
- data/template.rb +1 -2
- metadata +147 -120
- data/.babelrc +0 -3
- data/app/assets/javascripts/arclight/collection_navigation.js +0 -100
- data/app/assets/javascripts/arclight/collection_scrollspy.js +0 -6
- data/app/assets/javascripts/arclight/context_navigation.js +0 -351
- data/app/assets/javascripts/arclight/truncator.js.erb +0 -29
- data/app/assets/stylesheets/arclight/bootstrap_overrides.scss +0 -26
- data/app/assets/stylesheets/arclight/modules/context_navigation.scss +0 -75
- data/app/controllers/concerns/arclight/field_config_helpers.rb +0 -102
- data/app/factories/blacklight_field_configuration_factory.rb +0 -30
- data/app/views/arclight/repositories/_in_person_repository.html.erb +0 -19
- data/app/views/arclight/repositories/_repository_contact.html.erb +0 -9
- data/app/views/arclight/viewers/_oembed.html.erb +0 -8
- data/app/views/catalog/_access_contents.html.erb +0 -15
- data/app/views/catalog/_arclight_abstract_or_scope.html.erb +0 -5
- data/app/views/catalog/_arclight_bookmark_control.html.erb +0 -38
- data/app/views/catalog/_arclight_document_header_icon.html.erb +0 -1
- data/app/views/catalog/_arclight_document_index_header.html.erb +0 -13
- data/app/views/catalog/_arclight_document_index_header_hierarchy_default.html.erb +0 -0
- data/app/views/catalog/_arclight_document_index_header_online_contents_default.html.erb +0 -0
- data/app/views/catalog/_arclight_index_compact_default.html.erb +0 -22
- data/app/views/catalog/_arclight_index_default.html.erb +0 -45
- data/app/views/catalog/_arclight_index_group_document_compact_default.html.erb +0 -19
- data/app/views/catalog/_arclight_index_group_document_default.html.erb +0 -18
- data/app/views/catalog/_arclight_online_content_indicator.html.erb +0 -3
- data/app/views/catalog/_arclight_rangelimit.html.erb +0 -24
- data/app/views/catalog/_arclight_viewer_default.html.erb +0 -1
- data/app/views/catalog/_collection_contents.html.erb +0 -4
- data/app/views/catalog/_collection_context.html.erb +0 -15
- data/app/views/catalog/_collection_context_nav.html.erb +0 -12
- data/app/views/catalog/_collection_online_contents.html.erb +0 -17
- data/app/views/catalog/_component_context.html.erb +0 -5
- data/app/views/catalog/_containers.html.erb +0 -3
- data/app/views/catalog/_context_card.html.erb +0 -27
- data/app/views/catalog/_context_sidebar.html.erb +0 -8
- data/app/views/catalog/_custom_metadata.html.erb +0 -16
- data/app/views/catalog/_document_downloads.html.erb +0 -14
- data/app/views/catalog/_group_header_compact_default.html.erb +0 -15
- data/app/views/catalog/_group_header_default.html.erb +0 -20
- data/app/views/catalog/_home.html.erb +0 -1
- data/app/views/catalog/_index_breadcrumb_default.html.erb +0 -6
- data/app/views/catalog/_index_collection_context_default.html.erb +0 -53
- data/app/views/catalog/_index_default.html.erb +0 -17
- data/app/views/catalog/_index_header.html.erb +0 -7
- data/app/views/catalog/_index_header_online_contents_default.html.erb +0 -1
- data/app/views/catalog/_index_online_contents_default.html.erb +0 -6
- data/app/views/catalog/_online_content_label.html.erb +0 -5
- data/app/views/catalog/_search_form.html.erb +0 -34
- data/app/views/catalog/_search_results.html.erb +0 -28
- data/app/views/catalog/_show_actions_box_default.html.erb +0 -27
- data/app/views/catalog/_show_breadcrumbs_default.html.erb +0 -6
- data/app/views/catalog/_show_collection.html.erb +0 -66
- data/app/views/catalog/_show_default.html.erb +0 -70
- data/app/views/catalog/_show_upper_metadata_collection.html.erb +0 -1
- data/app/views/catalog/_show_upper_metadata_default.html.erb +0 -14
- data/app/views/catalog/_sort_and_per_page.html.erb +0 -8
- data/app/views/catalog/_within_collection_dropdown.html.erb +0 -26
- data/app/views/layouts/catalog_result.html.erb +0 -7
- data/app/views/shared/_context_sidebar.html.erb +0 -8
- data/app/views/shared/_header_navbar.html.erb +0 -61
- data/app/views/shared/_show_breadcrumbs.html.erb +0 -27
- data/lib/arclight/viewer.rb +0 -45
- data/lib/arclight/viewers/oembed.rb +0 -57
- data/solr/conf/scripts.conf +0 -24
- data/vendor/assets/javascripts/responsiveTruncator.js +0 -69
- 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
|
-
|
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
|
25
|
-
solr_url =
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
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
|
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
|
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
|
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
|
72
|
-
puts "Skipping invalid looking url #{ENV
|
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
|
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
|
-
"
|
4
|
-
"
|
5
|
-
"
|
6
|
-
|
7
|
-
"
|
8
|
-
|
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": "^
|
13
|
-
"eslint-config-airbnb-base": "^
|
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/
|
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/
|
26
|
+
"url": "https://github.com/projectblacklight/arclight/issues"
|
29
27
|
},
|
30
|
-
"homepage": "https://github.com/
|
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.
|
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
|
248
|
-
<fieldType name="location" class="solr.
|
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="
|
334
|
-
<copyField source="
|
335
|
-
<copyField source="names_ssim" dest="
|
336
|
-
<copyField source="access_subjects_ssim" dest="
|
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="
|
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="
|
346
|
-
<copyField source="
|
347
|
-
<copyField source="
|
348
|
-
<copyField source="
|
349
|
-
<copyField source="
|
350
|
-
<copyField source="
|
351
|
-
<copyField source="
|
352
|
-
<copyField source="
|
353
|
-
<copyField source="
|
354
|
-
<copyField source="
|
355
|
-
<copyField source="
|
356
|
-
<copyField source="
|
357
|
-
<copyField source="
|
358
|
-
<copyField source="
|
359
|
-
<copyField source="
|
360
|
-
<copyField source="
|
361
|
-
<copyField source="
|
362
|
-
<copyField source="
|
363
|
-
<copyField source="
|
364
|
-
<copyField source="
|
365
|
-
<copyField source="
|
366
|
-
<copyField source="
|
367
|
-
<copyField source="
|
368
|
-
<copyField source="
|
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="
|
388
|
+
<copyField source="collection_ssim" dest="suggest"/>
|
385
389
|
<copyField source="names_ssim" dest="suggest"/>
|
386
|
-
<copyField source="
|
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
|
|
data/solr/conf/solrconfig.xml
CHANGED
@@ -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
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
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
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
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
|
-
|
110
|
+
name_teim
|
108
111
|
</str>
|
109
112
|
<str name="pf_name">
|
110
|
-
|
113
|
+
name_teim
|
111
114
|
</str>
|
112
115
|
<str name="qf_place">
|
113
|
-
|
116
|
+
place_teim
|
114
117
|
</str>
|
115
118
|
<str name="pf_place">
|
116
|
-
|
119
|
+
place_teim
|
117
120
|
</str>
|
118
121
|
<str name="qf_subject">
|
119
|
-
|
122
|
+
subject_teim
|
120
123
|
</str>
|
121
124
|
<str name="pf_subject">
|
122
|
-
|
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
|
-
|
138
|
-
|
139
|
-
|
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
|
-
|
150
|
+
language_ssim,
|
148
151
|
level_ssm,
|
149
152
|
repository_ssm,
|
150
|
-
|
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
|
-
|
161
|
-
|
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">
|
169
|
-
<str name="facet.field">
|
170
|
-
<str name="facet.field">
|
171
|
-
<str name="facet.field">
|
172
|
-
<str name="facet.field">
|
173
|
-
<str name="facet.field">
|
174
|
-
<str name="facet.field">
|
175
|
-
<str name="facet.field">
|
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
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
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
|