blacklight-spotlight 3.5.0.2 → 3.6.0.beta3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -0
- data/Rakefile +6 -7
- data/app/assets/config/spotlight/manifest.js +1 -0
- data/app/assets/javascripts/spotlight/application.js +9 -14
- data/app/assets/javascripts/spotlight/spotlight.esm.js +7137 -0
- data/app/assets/javascripts/spotlight/spotlight.esm.js.map +1 -0
- data/app/assets/javascripts/spotlight/spotlight.js +7137 -15
- data/app/assets/javascripts/spotlight/spotlight.js.map +1 -0
- data/app/assets/stylesheets/spotlight/_browse.scss +1 -1
- data/app/assets/stylesheets/spotlight/_catalog.scss +16 -0
- data/app/assets/stylesheets/spotlight/_spotlight.scss +36 -38
- data/app/assets/stylesheets/spotlight/_variables.scss +0 -21
- data/app/assets/stylesheets/spotlight/browse_group_categories_block.scss +1 -1
- data/app/controllers/concerns/spotlight/base.rb +2 -1
- data/app/controllers/concerns/spotlight/controller.rb +10 -0
- data/app/controllers/spotlight/admin_users_controller.rb +4 -4
- data/app/controllers/spotlight/appearances_controller.rb +6 -6
- data/app/controllers/spotlight/browse_controller.rb +6 -2
- data/app/controllers/spotlight/catalog_controller.rb +25 -16
- data/app/controllers/spotlight/concerns/application_controller.rb +1 -0
- data/app/controllers/spotlight/concerns/catalog_search_context.rb +2 -2
- data/app/controllers/spotlight/contacts_controller.rb +6 -6
- data/app/controllers/spotlight/dashboards_controller.rb +7 -3
- data/app/controllers/spotlight/exhibits_controller.rb +19 -19
- data/app/controllers/spotlight/featured_images_controller.rb +1 -1
- data/app/controllers/spotlight/home_pages_controller.rb +7 -7
- data/app/controllers/spotlight/lock_controller.rb +1 -1
- data/app/controllers/spotlight/metadata_configurations_controller.rb +2 -2
- data/app/controllers/spotlight/pages_controller.rb +4 -3
- data/app/controllers/spotlight/search_configurations_controller.rb +6 -6
- data/app/controllers/spotlight/searches_controller.rb +22 -22
- data/app/controllers/spotlight/solr_controller.rb +1 -1
- data/app/controllers/spotlight/translations_controller.rb +8 -10
- data/app/controllers/spotlight/versions_controller.rb +2 -1
- data/app/helpers/spotlight/application_helper.rb +33 -17
- data/app/helpers/spotlight/crud_link_helpers.rb +12 -2
- data/app/helpers/spotlight/pages_helper.rb +1 -1
- data/app/helpers/spotlight/roles_helper.rb +2 -2
- data/app/helpers/spotlight/title_helper.rb +1 -1
- data/app/helpers/spotlight/translations_helper.rb +1 -3
- data/app/javascript/spotlight/admin/add_another.es6 +24 -0
- data/app/javascript/spotlight/admin/add_image_selector.es6 +38 -0
- data/app/javascript/spotlight/admin/add_new_button.es6 +77 -0
- data/app/javascript/spotlight/admin/appearance.es6 +22 -0
- data/app/javascript/spotlight/admin/blacklight_configuration.es6 +65 -0
- data/app/{assets/javascripts → javascript}/spotlight/admin/block_mixins/autocompleteable.js +8 -8
- data/app/{assets/javascripts → javascript}/spotlight/admin/block_mixins/formable.js +1 -1
- data/app/javascript/spotlight/admin/block_mixins/plustextable.js +58 -0
- data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/block.js +2 -1
- data/app/javascript/spotlight/admin/blocks/browse_block.js +86 -0
- data/app/javascript/spotlight/admin/blocks/browse_group_categories_block.js +88 -0
- data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/iframe_block.js +7 -11
- data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/link_to_search_block.js +0 -2
- data/app/javascript/spotlight/admin/blocks/oembed_block.js +41 -0
- data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/pages_block.js +1 -1
- data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/resources_block.js +45 -42
- data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/rule_block.js +2 -4
- data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/search_result_block.js +7 -9
- data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/solr_documents_base_block.js +22 -22
- data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/solr_documents_block.js +7 -7
- data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/solr_documents_carousel_block.js +14 -15
- data/app/javascript/spotlight/admin/blocks/uploaded_items_block.js +147 -0
- data/app/javascript/spotlight/admin/checkbox_submit.es6 +75 -0
- data/app/javascript/spotlight/admin/copy_email_addresses.es6 +5 -0
- data/app/{assets/javascripts/spotlight/admin/crop.es6 → javascript/spotlight/admin/crop.js} +5 -4
- data/app/javascript/spotlight/admin/croppable.es6 +10 -0
- data/app/{assets/javascripts/spotlight/admin/edit_in_place.js → javascript/spotlight/admin/edit_in_place.es6} +6 -13
- data/app/javascript/spotlight/admin/exhibit_tag_autocomplete.es6 +39 -0
- data/app/javascript/spotlight/admin/exhibits.es6 +59 -0
- data/app/{assets/javascripts/spotlight/admin/form_observer.js → javascript/spotlight/admin/form_observer.es6} +23 -21
- data/app/javascript/spotlight/admin/index.js +85 -0
- data/app/javascript/spotlight/admin/locks.es6 +12 -0
- data/app/{assets/javascripts → javascript}/spotlight/admin/multi_image_selector.js +2 -1
- data/app/javascript/spotlight/admin/pages.es6 +42 -0
- data/app/{assets/javascripts/spotlight/admin/progress_monitor.js → javascript/spotlight/admin/progress_monitor.es6} +5 -9
- data/app/javascript/spotlight/admin/readonly_checkbox.es6 +8 -0
- data/app/{assets/javascripts → javascript}/spotlight/admin/search_typeahead.js +3 -46
- data/app/{assets/javascripts/spotlight/admin/select_related_input.js → javascript/spotlight/admin/select_related_input.es6} +6 -3
- data/app/{assets/javascripts → javascript}/spotlight/admin/sir-trevor/block_controls.js +6 -4
- data/app/{assets/javascripts → javascript}/spotlight/admin/sir-trevor/block_limits.js +2 -0
- data/app/{assets/javascripts → javascript}/spotlight/admin/spotlight_nestable.js +4 -8
- data/app/javascript/spotlight/admin/tabs.es6 +8 -0
- data/app/{assets/javascripts/spotlight/admin/translation_progress.js → javascript/spotlight/admin/translation_progress.es6} +6 -13
- data/app/{assets/javascripts/spotlight/admin/users.js → javascript/spotlight/admin/users.es6} +7 -17
- data/app/javascript/spotlight/admin/visibility_toggle.es6 +23 -0
- data/app/javascript/spotlight/index.js +10 -0
- data/app/javascript/spotlight/spotlight.js +32 -0
- data/app/{assets/javascripts/spotlight/user/browse_group_categories.js → javascript/spotlight/user/browse_group_categories.es6} +4 -13
- data/app/javascript/spotlight/user/carousel.es6 +5 -0
- data/app/{assets/javascripts/spotlight/user/clear_form_button.js → javascript/spotlight/user/clear_form_button.es6} +5 -9
- data/app/javascript/spotlight/user/index.js +15 -0
- data/app/{assets/javascripts/spotlight/user/report_a_problem.js → javascript/spotlight/user/report_a_problem.es6} +6 -15
- data/app/javascript/spotlight/user/zpr_links.es6 +44 -0
- data/app/jobs/spotlight/add_uploads_from_csv.rb +1 -2
- data/app/models/concerns/spotlight/browse_category_search_builder.rb +7 -3
- data/app/models/concerns/spotlight/exhibit_defaults.rb +1 -1
- data/app/models/concerns/spotlight/exhibit_documents.rb +2 -2
- data/app/models/concerns/spotlight/resources/web.rb +1 -1
- data/app/models/concerns/spotlight/solr_document/atomic_updates.rb +1 -1
- data/app/models/concerns/spotlight/solr_document/finder.rb +2 -2
- data/app/models/concerns/spotlight/solr_document.rb +2 -2
- data/app/models/concerns/spotlight/translatables.rb +1 -1
- data/app/models/sir_trevor_rails/blocks/displayable.rb +2 -2
- data/app/models/sir_trevor_rails/blocks/solr_documents_block.rb +17 -6
- data/app/models/spotlight/analytics/ga.rb +5 -5
- data/app/models/spotlight/blacklight_configuration.rb +14 -14
- data/app/models/spotlight/bulk_update.rb +1 -0
- data/app/models/spotlight/contact_email.rb +1 -1
- data/app/models/spotlight/contact_form.rb +1 -1
- data/app/models/spotlight/exhibit.rb +1 -1
- data/app/models/spotlight/featured_image.rb +1 -2
- data/app/models/spotlight/lock.rb +1 -1
- data/app/models/spotlight/main_navigation.rb +1 -5
- data/app/models/spotlight/page.rb +1 -1
- data/app/models/spotlight/resources/iiif_manifest.rb +4 -4
- data/app/models/spotlight/resources/iiif_service.rb +1 -1
- data/app/models/spotlight/resources/upload.rb +3 -6
- data/app/models/spotlight/search.rb +2 -2
- data/app/models/translation.rb +2 -0
- data/app/presenters/spotlight/iiif_manifest_presenter.rb +2 -1
- data/app/services/spotlight/iiif_resource_resolver.rb +10 -10
- data/app/uploaders/spotlight/bulk_updates_uploader.rb +1 -0
- data/app/views/layouts/spotlight/base.html.erb +1 -0
- data/app/views/shared/_analytics.html.erb +10 -9
- data/app/views/shared/_exhibit_navbar.html.erb +6 -1
- data/app/views/spotlight/admin_users/index.html.erb +9 -3
- data/app/views/spotlight/browse/show.html.erb +2 -2
- data/app/views/spotlight/catalog/_admin_header.html.erb +3 -1
- data/app/views/spotlight/catalog/_document_visibility_control.html.erb +21 -2
- data/app/views/spotlight/catalog/_index_compact_default.html.erb +1 -1
- data/app/views/spotlight/exhibits/_confirmation_status.html.erb +3 -1
- data/app/views/spotlight/exhibits/_contact.html.erb +5 -1
- data/app/views/spotlight/shared/_exhibit_sidebar.html.erb +2 -0
- data/app/views/spotlight/shared/_report_a_problem.html.erb +1 -1
- data/app/views/spotlight/sir_trevor/blocks/_search_results_block.html.erb +2 -2
- data/app/views/spotlight/translations/_page.html.erb +6 -1
- data/config/locales/spotlight.en.yml +3 -8
- data/lib/generators/spotlight/install_generator.rb +15 -23
- data/lib/generators/spotlight/scaffold_resource_generator.rb +12 -12
- data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +17 -7
- data/lib/generators/spotlight/templates/solr/conf/_rest_managed.json +3 -0
- data/lib/generators/spotlight/templates/solr/conf/admin-extra.html +31 -0
- data/lib/generators/spotlight/templates/solr/conf/elevate.xml +36 -0
- data/lib/generators/spotlight/templates/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/lib/generators/spotlight/templates/solr/conf/protwords.txt +21 -0
- data/lib/generators/spotlight/templates/solr/{config → conf}/schema.xml +17 -0
- data/lib/generators/spotlight/templates/solr/conf/scripts.conf +24 -0
- data/lib/generators/spotlight/templates/solr/{config → conf}/solrconfig.xml +55 -24
- data/lib/generators/spotlight/templates/solr/conf/spellings.txt +2 -0
- data/lib/generators/spotlight/templates/solr/conf/stopwords.txt +58 -0
- data/lib/generators/spotlight/templates/solr/conf/stopwords_en.txt +58 -0
- data/lib/generators/spotlight/templates/solr/conf/synonyms.txt +31 -0
- data/lib/generators/spotlight/templates/solr/conf/xslt/example.xsl +132 -0
- data/lib/generators/spotlight/templates/solr/conf/xslt/example_atom.xsl +67 -0
- data/lib/generators/spotlight/templates/solr/conf/xslt/example_rss.xsl +66 -0
- data/lib/generators/spotlight/templates/solr/conf/xslt/luke.xsl +337 -0
- data/lib/generators/spotlight/templates/spotlight.js +1 -1
- data/lib/migration/iiif.rb +3 -7
- data/lib/spotlight/engine.rb +39 -27
- data/lib/spotlight/riiif_service.rb +31 -0
- data/lib/spotlight/search_state.rb +19 -0
- data/lib/spotlight/upload_field_config.rb +1 -1
- data/lib/spotlight/version.rb +1 -1
- data/lib/tasks/spotlight_tasks.rake +1 -1
- data/spec/fixtures/iiif_responses.rb +64 -64
- data/vendor/assets/javascripts/nestable.js +1 -1
- data/vendor/assets/javascripts/parameterize.js +2 -2
- data/vendor/assets/javascripts/sir-trevor.js +22460 -20591
- data/vendor/assets/stylesheets/sir-trevor/_icons.scss +0 -0
- data/vendor/assets/stylesheets/sir-trevor/_variables.scss +16 -18
- data/vendor/assets/stylesheets/sir-trevor/base.scss +11 -0
- data/vendor/assets/stylesheets/sir-trevor/block-addition-top.scss +4 -1
- data/vendor/assets/stylesheets/sir-trevor/block-addition.scss +3 -2
- data/vendor/assets/stylesheets/sir-trevor/block-controls.scss +4 -0
- data/vendor/assets/stylesheets/sir-trevor/block-positioner.scss +0 -0
- data/vendor/assets/stylesheets/sir-trevor/block-replacer.scss +0 -0
- data/vendor/assets/stylesheets/sir-trevor/block-ui.scss +10 -0
- data/vendor/assets/stylesheets/sir-trevor/block.scss +19 -5
- data/vendor/assets/stylesheets/sir-trevor/errors.scss +0 -0
- data/vendor/assets/stylesheets/sir-trevor/format-bar.scss +0 -0
- data/vendor/assets/stylesheets/sir-trevor/inputs.scss +0 -0
- data/vendor/assets/stylesheets/sir-trevor/main.scss +0 -0
- data/vendor/assets/stylesheets/sir-trevor/patterns/ui-popup.scss +0 -0
- data/vendor/assets/stylesheets/sir-trevor/utils.scss +0 -0
- metadata +101 -129
- data/app/assets/javascripts/spotlight/admin/add_another.js +0 -22
- data/app/assets/javascripts/spotlight/admin/add_new_button.js +0 -81
- data/app/assets/javascripts/spotlight/admin/appearance.js +0 -24
- data/app/assets/javascripts/spotlight/admin/attachments.js +0 -2
- data/app/assets/javascripts/spotlight/admin/blacklight_configuration.js +0 -63
- data/app/assets/javascripts/spotlight/admin/block_mixins/plustextable.js +0 -57
- data/app/assets/javascripts/spotlight/admin/blocks/browse_block.js +0 -87
- data/app/assets/javascripts/spotlight/admin/blocks/browse_group_categories_block.js +0 -88
- data/app/assets/javascripts/spotlight/admin/blocks/oembed_block.js +0 -40
- data/app/assets/javascripts/spotlight/admin/blocks/uploaded_items_block.js +0 -145
- data/app/assets/javascripts/spotlight/admin/catalog_edit.js +0 -16
- data/app/assets/javascripts/spotlight/admin/copy_email_addresses.js +0 -9
- data/app/assets/javascripts/spotlight/admin/croppable.js +0 -25
- data/app/assets/javascripts/spotlight/admin/exhibit_tag_autocomplete.js +0 -37
- data/app/assets/javascripts/spotlight/admin/exhibits.js +0 -58
- data/app/assets/javascripts/spotlight/admin/index.js +0 -16
- data/app/assets/javascripts/spotlight/admin/locks.js +0 -12
- data/app/assets/javascripts/spotlight/admin/pages.js.erb +0 -40
- data/app/assets/javascripts/spotlight/admin/readonly_checkbox.js +0 -6
- data/app/assets/javascripts/spotlight/admin/tabs.js +0 -6
- data/app/assets/javascripts/spotlight/user/analytics.js +0 -9
- data/app/assets/javascripts/spotlight/user/carousel.js +0 -3
- data/app/assets/javascripts/spotlight/user/index.js +0 -8
- data/app/assets/javascripts/spotlight/user/zpr_links.js.erb +0 -45
- data/vendor/assets/javascripts/MutationObserver.js +0 -625
- data/vendor/assets/javascripts/eventable.js +0 -205
- data/vendor/assets/javascripts/polyfill.min.js +0 -4
- /data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/solr_documents_embed_block.js +0 -0
- /data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/solr_documents_features_block.js +0 -0
- /data/app/{assets/javascripts → javascript}/spotlight/admin/blocks/solr_documents_grid_block.js +0 -0
- /data/app/{assets/javascripts/spotlight/admin/iiif.es6 → javascript/spotlight/admin/iiif.js} +0 -0
- /data/app/{assets/javascripts → javascript}/spotlight/admin/sir-trevor/locales.js +0 -0
@@ -10,29 +10,17 @@ module Spotlight
|
|
10
10
|
class_option :solr_update_class, type: :string, default: 'Spotlight::SolrDocument::AtomicUpdates'
|
11
11
|
class_option :mailer_default_url_host, type: :string, default: '' # e.g. localhost:3000
|
12
12
|
|
13
|
-
# we're not
|
13
|
+
# we're not using webpacker, so we need to re-add sprockets functionality
|
14
14
|
def add_js_rails6
|
15
15
|
return unless Rails.version.to_i == 6
|
16
16
|
|
17
|
-
|
18
|
-
gem 'uglifier', '>= 1.3.0'
|
19
|
-
|
20
|
-
append_to_file 'app/assets/config/manifest.js', "\n//= link_directory ../javascripts .js\n"
|
21
|
-
append_to_file 'app/assets/javascripts/application.js', "\n//= require_tree .\n"
|
17
|
+
# By default rails generates javascript_pack_tag, we'll change this to javascript_include_tag
|
22
18
|
gsub_file 'app/views/layouts/application.html.erb', /pack/, 'include'
|
23
|
-
inject_into_file 'config/environments/production.rb', after: ' # config.assets.css_compressor = :sass' do
|
24
|
-
"\n config.assets.js_compressor = :uglifier"
|
25
|
-
end
|
26
|
-
|
27
|
-
# but since webpacker exists in the gemfile, we still need to run the
|
28
|
-
# install before rails will start
|
29
|
-
run 'bundle exec rails webpacker:install'
|
30
19
|
end
|
31
20
|
|
32
|
-
def
|
33
|
-
return unless Rails.version.to_i == 7
|
34
|
-
|
21
|
+
def add_manifest
|
35
22
|
append_to_file 'app/assets/javascripts/application.js', "\n//= require_tree .\n"
|
23
|
+
append_to_file 'app/assets/config/manifest.js', "\n//= link spotlight/manifest.js"
|
36
24
|
end
|
37
25
|
|
38
26
|
def inject_spotlight_routes
|
@@ -67,9 +55,9 @@ module Spotlight
|
|
67
55
|
|
68
56
|
copy_file 'config/sitemap.rb', 'config/sitemap.rb'
|
69
57
|
|
70
|
-
say
|
71
|
-
|
72
|
-
|
58
|
+
say <<~EOS, :red
|
59
|
+
Added a default sitemap_generator configuration in config/sitemap.rb; please
|
60
|
+
update the default host to match your environment
|
73
61
|
EOS
|
74
62
|
end
|
75
63
|
|
@@ -132,14 +120,18 @@ module Spotlight
|
|
132
120
|
end
|
133
121
|
|
134
122
|
def add_osd_viewer
|
135
|
-
|
136
|
-
|
123
|
+
unless Bundler.locked_gems.dependencies.key? 'blacklight-gallery'
|
124
|
+
gem 'blacklight-gallery', '~> 4.0'
|
125
|
+
bundle_install
|
126
|
+
end
|
137
127
|
generate 'blacklight_gallery:install'
|
138
128
|
end
|
139
129
|
|
140
130
|
def add_oembed
|
141
|
-
|
142
|
-
|
131
|
+
unless Bundler.locked_gems.dependencies.key? 'blacklight-oembed'
|
132
|
+
gem 'blacklight-oembed', '~> 1.0'
|
133
|
+
bundle_install
|
134
|
+
end
|
143
135
|
generate 'blacklight_oembed:install'
|
144
136
|
copy_file 'config/initializers/oembed.rb'
|
145
137
|
end
|
@@ -9,7 +9,7 @@ module Spotlight
|
|
9
9
|
source_root File.expand_path('templates', __dir__)
|
10
10
|
|
11
11
|
def create_model
|
12
|
-
create_file "app/models/#{file_name}_resource.rb",
|
12
|
+
create_file "app/models/#{file_name}_resource.rb", <<~FILE
|
13
13
|
class #{class_name}Resource < Spotlight::Resource
|
14
14
|
def self.indexing_pipeline
|
15
15
|
@indexing_pipeline ||= super.dup.tap do |pipeline|
|
@@ -21,7 +21,7 @@ module Spotlight
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def create_controller
|
24
|
-
create_file "app/controllers/#{file_name}_resources_controller.rb",
|
24
|
+
create_file "app/controllers/#{file_name}_resources_controller.rb", <<~FILE
|
25
25
|
class #{class_name}ResourcesController < Spotlight::ResourcesController
|
26
26
|
private
|
27
27
|
|
@@ -33,16 +33,16 @@ module Spotlight
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def create_form
|
36
|
-
create_file "app/views/#{file_name}_resources/_form.html.erb",
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
36
|
+
create_file "app/views/#{file_name}_resources/_form.html.erb", <<~FILE
|
37
|
+
<%= bootstrap_form_for([current_exhibit, @resource.becomes(#{class_name}Resource)], as: :resource) do |f| %>
|
38
|
+
<%= f.text_field :url %>
|
39
|
+
<div class="form-actions">
|
40
|
+
<div class="primary-actions">
|
41
|
+
<%= cancel_link @resource, :back, class: 'btn btn-secondary' %>
|
42
|
+
<%= f.submit t('.add_item'), class: 'btn btn-primary' %>
|
43
|
+
</div>
|
43
44
|
</div>
|
44
|
-
|
45
|
-
<% end if can? :manage, @resource %>
|
45
|
+
<% end if can? :manage, @resource %>
|
46
46
|
FILE
|
47
47
|
end
|
48
48
|
end
|
@@ -54,7 +54,7 @@ module Spotlight
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def create_routes
|
57
|
-
route
|
57
|
+
route <<~FILE
|
58
58
|
resources :exhibits, only: [] do
|
59
59
|
resources :#{file_name}_resources, only: [:create, :update] do
|
60
60
|
end
|
@@ -21,6 +21,9 @@
|
|
21
21
|
# Spotlight::Engine.config.default_browse_index_view_type = :gallery
|
22
22
|
# Spotlight::Engine.config.default_contact_email = nil
|
23
23
|
|
24
|
+
# ==> IIIF configuration
|
25
|
+
# Spotlight::Engine.config.iiif_service = Spotlight::RIIIFService
|
26
|
+
|
24
27
|
# ==> Solr configuration
|
25
28
|
# Spotlight::Engine.config.writable_index = true
|
26
29
|
# Spotlight::Engine.config.solr_batch_size = 20
|
@@ -61,13 +64,20 @@
|
|
61
64
|
# Spotlight::Engine.config.featured_image_square_size = [400, 400]
|
62
65
|
|
63
66
|
# ==> Google Analytics integration
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
67
|
+
# After creating a property for your site on Google Analytics, you need to:
|
68
|
+
# a) register an OAuth service account with access to your analytics property:
|
69
|
+
# (https://github.com/tpitale/legato/wiki/OAuth2-and-Google#registering-for-api-access)
|
70
|
+
# b) download the pkcs12 key and make it accessible to your application
|
71
|
+
# c) set ga_web_property_id below to your site's property id
|
72
|
+
# Rails.application.config.to_prepare do
|
73
|
+
# Spotlight::Engine.config.analytics_provider = Spotlight::Analytics::Ga
|
74
|
+
# Spotlight::Engine.config.ga_pkcs12_key_path = nil
|
75
|
+
# Spotlight::Engine.config.ga_web_property_id = 'G-XXXXXXXXXX'
|
76
|
+
# Spotlight::Engine.config.ga_email = 'test@example.com'
|
77
|
+
# Spotlight::Engine.config.ga_analytics_options = {}
|
78
|
+
# Spotlight::Engine.config.ga_page_analytics_options = Spotlight::Engine.config.ga_analytics_options.merge(limit: 5)
|
79
|
+
# Spotlight::Engine.config.ga_debug_mode = false
|
80
|
+
# end
|
71
81
|
|
72
82
|
# ==> Sir Trevor Widget Configuration
|
73
83
|
# These are set by default by Spotlight's configuration,
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<!--
|
2
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
3
|
+
contributor license agreements. See the NOTICE file distributed with
|
4
|
+
this work for additional information regarding copyright ownership.
|
5
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
6
|
+
(the "License"); you may not use this file except in compliance with
|
7
|
+
the License. You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
16
|
+
-->
|
17
|
+
|
18
|
+
<!-- The content of this page will be statically included into the top
|
19
|
+
of the admin page. Uncomment this as an example to see there the content
|
20
|
+
will show up.
|
21
|
+
|
22
|
+
<hr>
|
23
|
+
<i>This line will appear before the first table</i>
|
24
|
+
<tr>
|
25
|
+
<td colspan="2">
|
26
|
+
This row will be appended to the end of the first table
|
27
|
+
</td>
|
28
|
+
</tr>
|
29
|
+
<hr>
|
30
|
+
|
31
|
+
-->
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
<!--
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
5
|
+
this work for additional information regarding copyright ownership.
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
8
|
+
the License. You may obtain a copy of the License at
|
9
|
+
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
See the License for the specific language governing permissions and
|
16
|
+
limitations under the License.
|
17
|
+
-->
|
18
|
+
|
19
|
+
<!-- If this file is found in the config directory, it will only be
|
20
|
+
loaded once at startup. If it is found in Solr's data
|
21
|
+
directory, it will be re-loaded every commit.
|
22
|
+
-->
|
23
|
+
|
24
|
+
<elevate>
|
25
|
+
<query text="foo bar">
|
26
|
+
<doc id="1" />
|
27
|
+
<doc id="2" />
|
28
|
+
<doc id="3" />
|
29
|
+
</query>
|
30
|
+
|
31
|
+
<query text="ipod">
|
32
|
+
<doc id="MA147LL/A" /> <!-- put the actual ipod at the top -->
|
33
|
+
<doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
|
34
|
+
</query>
|
35
|
+
|
36
|
+
</elevate>
|
@@ -0,0 +1,246 @@
|
|
1
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
2
|
+
# (the "License"); you may not use this file except in compliance with
|
3
|
+
# the License. You may obtain a copy of the License at
|
4
|
+
#
|
5
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
# Syntax:
|
14
|
+
# "source" => "target"
|
15
|
+
# "source".length() > 0 (source cannot be empty.)
|
16
|
+
# "target".length() >= 0 (target can be empty.)
|
17
|
+
|
18
|
+
# example:
|
19
|
+
# "??" => "A"
|
20
|
+
# "\u00C0" => "A"
|
21
|
+
# "\u00C0" => "\u0041"
|
22
|
+
# "??" => "ss"
|
23
|
+
# "\t" => " "
|
24
|
+
# "\n" => ""
|
25
|
+
|
26
|
+
# ?? => A
|
27
|
+
"\u00C0" => "A"
|
28
|
+
|
29
|
+
# ?? => A
|
30
|
+
"\u00C1" => "A"
|
31
|
+
|
32
|
+
# ?? => A
|
33
|
+
"\u00C2" => "A"
|
34
|
+
|
35
|
+
# ?? => A
|
36
|
+
"\u00C3" => "A"
|
37
|
+
|
38
|
+
# ?? => A
|
39
|
+
"\u00C4" => "A"
|
40
|
+
|
41
|
+
# ?? => A
|
42
|
+
"\u00C5" => "A"
|
43
|
+
|
44
|
+
# ?? => AE
|
45
|
+
"\u00C6" => "AE"
|
46
|
+
|
47
|
+
# ?? => C
|
48
|
+
"\u00C7" => "C"
|
49
|
+
|
50
|
+
# ?? => E
|
51
|
+
"\u00C8" => "E"
|
52
|
+
|
53
|
+
# ?? => E
|
54
|
+
"\u00C9" => "E"
|
55
|
+
|
56
|
+
# ?? => E
|
57
|
+
"\u00CA" => "E"
|
58
|
+
|
59
|
+
# ?? => E
|
60
|
+
"\u00CB" => "E"
|
61
|
+
|
62
|
+
# ?? => I
|
63
|
+
"\u00CC" => "I"
|
64
|
+
|
65
|
+
# ?? => I
|
66
|
+
"\u00CD" => "I"
|
67
|
+
|
68
|
+
# ?? => I
|
69
|
+
"\u00CE" => "I"
|
70
|
+
|
71
|
+
# ?? => I
|
72
|
+
"\u00CF" => "I"
|
73
|
+
|
74
|
+
# ?? => IJ
|
75
|
+
"\u0132" => "IJ"
|
76
|
+
|
77
|
+
# ?? => D
|
78
|
+
"\u00D0" => "D"
|
79
|
+
|
80
|
+
# ?? => N
|
81
|
+
"\u00D1" => "N"
|
82
|
+
|
83
|
+
# ?? => O
|
84
|
+
"\u00D2" => "O"
|
85
|
+
|
86
|
+
# ?? => O
|
87
|
+
"\u00D3" => "O"
|
88
|
+
|
89
|
+
# ?? => O
|
90
|
+
"\u00D4" => "O"
|
91
|
+
|
92
|
+
# ?? => O
|
93
|
+
"\u00D5" => "O"
|
94
|
+
|
95
|
+
# ?? => O
|
96
|
+
"\u00D6" => "O"
|
97
|
+
|
98
|
+
# ?? => O
|
99
|
+
"\u00D8" => "O"
|
100
|
+
|
101
|
+
# ?? => OE
|
102
|
+
"\u0152" => "OE"
|
103
|
+
|
104
|
+
# ??
|
105
|
+
"\u00DE" => "TH"
|
106
|
+
|
107
|
+
# ?? => U
|
108
|
+
"\u00D9" => "U"
|
109
|
+
|
110
|
+
# ?? => U
|
111
|
+
"\u00DA" => "U"
|
112
|
+
|
113
|
+
# ?? => U
|
114
|
+
"\u00DB" => "U"
|
115
|
+
|
116
|
+
# ?? => U
|
117
|
+
"\u00DC" => "U"
|
118
|
+
|
119
|
+
# ?? => Y
|
120
|
+
"\u00DD" => "Y"
|
121
|
+
|
122
|
+
# ?? => Y
|
123
|
+
"\u0178" => "Y"
|
124
|
+
|
125
|
+
# ?? => a
|
126
|
+
"\u00E0" => "a"
|
127
|
+
|
128
|
+
# ?? => a
|
129
|
+
"\u00E1" => "a"
|
130
|
+
|
131
|
+
# ?? => a
|
132
|
+
"\u00E2" => "a"
|
133
|
+
|
134
|
+
# ?? => a
|
135
|
+
"\u00E3" => "a"
|
136
|
+
|
137
|
+
# ?? => a
|
138
|
+
"\u00E4" => "a"
|
139
|
+
|
140
|
+
# ?? => a
|
141
|
+
"\u00E5" => "a"
|
142
|
+
|
143
|
+
# ?? => ae
|
144
|
+
"\u00E6" => "ae"
|
145
|
+
|
146
|
+
# ?? => c
|
147
|
+
"\u00E7" => "c"
|
148
|
+
|
149
|
+
# ?? => e
|
150
|
+
"\u00E8" => "e"
|
151
|
+
|
152
|
+
# ?? => e
|
153
|
+
"\u00E9" => "e"
|
154
|
+
|
155
|
+
# ?? => e
|
156
|
+
"\u00EA" => "e"
|
157
|
+
|
158
|
+
# ?? => e
|
159
|
+
"\u00EB" => "e"
|
160
|
+
|
161
|
+
# ?? => i
|
162
|
+
"\u00EC" => "i"
|
163
|
+
|
164
|
+
# ?? => i
|
165
|
+
"\u00ED" => "i"
|
166
|
+
|
167
|
+
# ?? => i
|
168
|
+
"\u00EE" => "i"
|
169
|
+
|
170
|
+
# ?? => i
|
171
|
+
"\u00EF" => "i"
|
172
|
+
|
173
|
+
# ?? => ij
|
174
|
+
"\u0133" => "ij"
|
175
|
+
|
176
|
+
# ?? => d
|
177
|
+
"\u00F0" => "d"
|
178
|
+
|
179
|
+
# ?? => n
|
180
|
+
"\u00F1" => "n"
|
181
|
+
|
182
|
+
# ?? => o
|
183
|
+
"\u00F2" => "o"
|
184
|
+
|
185
|
+
# ?? => o
|
186
|
+
"\u00F3" => "o"
|
187
|
+
|
188
|
+
# ?? => o
|
189
|
+
"\u00F4" => "o"
|
190
|
+
|
191
|
+
# ?? => o
|
192
|
+
"\u00F5" => "o"
|
193
|
+
|
194
|
+
# ?? => o
|
195
|
+
"\u00F6" => "o"
|
196
|
+
|
197
|
+
# ?? => o
|
198
|
+
"\u00F8" => "o"
|
199
|
+
|
200
|
+
# ?? => oe
|
201
|
+
"\u0153" => "oe"
|
202
|
+
|
203
|
+
# ?? => ss
|
204
|
+
"\u00DF" => "ss"
|
205
|
+
|
206
|
+
# ?? => th
|
207
|
+
"\u00FE" => "th"
|
208
|
+
|
209
|
+
# ?? => u
|
210
|
+
"\u00F9" => "u"
|
211
|
+
|
212
|
+
# ?? => u
|
213
|
+
"\u00FA" => "u"
|
214
|
+
|
215
|
+
# ?? => u
|
216
|
+
"\u00FB" => "u"
|
217
|
+
|
218
|
+
# ?? => u
|
219
|
+
"\u00FC" => "u"
|
220
|
+
|
221
|
+
# ?? => y
|
222
|
+
"\u00FD" => "y"
|
223
|
+
|
224
|
+
# ?? => y
|
225
|
+
"\u00FF" => "y"
|
226
|
+
|
227
|
+
# ??? => ff
|
228
|
+
"\uFB00" => "ff"
|
229
|
+
|
230
|
+
# ??? => fi
|
231
|
+
"\uFB01" => "fi"
|
232
|
+
|
233
|
+
# ??? => fl
|
234
|
+
"\uFB02" => "fl"
|
235
|
+
|
236
|
+
# ??? => ffi
|
237
|
+
"\uFB03" => "ffi"
|
238
|
+
|
239
|
+
# ??? => ffl
|
240
|
+
"\uFB04" => "ffl"
|
241
|
+
|
242
|
+
# ??? => ft
|
243
|
+
"\uFB05" => "ft"
|
244
|
+
|
245
|
+
# ??? => st
|
246
|
+
"\uFB06" => "st"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
2
|
+
# (the "License"); you may not use this file except in compliance with
|
3
|
+
# the License. You may obtain a copy of the License at
|
4
|
+
#
|
5
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
#-----------------------------------------------------------------------
|
14
|
+
# Use a protected word file to protect against the stemmer reducing two
|
15
|
+
# unrelated words to the same base word.
|
16
|
+
|
17
|
+
# Some non-words that normally won't be encountered,
|
18
|
+
# just to test that they won't be stemmed.
|
19
|
+
dontstems
|
20
|
+
zwhacky
|
21
|
+
|
@@ -304,6 +304,23 @@
|
|
304
304
|
</analyzer>
|
305
305
|
</fieldType>
|
306
306
|
|
307
|
+
<fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100" >
|
308
|
+
<analyzer>
|
309
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
310
|
+
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
|
311
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
312
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
313
|
+
</analyzer>
|
314
|
+
</fieldType>
|
315
|
+
|
316
|
+
<fieldType name="textSuggest" class="solr.TextField" positionIncrementGap="100">
|
317
|
+
<analyzer>
|
318
|
+
<tokenizer class="solr.KeywordTokenizerFactory"/>
|
319
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
320
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
321
|
+
</analyzer>
|
322
|
+
</fieldType>
|
323
|
+
|
307
324
|
<!-- queries for paths match documents at that path, or in descendent paths -->
|
308
325
|
<fieldType name="descendent_path" class="solr.TextField">
|
309
326
|
<analyzer type="index">
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
# contributor license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright ownership.
|
4
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with
|
6
|
+
# the License. You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
|
16
|
+
user=
|
17
|
+
solr_hostname=localhost
|
18
|
+
solr_port=8983
|
19
|
+
rsyncd_port=18983
|
20
|
+
data_dir=
|
21
|
+
webapp_name=solr
|
22
|
+
master_host=
|
23
|
+
master_data_dir=
|
24
|
+
master_status_dir=
|
@@ -17,10 +17,9 @@
|
|
17
17
|
</updateHandler>
|
18
18
|
|
19
19
|
<!-- solr lib dirs -->
|
20
|
+
<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
|
20
21
|
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
|
21
22
|
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
|
22
|
-
<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
|
23
|
-
<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lucene-libs" />
|
24
23
|
|
25
24
|
<dataDir>${solr.data.dir:}</dataDir>
|
26
25
|
|
@@ -45,13 +44,13 @@
|
|
45
44
|
-->
|
46
45
|
<str name="qf">
|
47
46
|
id
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
full_title_tsim
|
48
|
+
short_title_tsim
|
49
|
+
alternative_title_tsim
|
51
50
|
active_fedora_model_ssi
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
title_tsim
|
52
|
+
author_tsim
|
53
|
+
subject_tsim
|
55
54
|
all_text_timv
|
56
55
|
</str>
|
57
56
|
<str name="pf">
|
@@ -59,20 +58,20 @@
|
|
59
58
|
</str>
|
60
59
|
|
61
60
|
<str name="author_qf">
|
62
|
-
|
61
|
+
author_tsim
|
63
62
|
</str>
|
64
63
|
<str name="author_pf">
|
65
64
|
</str>
|
66
65
|
<str name="title_qf">
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
66
|
+
title_tsim
|
67
|
+
full_title_tsim
|
68
|
+
short_title_tsim
|
69
|
+
alternative_title_tsim
|
71
70
|
</str>
|
72
71
|
<str name="title_pf">
|
73
72
|
</str>
|
74
73
|
<str name="subject_qf">
|
75
|
-
|
74
|
+
subject_tsim
|
76
75
|
</str>
|
77
76
|
<str name="subject_pf">
|
78
77
|
</str>
|
@@ -131,16 +130,6 @@
|
|
131
130
|
</lst>
|
132
131
|
</requestHandler>
|
133
132
|
|
134
|
-
<!-- for requests to get a single document; use id=666 instead of q=id:666 -->
|
135
|
-
<requestHandler name="document" class="solr.SearchHandler" >
|
136
|
-
<lst name="defaults">
|
137
|
-
<str name="echoParams">all</str>
|
138
|
-
<str name="fl">*</str>
|
139
|
-
<str name="rows">1</str>
|
140
|
-
<str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
|
141
|
-
</lst>
|
142
|
-
</requestHandler>
|
143
|
-
|
144
133
|
|
145
134
|
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
146
135
|
<str name="queryAnalyzerFieldType">textSpell</str>
|
@@ -153,8 +142,50 @@
|
|
153
142
|
<str name="spellcheckIndexDir">./spell</str>
|
154
143
|
<str name="buildOnOptimize">true</str>
|
155
144
|
</lst>
|
145
|
+
<lst name="spellchecker">
|
146
|
+
<str name="name">author</str>
|
147
|
+
<str name="field">author_spell</str>
|
148
|
+
<str name="spellcheckIndexDir">./spell_author</str>
|
149
|
+
<str name="accuracy">0.7</str>
|
150
|
+
<str name="buildOnOptimize">true</str>
|
151
|
+
</lst>
|
152
|
+
<lst name="spellchecker">
|
153
|
+
<str name="name">subject</str>
|
154
|
+
<str name="field">subject_spell</str>
|
155
|
+
<str name="spellcheckIndexDir">./spell_subject</str>
|
156
|
+
<str name="accuracy">0.7</str>
|
157
|
+
<str name="buildOnOptimize">true</str>
|
158
|
+
</lst>
|
159
|
+
<lst name="spellchecker">
|
160
|
+
<str name="name">title</str>
|
161
|
+
<str name="field">title_spell</str>
|
162
|
+
<str name="spellcheckIndexDir">./spell_title</str>
|
163
|
+
<str name="accuracy">0.7</str>
|
164
|
+
<str name="buildOnOptimize">true</str>
|
165
|
+
</lst>
|
156
166
|
</searchComponent>
|
157
167
|
|
168
|
+
<searchComponent name="suggest" class="solr.SuggestComponent">
|
169
|
+
<lst name="suggester">
|
170
|
+
<str name="name">mySuggester</str>
|
171
|
+
<str name="lookupImpl">FuzzyLookupFactory</str>
|
172
|
+
<str name="suggestAnalyzerFieldType">textSuggest</str>
|
173
|
+
<str name="buildOnCommit">true</str>
|
174
|
+
<str name="field">suggest</str>
|
175
|
+
</lst>
|
176
|
+
</searchComponent>
|
177
|
+
|
178
|
+
<requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
|
179
|
+
<lst name="defaults">
|
180
|
+
<str name="suggest">true</str>
|
181
|
+
<str name="suggest.count">5</str>
|
182
|
+
<str name="suggest.dictionary">mySuggester</str>
|
183
|
+
</lst>
|
184
|
+
<arr name="components">
|
185
|
+
<str>suggest</str>
|
186
|
+
</arr>
|
187
|
+
</requestHandler>
|
188
|
+
|
158
189
|
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
159
190
|
|
160
191
|
<requestDispatcher handleSelect="true" >
|