hydra-core 5.0.0.pre14 → 5.0.0.pre15

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,26 +16,56 @@
16
16
  limitations under the License.
17
17
  -->
18
18
 
19
+ <!--
20
+ For more details about configurations options that may appear in
21
+ this file, see http://wiki.apache.org/solr/SolrConfigXml.
22
+ -->
19
23
  <config>
24
+ <!-- In all configuration below, a prefix of "solr." for class names
25
+ is an alias that causes solr to search appropriate packages,
26
+ including org.apache.solr.(search|update|request|core|analysis)
27
+
28
+ You may also specify a fully qualified Java classname if you
29
+ have your own custom plugins.
30
+ -->
31
+
32
+ <!-- Set this to 'false' if you want solr to continue working after
33
+ it has encountered an severe configuration error. In a
34
+ production environment, you may want solr to keep working even
35
+ if one handler is mis-configured.
36
+
37
+ You may also set this to false using by setting the system
38
+ property:
39
+
40
+ -Dsolr.abortOnConfigurationError=false
41
+ -->
42
+ <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
43
+
44
+ <!-- Controls what version of Lucene various components of Solr
45
+ adhere to. Generally, you want to use the latest version to
46
+ get all bug fixes and improvements. It is highly recommended
47
+ that you fully re-index after changing this setting as it can
48
+ affect both how text is indexed and queried.
49
+ -->
20
50
  <luceneMatchVersion>LUCENE_40</luceneMatchVersion>
21
51
 
22
52
  <!-- The DirectoryFactory to use for indexes.
23
53
  solr.StandardDirectoryFactory, the default, is filesystem based.
24
54
  solr.RAMDirectoryFactory is memory based, not persistent, and doesn't work with replication. -->
25
55
  <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
26
-
56
+
57
+ <!-- solr lib dirs -->
27
58
  <lib dir="../lib/contrib/analysis-extras/lib" />
28
59
  <lib dir="../lib/contrib/analysis-extras/lucene-libs" />
29
-
30
- <dataDir>${solr.data.dir:}</dataDir>
31
60
 
61
+ <dataDir>${solr.data.dir:}</dataDir>
62
+
32
63
  <requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
33
64
 
34
65
  <requestDispatcher handleSelect="true" >
35
- <requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
66
+ <requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
36
67
  </requestDispatcher>
37
68
 
38
-
39
69
  <requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
40
70
  <requestHandler name="/update" class="solr.UpdateRequestHandler" />
41
71
  <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
@@ -48,32 +78,136 @@
48
78
  <str name="echoParams">all</str>
49
79
  </lst>
50
80
  </requestHandler>
51
-
81
+
52
82
  <!-- config for the admin interface -->
53
83
  <admin>
54
- <defaultQuery>solr</defaultQuery>
84
+ <defaultQuery>search</defaultQuery>
55
85
  </admin>
