blacklight_marc 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24c6e3dc1f7daff18432642867d570b2ffb4a6f5
4
- data.tar.gz: 1f8bc8a88cb1e29c5605b9de140612c38d1d3588
3
+ metadata.gz: ee7757c3f37cf9db1d1a00da948280b41ed8a620
4
+ data.tar.gz: 99421600b8295c1812213bbc93e2872093c4f365
5
5
  SHA512:
6
- metadata.gz: 4625cf4d1a6a15db370f2c5fafcaa0b8d0a369d3a87bf009c4d46917af7d5539d5367d117a1c97cbeb35a977553d4c60519ecbca51b1114b97c5fe1a1334321a
7
- data.tar.gz: 26ffce0d381dd7dd4cd1d5bf3b7dd772962d4257cbe4acef266853b9eb17b44af356c42376fa1842f79e3d459a6537bce26e5584202ca3a5a814787bc82ebd54
6
+ metadata.gz: d358663f6daefb580f88a5f44ba018cfccf912d072a84fd3231d75d009e45c3b1b64e0192186dfa9230af20b63f13abc0528e86198b87f1d331045687651e875
7
+ data.tar.gz: a1f73ff2ece8a3a43b21b2835cd8cf037c82fcb140c5931cbdc121dd5630416aa28f2a3f19dd727c8836d6d1a620c71ee375ac23d8bfd0328f3e02369a385788
@@ -1,3 +1,3 @@
1
1
  module BlacklightMarc
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -34,11 +34,6 @@ EOF
34
34
  directory("config/SolrMarc")
35
35
  end
36
36
 
37
- # Generate blacklight catalog controller
38
- def create_blacklight_catalog
39
- copy_file "catalog_controller.rb", "app/controllers/catalog_controller.rb"
40
- end
41
-
42
37
  # add MARC-specific extensions to the solr document
43
38
  def add_marc_extension_to_solrdocument
44
39
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight_marc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-17 00:00:00.000000000 Z
11
+ date: 2013-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,7 +97,6 @@ files:
97
97
  - lib/blacklight_marc.rb
98
98
  - lib/blacklight_marc/version.rb
99
99
  - lib/generators/blacklight_marc/marc_generator.rb
100
- - lib/generators/blacklight_marc/templates/catalog_controller.rb
101
100
  - lib/generators/blacklight_marc/templates/config/SolrMarc/config-test.properties
102
101
  - lib/generators/blacklight_marc/templates/config/SolrMarc/config.properties
103
102
  - lib/generators/blacklight_marc/templates/config/SolrMarc/index.properties
