blacklight-spotlight 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/concerns/spotlight/solr_document.rb +11 -1
- data/app/models/spotlight/blacklight_configuration.rb +1 -1
- data/app/views/spotlight/roles/_edit_fields.html.erb +1 -1
- data/config/locales/spotlight.en.yml +1 -0
- data/lib/spotlight/version.rb +1 -1
- data/spec/examples.txt +1165 -1148
- data/spec/features/javascript/search_config_admin_spec.rb +1 -0
- data/spec/models/spotlight/blacklight_configuration_spec.rb +8 -0
- data/spec/services/spotlight/solr_document_builder_spec.rb +5 -0
- data/spec/test_app_templates/catalog_controller.rb +2 -2
- metadata +2 -2
@@ -140,6 +140,14 @@ describe Spotlight::BlacklightConfiguration, type: :model do
|
|
140
140
|
expect(subject.blacklight_config.index_fields['c'].list).to be_truthy
|
141
141
|
end
|
142
142
|
|
143
|
+
it 'honors field specfic display settings set in the field configuration' do
|
144
|
+
blacklight_config.add_index_field 'a'
|
145
|
+
blacklight_config.add_index_field 'b', list: false
|
146
|
+
|
147
|
+
expect(subject.blacklight_config.index_fields['a'].list).to be_truthy
|
148
|
+
expect(subject.blacklight_config.index_fields['b'].list).to be_falsey
|
149
|
+
end
|
150
|
+
|
143
151
|
it 'filters upstream fields that are always disabled' do
|
144
152
|
blacklight_config.add_index_field 'a', if: false
|
145
153
|
expect(subject.blacklight_config.index_fields).not_to have_key 'a'
|
@@ -35,6 +35,11 @@ describe Spotlight::SolrDocumentBuilder do
|
|
35
35
|
expect(result).to include "spotlight_exhibit_slug_#{resource_alt.exhibit.slug}_bsi"
|
36
36
|
end
|
37
37
|
|
38
|
+
it 'has a field with both exhibit slugs listed' do
|
39
|
+
result = resource.document_builder.documents_to_index.first
|
40
|
+
expect(result).to include 'spotlight_exhibit_slugs_ssim' => match_array([resource.exhibit.slug, resource_alt.exhibit.slug])
|
41
|
+
end
|
42
|
+
|
38
43
|
it 'creates a sidecar resource for the document' do
|
39
44
|
resource.document_builder.documents_to_index.first
|
40
45
|
|
@@ -87,8 +87,8 @@ class CatalogController < ApplicationController
|
|
87
87
|
config.add_show_field 'corporate_name_ssm', label: 'Corporate Names'
|
88
88
|
|
89
89
|
config.add_search_field 'all_fields', label: 'Everything'
|
90
|
-
config.add_search_field 'title', label: 'Title',
|
91
|
-
config.add_search_field 'author', label: 'Author',
|
90
|
+
config.add_search_field 'title', label: 'Title', solr_parameters: { qf: 'full_title_tesim', pf: 'full_title_tesim' }
|
91
|
+
config.add_search_field 'author', label: 'Author', solr_parameters: { qf: '${qf_author}', pf: '${pf_author}' }
|
92
92
|
|
93
93
|
config.add_sort_field 'relevance', sort: 'score desc, sort_title_ssi asc', label: 'Relevance'
|
94
94
|
config.add_sort_field 'title', sort: 'sort_title_ssi asc', label: 'Title'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight-spotlight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2018-01-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|