86
+
87
+
88
+ <requestHandler name="search" class="solr.SearchHandler" default="true">
89
+ <!-- default values for query parameters can be specified, these
90
+ will be overridden by parameters in the request
91
+ -->
92
+ <lst name="defaults">
93
+ <str name="defType">dismax</str>
94
+ <str name="echoParams">explicit</str>
95
+ <str name="q.alt">*:*</str>
96
+ <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
97
+ <!-- this qf and pf are used by default, if not otherwise specified by
98
+ client. The default blacklight_config will use these for the
99
+ "keywords" search. See the author_qf/author_pf, title_qf, etc
100
+ below, which the default blacklight_config will specify for
101
+ those searches. You may also be interested in:
102
+ http://wiki.apache.org/solr/LocalParams
103
+ -->
104
+ <str name="qf">
105
+ id
106
+ title_t^25000
107
+ text
108
+ active_fedora_model_s
109
+ object_type_facet
110
+ </str>
111
+ <str name="pf">
112
+ id
113
+ title_t^250000
114
+ text^10
115
+ active_fedora_model_s
116
+ object_type_facet
117
+ </str>
118
+
119
+ <str name="author_qf">
120
+ author_unstem_search^200
121
+ author_addl_unstem_search^50
122
+ author_t^20
123
+ author_addl_t
124
+ </str>
125
+ <str name="author_pf">
126
+ author_unstem_search^2000
127
+ author_addl_unstem_search^500
128
+ author_t^200
129
+ author_addl_t^10
130
+ </str>
131
+ <str name="title_qf">
132
+ title_unstem_search^50000
133
+ subtitle_unstem_search^25000
134
+ title_addl_unstem_search^10000
135
+ title_t^5000
136
+ subtitle_t^2500
137
+ title_addl_t^100
138
+ title_added_entry_unstem_search^50
139
+ title_added_entry_t^10
140
+ title_series_unstem_search^5
141
+ title_series_t
142
+ </str>
143
+ <str name="title_pf">
144
+ title_unstem_search^500000
145
+ subtitle_unstem_search^250000
146
+ title_addl_unstem_search^100000
147
+ title_t^50000
148
+ subtitle_t^25000
149
+ title_addl_t^1000
150
+ title_added_entry_unstem_search^500
151
+ title_added_entry_t^100
152
+ title_series_t^50
153
+ title_series_unstem_search^10
154
+ </str>
155
+ <str name="subject_qf">
156
+ subject_topic_unstem_search^200
157
+ subject_unstem_search^125
158
+ subject_topic_facet^100
159
+ subject_t^50
160
+ subject_addl_unstem_search^10
161
+ subject_addl_t
162
+ </str>
163
+ <str name="subject_pf">
164
+ subject_topic_unstem_search^2000
165
+ subject_unstem_search^1250
166
+ subject_t^1000
167
+ subject_topic_facet^500
168
+ subject_addl_unstem_search^100
169
+ subject_addl_t^10
170
+ </str>
171
+
172
+ <int name="ps">3</int>
173
+ <float name="tie">0.01</float>
174
+
175
+ <!-- NOT using marc_display because it is large and will slow things down for search results -->
176
+ <str name="fl">
177
+ *,
178
+ score,
179
+ </str>
180
+
181
+ <str name="facet">true</str>
182
+ <str name="facet.mincount">1</str>
183
+ <str name="facet.limit">10</str>
184
+ <str name="facet.field">format</str>
185
+ <str name="facet.field">lc_1letter_facet</str>
186
+ <str name="facet.field">lc_alpha_facet</str>
187
+ <str name="facet.field">lc_b4cutter_facet</str>
188
+ <str name="facet.field">language_facet</str>
189
+ <str name="facet.field">pub_date</str>
190
+ <str name="facet.field">subject_era_facet</str>
191
+ <str name="facet.field">subject_geo_facet</str>
192
+ <str name="facet.field">subject_topic_facet</str>
193
+
194
+ <str name="spellcheck">true</str>
195
+ <str name="spellcheck.dictionary">default</str>
196
+ <str name="spellcheck.onlyMorePopular">true</str>
197
+ <str name="spellcheck.extendedResults">true</str>
198
+ <str name="spellcheck.collate">false</str>
199
+ <str name="spellcheck.count">5</str>
200
+
201
+ </lst>
202
+ <arr name="last-components">
203
+ <str>spellcheck</str>
204
+ </arr>
56
205
 
57
- <requestHandler name="search" class="solr.SearchHandler" default="true" >
58
- <lst name="defaults">
59
- <str name="defType">dismax</str>
60
- <str name="facet">on</str>
61
- <str name="facet.mincount">1</str>
62
- <str name="echoParams">explicit</str>
63
- <float name="tie">0.01</float>
64
- <str name="qf">id^0.8 id_t^0.8 format text^0.3</str>
65
- <str name="pf">id^0.9 id_t^0.9 text^0.5</str>
66
- <str name="fl">
67
- id,text,title_t,date_t,year_facet,month_facet,medium_t,series_facet,box_facet,folder_facet,has_model_s
68
- </str>
69
- <str name="mm">
70
- 2&lt;-1 5&lt;-2 6&lt;90%
71
- </str>
72
- <int name="ps">100</int>
73
- <str name="q.alt">*:*</str>
74
- </lst>
75
206
  </requestHandler>
76
207
 
208
+
209
+ <!-- Hydra Additions Start -->
210
+
77
211
  <requestHandler name="standard" class="solr.SearchHandler">
78
212
  <lst name="defaults">
79
213
  <str name="echoParams">explicit</str>
@@ -101,7 +235,9 @@
101
235
  </str>
102
236
  </lst>
103
237
  </requestHandler>