@@ -1,180 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- require 'blacklight/catalog'
3
-
4
- class CatalogController < ApplicationController
5
-
6
- include Blacklight::Catalog
7
-
8
- configure_blacklight do |config|
9
- ## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params
10
- config.default_solr_params = {
11
- :qt => 'search',
12
- :rows => 10
13
- }
14
-
15
- ## Default parameters to send on single-document requests to Solr. These settings are the Blackligt defaults (see SolrHelper#solr_doc_params) or
16
- ## parameters included in the Blacklight-jetty document requestHandler.
17
- #
18
- #config.default_document_solr_params = {
19
- # :qt => 'document',
20
- # ## These are hard-coded in the blacklight 'document' requestHandler
21
- # # :fl => '*',
22
- # # :rows => 1
23
- # # :q => '{!raw f=id v=$id}'
24
- #}
25
-
26
- # solr field configuration for search results/index views
27
- config.index.show_link = 'title_display'
28
- config.index.record_display_type = 'format'
29
-
30
- # solr field configuration for document/show views
31
- config.show.html_title = 'title_display'
32
- config.show.heading = 'title_display'
33
- config.show.display_type = 'format'
34
-
35
- # solr fields that will be treated as facets by the blacklight application
36
- # The ordering of the field names is the order of the display
37
- #
38
- # Setting a limit will trigger Blacklight's 'more' facet values link.
39
- # * If left unset, then all facet values returned by solr will be displayed.
40
- # * If set to an integer, then "f.somefield.facet.limit" will be added to
41
- # solr request, with actual solr request being +1 your configured limit --
42
- # you configure the number of items you actually want _displayed_ in a page.
43
- # * If set to 'true', then no additional parameters will be sent to solr,
44
- # but any 'sniffed' request limit parameters will be used for paging, with
45
- # paging at requested limit -1. Can sniff from facet.limit or
46
- # f.specific_field.facet.limit solr request params. This 'true' config
47
- # can be used if you set limits in :default_solr_params, or as defaults
48
- # on the solr side in the request handler itself. Request handler defaults
49
- # sniffing requires solr requests to be made with "echoParams=all", for
50
- # app code to actually have it echo'd back to see it.
51
- #
52
- # :show may be set to false if you don't want the facet to be drawn in the
53
- # facet bar
54
- config.add_facet_field 'format', :label => 'Format'
55
- config.add_facet_field 'pub_date', :label => 'Publication Year', :single => true
56
- config.add_facet_field 'subject_topic_facet', :label => 'Topic', :limit => 20
57
- config.add_facet_field 'language_facet', :label => 'Language', :limit => true
58
- config.add_facet_field 'lc_1letter_facet', :label => 'Call Number'
59
- config.add_facet_field 'subject_geo_facet', :label => 'Region'
60
- config.add_facet_field 'subject_era_facet', :label => 'Era'
61
-
62
- config.add_facet_field 'example_pivot_field', :label => 'Pivot Field', :pivot => ['format', 'language_facet']
63
-
64
- config.add_facet_field 'example_query_facet_field', :label => 'Publish Date', :query => {
65
- :years_5 => { :label => 'within 5 Years', :fq => "pub_date:[#{Time.now.year - 5 } TO *]" },
66
- :years_10 => { :label => 'within 10 Years', :fq => "pub_date:[#{Time.now.year - 10 } TO *]" },
67
- :years_25 => { :label => 'within 25 Years', :fq => "pub_date:[#{Time.now.year - 25 } TO *]" }
68
- }
69
-
70
-
71
- # Have BL send all facet field names to Solr, which has been the default
72
- # previously. Simply remove these lines if you'd rather use Solr request
73
- # handler defaults, or have no facets.
74
- config.add_facet_fields_to_solr_request!
75
-
76
- # solr fields to be displayed in the index (search results) view
77
- # The ordering of the field names is the order of the display
78
- config.add_index_field 'title_display', :label => 'Title:'
79
- config.add_index_field 'title_vern_display', :label => 'Title:'
80
- config.add_index_field 'author_display', :label => 'Author:'
81
- config.add_index_field 'author_vern_display', :label => 'Author:'
82
- config.add_index_field 'format', :label => 'Format:'
83
- config.add_index_field 'language_facet', :label => 'Language:'
84
- config.add_index_field 'published_display', :label => 'Published:'
85
- config.add_index_field 'published_vern_display', :label => 'Published:'
86
- config.add_index_field 'lc_callnum_display', :label => 'Call number:'
87
-
88
- # solr fields to be displayed in the show (single result) view
89
- # The ordering of the field names is the order of the display
90
- config.add_show_field 'title_display', :label => 'Title:'
91
- config.add_show_field 'title_vern_display', :label => 'Title:'
92
- config.add_show_field 'subtitle_display', :label => 'Subtitle:'
93
- config.add_show_field 'subtitle_vern_display', :label => 'Subtitle:'
94
- config.add_show_field 'author_display', :label => 'Author:'
95
- config.add_show_field 'author_vern_display', :label => 'Author:'
96
- config.add_show_field 'format', :label => 'Format:'
97
- config.add_show_field 'url_fulltext_display', :label => 'URL:'
98
- config.add_show_field 'url_suppl_display', :label => 'More Information:'
99
- config.add_show_field 'language_facet', :label => 'Language:'
100
- config.add_show_field 'published_display', :label => 'Published:'
101
- config.add_show_field 'published_vern_display', :label => 'Published:'
102
- config.add_show_field 'lc_callnum_display', :label => 'Call number:'
103
- config.add_show_field 'isbn_t', :label => 'ISBN:'
104
-
105
- # "fielded" search configuration. Used by pulldown among other places.
106
- # For supported keys in hash, see rdoc for Blacklight::SearchFields
107
- #
108
- # Search fields will inherit the :qt solr request handler from
109
- # config[:default_solr_parameters], OR can specify a different one
110
- # with a :qt key/value. Below examples inherit, except for subject
111
- # that specifies the same :qt as default for our own internal
112
- # testing purposes.
113
- #
114
- # The :key is what will be used to identify this BL search field internally,
115
- # as well as in URLs -- so changing it after deployment may break bookmarked
116
- # urls. A display label will be automatically calculated from the :key,
117
- # or can be specified manually to be different.
118
-
119
- # This one uses all the defaults set by the solr request handler. Which
120
- # solr request handler? The one set in config[:default_solr_parameters][:qt],
121
- # since we aren't specifying it otherwise.
122
-
123
- config.add_search_field 'all_fields', :label => 'All Fields'
124
-
125
-
126
- # Now we see how to over-ride Solr request handler defaults, in this
127
- # case for a BL "search field", which is really a dismax aggregate
128
- # of Solr search fields.
129
-
130
- config.add_search_field('title') do |field|
131
- # solr_parameters hash are sent to Solr as ordinary url query params.
132
- field.solr_parameters = { :'spellcheck.dictionary' => 'title' }
133
-
134
- # :solr_local_parameters will be sent using Solr LocalParams
135
- # syntax, as eg {! qf=$title_qf }. This is neccesary to use
136
- # Solr parameter de-referencing like $title_qf.
137
- # See: http://wiki.apache.org/solr/LocalParams
138
- field.solr_local_parameters = {
139
- :qf => '$title_qf',
140
- :pf => '$title_pf'
141
- }
142
- end
143
-
144
- config.add_search_field('author') do |field|
145
- field.solr_parameters = { :'spellcheck.dictionary' => 'author' }
146
- field.solr_local_parameters = {
147
- :qf => '$author_qf',
148
- :pf => '$author_pf'
149
- }
150
- end
151
-
152
- # Specifying a :qt only to show it's possible, and so our internal automated
153
- # tests can test it. In this case it's the same as
154
- # config[:default_solr_parameters][:qt], so isn't actually neccesary.
155
- config.add_search_field('subject') do |field|
156
- field.solr_parameters = { :'spellcheck.dictionary' => 'subject' }
157
- field.qt = 'search'
158
- field.solr_local_parameters = {
159
- :qf => '$subject_qf',
160
- :pf => '$subject_pf'
161
- }
162
- end
163
-
164
- # "sort results by" select (pulldown)
165
- # label in pulldown is followed by the name of the SOLR field to sort by and
166
- # whether the sort is ascending or descending (it must be asc or desc
167
- # except in the relevancy case).
168
- config.add_sort_field 'score desc, pub_date_sort desc, title_sort asc', :label => 'relevance'
169
- config.add_sort_field 'pub_date_sort desc, title_sort asc', :label => 'year'
170
- config.add_sort_field 'author_sort asc, title_sort asc', :label => 'author'
171
- config.add_sort_field 'title_sort asc, pub_date_sort desc', :label => 'title'
172
-
173
- # If there are more than this many search results, no spelling ("did you
174
- # mean") suggestion is offered.
175
- config.spell_max = 5
176
- end
177
-
178
-
179
-
180
- end