104
-
238
+
239
+ <!-- Hydra Additions End -->
240
+
105
241
  <!-- for requests to get a single document; use id=666 instead of q=id:666 -->
106
242
  <requestHandler name="document" class="solr.SearchHandler" >
107
243
  <lst name="defaults">
@@ -113,33 +249,51 @@
113
249
  </requestHandler>
114
250
 
115
251
 
116
- <!-- The spell check component can return a list of alternative spelling
117
- suggestions. -->
252
+
253
+ <!-- Spell Check
254
+
255
+ The spell check component can return a list of alternative spelling
256
+ suggestions.
257
+
258
+ http://wiki.apache.org/solr/SpellCheckComponent
259
+ -->
118
260
  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
119
261
 
120
262
  <str name="queryAnalyzerFieldType">textSpell</str>
121
263
 
264
+ <!-- Multiple "Spell Checkers" can be declared and used by this
265
+ component
266
+ -->
267
+
268
+ <!-- a spellchecker built from a field of the main index, and
269
+ written to disk
270
+ -->
122
271
  <lst name="spellchecker">
123
272
  <str name="name">default</str>
124
273
  <str name="field">spell</str>
125
- <str name="spellcheckIndexDir">./spellchecker1</str>
126
-
274
+ <str name="spellcheckIndexDir">./spell</str>
275
+ <str name="buildOnOptimize">true</str>
127
276
  </lst>
128
277
  <lst name="spellchecker">
129
- <str name="name">jarowinkler</str>
130
- <str name="field">spell</str>
131
- <!-- Use a different Distance Measure -->
132
- <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
133
- <str name="spellcheckIndexDir">./spellchecker2</str>
134
-
278
+ <str name="name">author</str>
279
+ <str name="field">author_spell</str>
280
+ <str name="spellcheckIndexDir">./spell_author</str>
281
+ <str name="accuracy">0.7</str>
282
+ <str name="buildOnOptimize">true</str>
283
+ </lst>
284
+ <lst name="spellchecker">
285
+ <str name="name">subject</str>
286
+ <str name="field">subject_spell</str>
287
+ <str name="spellcheckIndexDir">./spell_subject</str>
288
+ <str name="accuracy">0.7</str>
289
+ <str name="buildOnOptimize">true</str>
135
290
  </lst>
136
-
137
291
  <lst name="spellchecker">
138
- <str name="classname">solr.FileBasedSpellChecker</str>
139
- <str name="name">file</str>
140
- <str name="sourceLocation">spellings.txt</str>
141
- <str name="characterEncoding">UTF-8</str>
142
- <str name="spellcheckIndexDir">./spellcheckerFile</str>
292
+ <str name="name">title</str>
293
+ <str name="field">title_spell</str>
294
+ <str name="spellcheckIndexDir">./spell_title</str>
295
+ <str name="accuracy">0.7</str>
296
+ <str name="buildOnOptimize">true</str>
143
297
  </lst>
144
298
  </searchComponent>
145
299
  </config>
@@ -28,7 +28,7 @@
28
28
  adminPath: RequestHandler path to manage cores.
29
29
  If 'null' (or absent), cores will not be manageable via REST
30
30
  -->
31
- <cores adminPath="/admin/cores">
31
+ <cores adminPath="/admin/cores" defaultCoreName="development">
32
32
  <core name="development" instanceDir="development-core" />
33
33
  <core name="test" instanceDir="test-core" />
34
34
  </cores>
@@ -1,4 +1,4 @@
1
1
  module HydraHead
2
- VERSION = "5.0.0.pre14"
2
+ VERSION = "5.0.0.pre15"
3
3
  end
4
4
 
@@ -72,7 +72,6 @@ describe CatalogController do
72
72
  describe "index" do
73
73
  it "should trigger enforce_index_permissions" do
74
74
  controller.should_receive(:add_access_controls_to_solr_params)
75
- controller.should_receive(:enforce_index_permissions)
76
75
  get :index
77
76
  end
78
77
  end
@@ -19,6 +19,10 @@ class TestAppGenerator < Rails::Generators::Base
19
19
  copy_file "spec/fixtures/hydra_test_generic_content.foxml.xml"
20
20
  end
21
21
 
22
+ def copy_rspec_rake_task
23
+ copy_file "lib/tasks/rspec.rake"
24
+ end
25
+
22
26
  def run_blacklight_generator
23
27
  say_status("warning", "GENERATING BL", :yellow)
24
28
 
@@ -0,0 +1,8 @@
1
+ require 'rspec/core/rake_task'
2
+ desc "run the hydra-core gem spec"
3
+ gem_home = File.expand_path('../../../../..', __FILE__)
4
+ RSpec::Core::RakeTask.new(:myspec) do |t|
5
+ t.pattern = gem_home + '/spec/**/*_spec.rb'
6
+ t.rspec_opts = "--colour"
7
+ t.ruby_opts = "-I#{gem_home}/spec"
8
+ end
data/tasks/rspec.rake CHANGED
@@ -3,12 +3,12 @@ require 'rspec/core/rake_task'
3
3
 
4
4
 
5
5
  desc "Run specs"
6
- RSpec::Core::RakeTask.new(:spec => [:generate, :fixtures]) do |t|
7
- # if ENV['COVERAGE'] and RUBY_VERSION =~ /^1.8/
8
- # t.rcov = true
9
- # t.rcov_opts = %w{--exclude spec\/*,gems\/*,ruby\/* --aggregate coverage.data}
10
- # end
11
- t.rspec_opts = "--colour"
6
+ task :spec => [:generate, :fixtures] do |t|
7
+ Bundler.with_clean_env do
8
+ within_test_app do
9
+ system "rake myspec"
10
+ end
11
+ end
12
12
  end
13
13
 
14
14
  task :fixtures do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0.pre14
4
+ version: 5.0.0.pre15
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -35,7 +35,7 @@ dependencies:
35
35
  requirements:
36
36
  - - ~>
37
37
  - !ruby/object:Gem::Version
38
- version: 4.0.0.pre7
38
+ version: 4.0.0.rc1
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - ~>
45
45
  - !ruby/object:Gem::Version
46
- version: 4.0.0.pre7
46
+ version: 4.0.0.rc1
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: devise
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -67,7 +67,7 @@ dependencies:
67
67
  requirements:
68
68
  - - ~>
69
69
  - !ruby/object:Gem::Version
70
- version: 5.0.0.rc4
70
+ version: 5.0.0.rc5
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -75,7 +75,7 @@ dependencies:
75
75
  requirements:
76
76
  - - ~>
77
77
  - !ruby/object:Gem::Version
78
- version: 5.0.0.rc4
78
+ version: 5.0.0.rc5
79
79
  - !ruby/object:Gem::Dependency
80
80
  name: RedCloth
81
81
  requirement: !ruby/object:Gem::Requirement
@@ -179,7 +179,7 @@ dependencies:
179
179
  requirements:
180
180
  - - '='
181
181
  - !ruby/object:Gem::Version
182
- version: 5.0.0.pre14
182
+ version: 5.0.0.pre15
183
183
  type: :runtime
184
184
  prerelease: false
185
185
  version_requirements: !ruby/object:Gem::Requirement
@@ -187,7 +187,7 @@ dependencies:
187
187
  requirements:
188
188
  - - '='
189
189
  - !ruby/object:Gem::Version
190
- version: 5.0.0.pre14
190
+ version: 5.0.0.pre15
191
191
  - !ruby/object:Gem::Dependency
192
192
  name: sqlite3
193
193
  requirement: !ruby/object:Gem::Requirement
@@ -382,6 +382,7 @@ files:
382
382
  - spec/support/app/models/solr_document.rb
383
383
  - spec/support/db/migrate/20111101221803_create_searches.rb
384
384
  - spec/support/lib/generators/test_app_generator.rb
385
+ - spec/support/lib/tasks/rspec.rake
385
386
  - spec/support/matchers/helper_matcher.rb
386
387
  - spec/support/matchers/solr_matchers.rb
387
388
  - spec/support/spec/fixtures/hydra_test_generic_content.foxml.xml
@@ -439,6 +440,7 @@ test_files:
439
440
  - spec/support/app/models/solr_document.rb
440
441
  - spec/support/db/migrate/20111101221803_create_searches.rb
441
442
  - spec/support/lib/generators/test_app_generator.rb
443
+ - spec/support/lib/tasks/rspec.rake
442
444
  - spec/support/matchers/helper_matcher.rb
443
445
  - spec/support/matchers/solr_matchers.rb
444
446
  - spec/support/spec/fixtures/hydra_test_generic_content.foxml.xml