active-fedora 5.0.0.rc2 → 5.0.0.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.textile +1 -9
- data/active-fedora.gemspec +1 -1
- data/lib/active_fedora.rb +1 -0
- data/lib/active_fedora/callbacks.rb +5 -6
- data/lib/active_fedora/model.rb +0 -149
- data/lib/active_fedora/persistence.rb +4 -0
- data/lib/active_fedora/rdf_datastream.rb +0 -2
- data/lib/active_fedora/rdf_xml_writer.rb +0 -1
- data/lib/active_fedora/rels_ext_datastream.rb +0 -1
- data/lib/active_fedora/semantic_node.rb +0 -1
- data/lib/active_fedora/version.rb +1 -1
- data/lib/tasks/active_fedora_dev.rake +3 -5
- data/solr/conf/schema.xml +5 -5
- data/solr/conf/solrconfig.xml +221 -767
- data/spec/integration/base_spec.rb +0 -8
- data/spec/integration/model_spec.rb +0 -10
- data/spec/samples/models/hydrangea_article.rb +2 -2
- data/spec/unit/base_spec.rb +0 -17
- data/spec/unit/callback_spec.rb +10 -3
- data/spec/unit/model_spec.rb +0 -23
- metadata +18 -23
- data/solr/config/schema-1.5.xml +0 -468
- data/solr/config/schema.xml +0 -191
- data/solr/config/solrconfig-1.5.xml +0 -1069
- data/spec/integration/base_find_by_fields_spec.rb +0 -225
data/README.textile
CHANGED
@@ -50,15 +50,7 @@ java -jar start.jar
|
|
50
50
|
Then open a new terminal, go to your ActiveFedora source directory, and import fedora's demo objects.
|
51
51
|
|
52
52
|
<pre>
|
53
|
-
|
54
|
-
rake active_fedora:load_fixtures environment=test
|
55
|
-
</pre>
|
56
|
-
|
57
|
-
This does the equivalent of:
|
58
|
-
|
59
|
-
<pre>
|
60
|
-
$FEDORA_HOME/client/bin/fedora-ingest-demos.sh localhost 8983 fedoraAdmin fedoraAdmin http
|
61
|
-
rake af:import_fixture pid=hydrangea:fixture_mods_article1 environment=test
|
53
|
+
rake active_fedora:fixtures environment=test
|
62
54
|
</pre>
|
63
55
|
|
64
56
|
Now you're ready to run the tests. In the directory where active_fedora is installed, run
|
data/active-fedora.gemspec
CHANGED
@@ -22,7 +22,6 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_dependency("activesupport", '>= 3.0.0')
|
23
23
|
s.add_dependency("builder", '~> 3.0.0')
|
24
24
|
s.add_dependency("mediashelf-loggable")
|
25
|
-
s.add_dependency("equivalent-xml")
|
26
25
|
s.add_dependency("rubydora", '~>0.5.13')
|
27
26
|
s.add_dependency("rdf")
|
28
27
|
s.add_dependency("rdf-rdfxml", '~>0.3.8')
|
@@ -32,6 +31,7 @@ Gem::Specification.new do |s|
|
|
32
31
|
s.add_development_dependency("rake")
|
33
32
|
s.add_development_dependency("jettywrapper", ">=1.2.0")
|
34
33
|
s.add_development_dependency("rspec", ">= 2.9.0")
|
34
|
+
s.add_development_dependency("equivalent-xml")
|
35
35
|
s.add_development_dependency("mocha", "0.10.5")
|
36
36
|
|
37
37
|
s.files = `git ls-files`.split("\n")
|
data/lib/active_fedora.rb
CHANGED
@@ -5,6 +5,7 @@ require 'active_fedora/rubydora_connection'
|
|
5
5
|
require 'active_support/core_ext/class/attribute'
|
6
6
|
require 'active_support/core_ext/object'
|
7
7
|
require 'active_support/core_ext/hash/indifferent_access'
|
8
|
+
require 'rdf'
|
8
9
|
|
9
10
|
SOLR_DOCUMENT_ID = ActiveFedora::SolrService.id_field unless defined?(SOLR_DOCUMENT_ID)
|
10
11
|
ENABLE_SOLR_UPDATES = true unless defined?(ENABLE_SOLR_UPDATES)
|
@@ -92,7 +92,7 @@ module ActiveFedora
|
|
92
92
|
# The method reference callbacks work by specifying a protected or private method available in the object, like this:
|
93
93
|
#
|
94
94
|
# class Topic < ActiveFedora::Base
|
95
|
-
#
|
95
|
+
# before_destroy :delete_parents
|
96
96
|
#
|
97
97
|
# private
|
98
98
|
# def delete_parents
|
@@ -168,14 +168,14 @@ module ActiveFedora
|
|
168
168
|
# pass a "method string", which will then be evaluated within the binding of the callback. Example:
|
169
169
|
#
|
170
170
|
# class Topic < ActiveFedora::Base
|
171
|
-
#
|
171
|
+
# before_destroy 'self.class.delete_all "parent_id = #{id}"'
|
172
172
|
# end
|
173
173
|
#
|
174
174
|
# Notice that single quotes (') are used so the <tt>#{id}</tt> part isn't evaluated until the callback
|
175
175
|
# is triggered. Also note that these inline callbacks can be stacked just like the regular ones:
|
176
176
|
#
|
177
177
|
# class Topic < ActiveFedora::Base
|
178
|
-
#
|
178
|
+
# before_destroy 'self.class.delete_all "parent_id = #{id}"',
|
179
179
|
# 'puts "Evaluated after parents are deleted"'
|
180
180
|
# end
|
181
181
|
#
|
@@ -217,7 +217,7 @@ module ActiveFedora
|
|
217
217
|
:after_initialize, :after_find, :before_validation, :after_validation,
|
218
218
|
:before_save, :around_save, :after_save, :before_create, :around_create,
|
219
219
|
:after_create, :before_update, :around_update, :after_update,
|
220
|
-
:
|
220
|
+
:before_destroy, :around_destroy, :after_destroy
|
221
221
|
]
|
222
222
|
|
223
223
|
included do
|
@@ -225,14 +225,13 @@ module ActiveFedora
|
|
225
225
|
include ActiveModel::Validations::Callbacks
|
226
226
|
|
227
227
|
define_model_callbacks :initialize, :find, :only => :after
|
228
|
-
define_model_callbacks :save, :create, :update, :
|
228
|
+
define_model_callbacks :save, :create, :update, :destroy
|
229
229
|
end
|
230
230
|
|
231
231
|
def destroy #:nodoc:
|
232
232
|
run_callbacks(:destroy) { super }
|
233
233
|
end
|
234
234
|
|
235
|
-
|
236
235
|
private
|
237
236
|
|
238
237
|
def persist #:nodoc:
|
data/lib/active_fedora/model.rb
CHANGED
@@ -65,22 +65,6 @@ module ActiveFedora
|
|
65
65
|
# fieldname_append(val)
|
66
66
|
# *appends val to the values array.
|
67
67
|
module ClassMethods
|
68
|
-
|
69
|
-
# Retrieve the Fedora object with the given pid and deserialize it as an instance of the current model
|
70
|
-
# Note that you can actually pass a pid into this method, regardless of Fedora model type, and
|
71
|
-
# ActiveFedora will try to parse the results into the current type of self, which may or may not be what you want.
|
72
|
-
#
|
73
|
-
# @param [String] pid of the object to load
|
74
|
-
#
|
75
|
-
# @example this will return an instance of Book, even if the object hydra:dataset1 asserts that it is a Dataset
|
76
|
-
# Book.load_instance("hydra:dataset1")
|
77
|
-
def load_instance(pid)
|
78
|
-
ActiveSupport::Deprecation.warn("load_instance is deprecated. Use find instead")
|
79
|
-
find(pid)
|
80
|
-
end
|
81
|
-
|
82
|
-
|
83
|
-
|
84
68
|
# Returns a suitable uri object for :has_model
|
85
69
|
# Should reverse Model#from_class_uri
|
86
70
|
def to_class_uri(attrs = {})
|
@@ -175,13 +159,6 @@ module ActiveFedora
|
|
175
159
|
!inner.new?
|
176
160
|
end
|
177
161
|
|
178
|
-
#@deprecated
|
179
|
-
def find_model(pid)
|
180
|
-
ActiveSupport::Deprecation.warn("find_model is deprecated. Use find instead")
|
181
|
-
find(pid)
|
182
|
-
end
|
183
|
-
|
184
|
-
|
185
162
|
# Get a count of the number of objects from solr
|
186
163
|
# Takes :conditions as an argument
|
187
164
|
def count(args = {})
|
@@ -190,122 +167,6 @@ module ActiveFedora
|
|
190
167
|
SolrService.query(q.join(' AND '), :raw=>true, :rows=>0)['response']['numFound']
|
191
168
|
end
|
192
169
|
|
193
|
-
#@deprecated
|
194
|
-
#Sends a query directly to SolrService
|
195
|
-
def solr_search(query, args={})
|
196
|
-
ActiveSupport::Deprecation.warn("solr_search is deprecated and will be removed in the next release. Use SolrService.query instead")
|
197
|
-
SolrService.instance.conn.query(query, args)
|
198
|
-
end
|
199
|
-
|
200
|
-
# @deprecated
|
201
|
-
# If query is :all, this method will query Solr for all instances
|
202
|
-
# of self.type (based on active_fedora_model_s as indexed
|
203
|
-
# by Solr). If the query is any other string, this method simply does
|
204
|
-
# a pid based search (id:query).
|
205
|
-
#
|
206
|
-
# Note that this method does _not_ return ActiveFedora::Model
|
207
|
-
# objects, but rather an array of SolrResults.
|
208
|
-
#
|
209
|
-
# Args is an options hash, which is passed into the SolrService
|
210
|
-
# connection instance.
|
211
|
-
def find_by_solr(query, args={})
|
212
|
-
ActiveSupport::Deprecation.warn("find_by_fields_by_solr is deprecated and will be removed in 5.0. Use find_with_conditions instead.")
|
213
|
-
if query == :all
|
214
|
-
escaped_class_name = self.name.gsub(/(:)/, '\\:')
|
215
|
-
SolrService.query("#{ActiveFedora::SolrService.solr_name(:active_fedora_model, :symbol)}:#{escaped_class_name}", args)
|
216
|
-
elsif query.class == String
|
217
|
-
escaped_id = query.gsub(/(:)/, '\\:')
|
218
|
-
SolrService.query("#{SOLR_DOCUMENT_ID}:#{escaped_id}", args)
|
219
|
-
end
|
220
|
-
end
|
221
|
-
|
222
|
-
# @deprecated
|
223
|
-
# Find all ActiveFedora objects for this model that match arguments
|
224
|
-
# passed in by querying Solr. Like find_by_solr this returns a solr result.
|
225
|
-
#
|
226
|
-
# @param query_fields [Hash] field names and values to filter on (query_fields must be the solr_field_name for non-MetadataDatastream derived datastreams)
|
227
|
-
# @param opts [Hash] specifies options for the solr query
|
228
|
-
#
|
229
|
-
# options may include:
|
230
|
-
#
|
231
|
-
# :sort => array of hash with one hash per sort by field... defaults to [{system_create=>:descending}]
|
232
|
-
# :default_field, :rows, :filter_queries, :debug_query,
|
233
|
-
# :explain_other, :facets, :highlighting, :mlt,
|
234
|
-
# :operator => :or / :and
|
235
|
-
# :start => defaults to 0
|
236
|
-
# :field_list => array, defaults to ["*", "score"]
|
237
|
-
#
|
238
|
-
def find_by_fields_by_solr(query_fields,opts={})
|
239
|
-
ActiveSupport::Deprecation.warn("find_by_fields_by_solr is deprecated and will be removed in 5.0")
|
240
|
-
#create solr_args from fields passed in, needs to be comma separated list of form field1=value1,field2=value2,...
|
241
|
-
escaped_class_name = self.name.gsub(/(:)/, '\\:')
|
242
|
-
query = "#{ActiveFedora::SolrService.solr_name(:active_fedora_model, :symbol)}:#{escaped_class_name}"
|
243
|
-
|
244
|
-
query_fields.each_pair do |key,value|
|
245
|
-
unless value.nil?
|
246
|
-
solr_key = key
|
247
|
-
#convert to symbol if need be
|
248
|
-
key = key.to_sym if !class_fields.has_key?(key)&&class_fields.has_key?(key.to_sym)
|
249
|
-
#do necessary mapping with suffix in most cases, otherwise ignore as a solr field key that activefedora does not know about
|
250
|
-
if class_fields.has_key?(key) && class_fields[key].has_key?(:type)
|
251
|
-
type = class_fields[key][:type]
|
252
|
-
type = :string unless type.kind_of?(Symbol)
|
253
|
-
solr_key = ActiveFedora::SolrService.solr_name(key,type)
|
254
|
-
end
|
255
|
-
|
256
|
-
escaped_value = value.gsub(/(:)/, '\\:')
|
257
|
-
#escaped_value = escaped_value.gsub(/ /, '\\ ')
|
258
|
-
key = SOLR_DOCUMENT_ID if (key === :id || key === :pid)
|
259
|
-
query = key.to_s.eql?(SOLR_DOCUMENT_ID) ? "#{query} AND #{key}:#{escaped_value}" : "#{query} AND #{solr_key}:#{escaped_value}"
|
260
|
-
end
|
261
|
-
end
|
262
|
-
|
263
|
-
query_opts = {}
|
264
|
-
opts.each do |key,value|
|
265
|
-
key = key.to_sym
|
266
|
-
query_opts[key] = value
|
267
|
-
end
|
268
|
-
|
269
|
-
#set default sort to created date ascending
|
270
|
-
unless query_opts.include?(:sort)
|
271
|
-
query_opts.merge!({:sort=>[ActiveFedora::SolrService.solr_name(:system_create,:date)+' asc']})
|
272
|
-
else
|
273
|
-
#need to convert to solr names for all fields
|
274
|
-
sort_array =[]
|
275
|
-
|
276
|
-
opts[:sort].collect do |sort|
|
277
|
-
sort_direction = 'ascending'
|
278
|
-
if sort.respond_to?(:keys)
|
279
|
-
key = sort.keys[0]
|
280
|
-
sort_direction = sort[key]
|
281
|
-
else
|
282
|
-
key = sort.to_s
|
283
|
-
end
|
284
|
-
sort_direction = sort_direction =~ /^desc/ ? 'desc' : 'asc'
|
285
|
-
field_name = key
|
286
|
-
|
287
|
-
if key.to_s =~ /^system_create/
|
288
|
-
field_name = :system_create_date
|
289
|
-
key = :system_create
|
290
|
-
elsif key.to_s =~ /^system_mod/
|
291
|
-
field_name = :system_modified_date
|
292
|
-
key = :system_modified
|
293
|
-
end
|
294
|
-
|
295
|
-
solr_name = field_name
|
296
|
-
if class_fields.include?(field_name.to_sym)
|
297
|
-
solr_name = ActiveFedora::SolrService.solr_name(key,class_fields[field_name.to_sym][:type])
|
298
|
-
end
|
299
|
-
sort_array.push("#{solr_name} #{sort_direction}")
|
300
|
-
end
|
301
|
-
|
302
|
-
query_opts[:sort] = sort_array.join(",")
|
303
|
-
end
|
304
|
-
|
305
|
-
logger.debug "Querying solr for #{self.name} objects with query: '#{query}'"
|
306
|
-
SolrService.query(query, query_opts)
|
307
|
-
end
|
308
|
-
|
309
170
|
# Returns a solr result matching the supplied conditions
|
310
171
|
# @param[Hash,String] conditions can either be specified as a string, or
|
311
172
|
# hash representing the query part of an solr statement. If a hash is
|
@@ -326,16 +187,6 @@ module ActiveFedora
|
|
326
187
|
'"' + value.gsub(/(:)/, '\\:').gsub(/(\/)/, '\\/').gsub(/"/, '\\"') + '"'
|
327
188
|
end
|
328
189
|
|
329
|
-
# @deprecated
|
330
|
-
def class_fields
|
331
|
-
#create dummy object that is empty by passing in fake pid
|
332
|
-
object = self.new()#{:pid=>'FAKE'})
|
333
|
-
fields = object.fields
|
334
|
-
#reset id to nothing
|
335
|
-
fields[:id][:values] = []
|
336
|
-
return fields
|
337
|
-
end
|
338
|
-
|
339
190
|
private
|
340
191
|
|
341
192
|
# Returns a solr query for the supplied conditions
|
@@ -44,9 +44,7 @@ require 'rspec/core/rake_task'
|
|
44
44
|
end
|
45
45
|
|
46
46
|
desc "Loads or refreshes the fixtures needed to run the tests"
|
47
|
-
task :
|
48
|
-
# ActiveFedora.init unless Thread.current[:repo]
|
49
|
-
|
47
|
+
task :fixtures => :environment do
|
50
48
|
ENV["pid"] = "hydrangea:fixture_mods_article1"
|
51
49
|
Rake::Task["repo:refresh"].invoke
|
52
50
|
ENV["pid"] = nil
|
@@ -67,7 +65,7 @@ task :hudson do
|
|
67
65
|
ENV['environment'] = "test"
|
68
66
|
Rake::Task["active_fedora:configure_jetty"].invoke
|
69
67
|
jetty_params = Jettywrapper.load_config
|
70
|
-
jetty_params[:startup_wait]=
|
68
|
+
jetty_params[:startup_wait]= 60
|
71
69
|
error = Jettywrapper.wrap(jetty_params) do
|
72
70
|
Rake::Task['active_fedora:coverage'].invoke
|
73
71
|
end
|
@@ -82,7 +80,7 @@ task :coverage do
|
|
82
80
|
ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
|
83
81
|
ENV['COVERAGE'] = 'true' unless ruby_engine == 'jruby'
|
84
82
|
|
85
|
-
Rake::Task["active_fedora:
|
83
|
+
Rake::Task["active_fedora:fixtures"].invoke
|
86
84
|
Rake::Task["active_fedora:rspec"].invoke
|
87
85
|
end
|
88
86
|
|
data/solr/conf/schema.xml
CHANGED
@@ -175,7 +175,7 @@
|
|
175
175
|
/>
|
176
176
|
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
|
177
177
|
<filter class="solr.LowerCaseFilterFactory"/>
|
178
|
-
<filter class="solr.
|
178
|
+
<filter class="solr.SnowballPorterFilterFactory" language="English"/>
|
179
179
|
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
180
180
|
</analyzer>
|
181
181
|
<analyzer type="query">
|
@@ -184,7 +184,7 @@
|
|
184
184
|
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
|
185
185
|
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
|
186
186
|
<filter class="solr.LowerCaseFilterFactory"/>
|
187
|
-
<filter class="solr.
|
187
|
+
<filter class="solr.SnowballPorterFilterFactory" language="English"/>
|
188
188
|
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
189
189
|
</analyzer>
|
190
190
|
</fieldType>
|
@@ -199,7 +199,7 @@
|
|
199
199
|
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
|
200
200
|
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
|
201
201
|
<filter class="solr.LowerCaseFilterFactory"/>
|
202
|
-
<filter class="solr.
|
202
|
+
<filter class="solr.SnowballPorterFilterFactory" language="English"/>
|
203
203
|
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
204
204
|
</analyzer>
|
205
205
|
</fieldType>
|
@@ -264,7 +264,7 @@
|
|
264
264
|
|
265
265
|
<dynamicField name="random*" type="random" />
|
266
266
|
|
267
|
-
<dynamicField name="*_sort" type="string" indexed="true" stored="false" multiValued="
|
267
|
+
<dynamicField name="*_sort" type="string" indexed="true" stored="false" multiValued="false" />
|
268
268
|
<dynamicField name="*_facet" type="string" indexed="true" stored="true" multiValued="true" />
|
269
269
|
<dynamicField name="*_display" type="string" indexed="false" stored="true" multiValued="true" />
|
270
270
|
|
@@ -275,4 +275,4 @@
|
|
275
275
|
<solrQueryParser defaultOperator="AND" />
|
276
276
|
<copyField source="*_facet" dest="text" />
|
277
277
|
|
278
|
-
</schema>
|
278
|
+
</schema>
|
data/solr/conf/solrconfig.xml
CHANGED
@@ -16,473 +16,223 @@
|
|
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>
|
20
|
-
<!--
|
21
|
-
|
22
|
-
|
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:
|
23
39
|
|
24
|
-
You may also set this to false using by setting the system property:
|
25
40
|
-Dsolr.abortOnConfigurationError=false
|
26
|
-
|
41
|
+
-->
|
27
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
|
+
-->
|
50
|
+
<luceneMatchVersion>LUCENE_40</luceneMatchVersion>
|
28
51
|
|
29
|
-
<!--
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
-->
|
34
|
-
|
35
|
-
<indexDefaults>
|
36
|
-
<!-- Values here affect all index writers and act as a default unless overridden. -->
|
37
|
-
<useCompoundFile>false</useCompoundFile>
|
52
|
+
<!-- The DirectoryFactory to use for indexes.
|
53
|
+
solr.StandardDirectoryFactory, the default, is filesystem based.
|
54
|
+
solr.RAMDirectoryFactory is memory based, not persistent, and doesn't work with replication. -->
|
55
|
+
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
|
38
56
|
|
39
|
-
|
40
|
-
|
41
|
-
|
57
|
+
<!-- solr lib dirs -->
|
58
|
+
<lib dir="../lib/contrib/analysis-extras/lib" />
|
59
|
+
<lib dir="../lib/contrib/analysis-extras/lucene-libs" />
|
60
|
+
|
61
|
+
<dataDir>${solr.data.dir:}</dataDir>
|
42
62
|
|
43
|
-
|
44
|
-
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
|
45
|
-
<!-- Tell Lucene when to flush documents to disk.
|
46
|
-
Giving Lucene more memory for indexing means faster indexing at the cost of more RAM
|
63
|
+
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
|
47
64
|
|
48
|
-
|
65
|
+
<requestDispatcher handleSelect="true" >
|
66
|
+
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
|
67
|
+
</requestDispatcher>
|
49
68
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
<
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
NOTE: Despite the name, this value does not have any relation to Solr's autoCommit functionality
|
63
|
-
-->
|
64
|
-
<!--<luceneAutoCommit>false</luceneAutoCommit>-->
|
65
|
-
<!--
|
66
|
-
Expert:
|
67
|
-
The Merge Policy in Lucene controls how merging is handled by Lucene. The default in 2.3 is the LogByteSizeMergePolicy, previous
|
68
|
-
versions used LogDocMergePolicy.
|
69
|
+
<requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
|
70
|
+
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
|
71
|
+
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
72
|
+
|
73
|
+
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
|
74
|
+
<lst name="invariants">
|
75
|
+
<str name="q">solrpingquery</str>
|
76
|
+
</lst>
|
77
|
+
<lst name="defaults">
|
78
|
+
<str name="echoParams">all</str>
|
79
|
+
</lst>
|
80
|
+
</requestHandler>
|
69
81
|
|
70
|
-
|
71
|
-
|
82
|
+
<!-- config for the admin interface -->
|
83
|
+
<admin>
|
84
|
+
<defaultQuery>search</defaultQuery>
|
85
|
+
</admin>
|
72
86
|
|
73
|
-
Other implementations of MergePolicy must have a no-argument constructor
|
74
|
-
-->
|
75
|
-
<!--<mergePolicy>org.apache.lucene.index.LogByteSizeMergePolicy</mergePolicy>-->
|
76
87
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
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<-1 5<-2 6<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>
|
83
200
|
|
84
|
-
|
85
|
-
|
201
|
+
</lst>
|
202
|
+
<arr name="last-components">
|
203
|
+
<str>spellcheck</str>
|
204
|
+
</arr>
|
86
205
|
|
87
|
-
|
88
|
-
or when there is no possibility of another process trying
|
89
|
-
to modify the index.
|
90
|
-
native = NativeFSLockFactory
|
91
|
-
simple = SimpleFSLockFactory
|
92
|
-
|
93
|
-
(For backwards compatibility with Solr 1.2, 'simple' is the default
|
94
|
-
if not specified.)
|
95
|
-
-->
|
96
|
-
<lockType>single</lockType>
|
97
|
-
</indexDefaults>
|
98
|
-
|
99
|
-
<mainIndex>
|
100
|
-
<!-- options specific to the main on-disk lucene index -->
|
101
|
-
<useCompoundFile>false</useCompoundFile>
|
102
|
-
<ramBufferSizeMB>32</ramBufferSizeMB>
|
103
|
-
<mergeFactor>10</mergeFactor>
|
104
|
-
<!-- Deprecated -->
|
105
|
-
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
|
106
|
-
<maxMergeDocs>2147483647</maxMergeDocs>
|
107
|
-
<maxFieldLength>10000</maxFieldLength>
|
108
|
-
|
109
|
-
<!-- If true, unlock any held write or commit locks on startup.
|
110
|
-
This defeats the locking mechanism that allows multiple
|
111
|
-
processes to safely access a lucene index, and should be
|
112
|
-
used with care.
|
113
|
-
This is not needed if lock type is 'none' or 'single'
|
114
|
-
-->
|
115
|
-
<unlockOnStartup>false</unlockOnStartup>
|
116
|
-
</mainIndex>
|
117
|
-
|
118
|
-
<!-- Enables JMX if and only if an existing MBeanServer is found, use
|
119
|
-
this if you want to configure JMX through JVM parameters. Remove
|
120
|
-
this to disable exposing Solr configuration and statistics to JMX.
|
121
|
-
|
122
|
-
If you want to connect to a particular server, specify the agentId
|
123
|
-
e.g. <jmx agentId="myAgent" />
|
124
|
-
|
125
|
-
If you want to start a new MBeanServer, specify the serviceUrl
|
126
|
-
e.g <jmx serviceurl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr" />
|
127
|
-
|
128
|
-
For more details see http://wiki.apache.org/solr/SolrJmx
|
129
|
-
-->
|
130
|
-
<jmx />
|
131
|
-
|
132
|
-
<!-- the default high-performance update handler -->
|
133
|
-
<updateHandler class="solr.DirectUpdateHandler2">
|
134
|
-
|
135
|
-
<!-- A prefix of "solr." for class names is an alias that
|
136
|
-
causes solr to search appropriate packages, including
|
137
|
-
org.apache.solr.(search|update|request|core|analysis)
|
138
|
-
-->
|
139
|
-
|
140
|
-
<!-- Perform a <commit/> automatically under certain conditions:
|
141
|
-
maxDocs - number of updates since last commit is greater than this
|
142
|
-
maxTime - oldest uncommited update (in ms) is this long ago
|
143
|
-
<autoCommit>
|
144
|
-
<maxDocs>10000</maxDocs>
|
145
|
-
<maxTime>1000</maxTime>
|
146
|
-
</autoCommit>
|
147
|
-
-->
|
206
|
+
</requestHandler>
|
148
207
|
|
149
|
-
<!-- The RunExecutableListener executes an external command.
|
150
|
-
exe - the name of the executable to run
|
151
|
-
dir - dir to use as the current working directory. default="."
|
152
|
-
wait - the calling thread waits until the executable returns. default="true"
|
153
|
-
args - the arguments to pass to the program. default=nothing
|
154
|
-
env - environment variables to set. default=nothing
|
155
|
-
-->
|
156
|
-
<!-- A postCommit event is fired after every commit or optimize command
|
157
|
-
<listener event="postCommit" class="solr.RunExecutableListener">
|
158
|
-
<str name="exe">solr/bin/snapshooter</str>
|
159
|
-
<str name="dir">.</str>
|
160
|
-
<bool name="wait">true</bool>
|
161
|
-
<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
|
162
|
-
<arr name="env"> <str>MYVAR=val1</str> </arr>
|
163
|
-
</listener>
|
164
|
-
-->
|
165
|
-
<!-- A postOptimize event is fired only after every optimize command, useful
|
166
|
-
in conjunction with index distribution to only distribute optimized indicies
|
167
|
-
<listener event="postOptimize" class="solr.RunExecutableListener">
|
168
|
-
<str name="exe">snapshooter</str>
|
169
|
-
<str name="dir">solr/bin</str>
|
170
|
-
<bool name="wait">true</bool>
|
171
|
-
</listener>
|
172
|
-
-->
|
173
208
|
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
<query>
|
178
|
-
<!-- Maximum number of clauses in a boolean query... can affect
|
179
|
-
range or prefix queries that expand to big boolean
|
180
|
-
queries. An exception is thrown if exceeded. -->
|
181
|
-
<maxBooleanClauses>1024</maxBooleanClauses>
|
182
|
-
|
183
|
-
|
184
|
-
<!-- Cache used by SolrIndexSearcher for filters (DocSets),
|
185
|
-
unordered sets of *all* documents that match a query.
|
186
|
-
When a new searcher is opened, its caches may be prepopulated
|
187
|
-
or "autowarmed" using data from caches in the old searcher.
|
188
|
-
autowarmCount is the number of items to prepopulate. For LRUCache,
|
189
|
-
the autowarmed items will be the most recently accessed items.
|
190
|
-
Parameters:
|
191
|
-
class - the SolrCache implementation (currently only LRUCache)
|
192
|
-
size - the maximum number of entries in the cache
|
193
|
-
initialSize - the initial capacity (number of entries) of
|
194
|
-
the cache. (seel java.util.HashMap)
|
195
|
-
autowarmCount - the number of entries to prepopulate from
|
196
|
-
and old cache.
|
197
|
-
-->
|
198
|
-
<filterCache
|
199
|
-
class="solr.LRUCache"
|
200
|
-
size="512"
|
201
|
-
initialSize="512"
|
202
|
-
autowarmCount="128"/>
|
203
|
-
|
204
|
-
<!-- queryResultCache caches results of searches - ordered lists of
|
205
|
-
document ids (DocList) based on a query, a sort, and the range
|
206
|
-
of documents requested. -->
|
207
|
-
<queryResultCache
|
208
|
-
class="solr.LRUCache"
|
209
|
-
size="512"
|
210
|
-
initialSize="512"
|
211
|
-
autowarmCount="32"/>
|
212
|
-
|
213
|
-
<!-- documentCache caches Lucene Document objects (the stored fields for each document).
|
214
|
-
Since Lucene internal document ids are transient, this cache will not be autowarmed. -->
|
215
|
-
<documentCache
|
216
|
-
class="solr.LRUCache"
|
217
|
-
size="512"
|
218
|
-
initialSize="512"
|
219
|
-
autowarmCount="0"/>
|
220
|
-
|
221
|
-
<!-- If true, stored fields that are not requested will be loaded lazily.
|
222
|
-
|
223
|
-
This can result in a significant speed improvement if the usual case is to
|
224
|
-
not load all stored fields, especially if the skipped fields are large compressed
|
225
|
-
text fields.
|
226
|
-
-->
|
227
|
-
<enableLazyFieldLoading>true</enableLazyFieldLoading>
|
228
|
-
|
229
|
-
<!-- Example of a generic cache. These caches may be accessed by name
|
230
|
-
through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
|
231
|
-
The purpose is to enable easy caching of user/application level data.
|
232
|
-
The regenerator argument should be specified as an implementation
|
233
|
-
of solr.search.CacheRegenerator if autowarming is desired. -->
|
234
|
-
<!--
|
235
|
-
<cache name="myUserCache"
|
236
|
-
class="solr.LRUCache"
|
237
|
-
size="4096"
|
238
|
-
initialSize="1024"
|
239
|
-
autowarmCount="1024"
|
240
|
-
regenerator="org.mycompany.mypackage.MyRegenerator"
|
241
|
-
/>
|
242
|
-
-->
|
209
|
+
<!-- Hydra Additions Start -->
|
243
210
|
|
244
|
-
|
245
|
-
If the requested sort does not include score, then the filterCache
|
246
|
-
will be checked for a filter matching the query. If found, the filter
|
247
|
-
will be used as the source of document ids, and then the sort will be
|
248
|
-
applied to that.
|
249
|
-
<useFilterForSortedQuery>true</useFilterForSortedQuery>
|
250
|
-
-->
|
251
|
-
|
252
|
-
<!-- An optimization for use with the queryResultCache. When a search
|
253
|
-
is requested, a superset of the requested number of document ids
|
254
|
-
are collected. For example, if a search for a particular query
|
255
|
-
requests matching documents 10 through 19, and queryWindowSize is 50,
|
256
|
-
then documents 0 through 49 will be collected and cached. Any further
|
257
|
-
requests in that range can be satisfied via the cache. -->
|
258
|
-
<queryResultWindowSize>50</queryResultWindowSize>
|
259
|
-
|
260
|
-
<!-- Maximum number of documents to cache for any entry in the
|
261
|
-
queryResultCache. -->
|
262
|
-
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
|
263
|
-
|
264
|
-
<!-- This entry enables an int hash representation for filters (DocSets)
|
265
|
-
when the number of items in the set is less than maxSize. For smaller
|
266
|
-
sets, this representation is more memory efficient, more efficient to
|
267
|
-
iterate over, and faster to take intersections. -->
|
268
|
-
<HashDocSet maxSize="3000" loadFactor="0.75"/>
|
269
|
-
|
270
|
-
<!-- a newSearcher event is fired whenever a new searcher is being prepared
|
271
|
-
and there is a current searcher handling requests (aka registered). -->
|
272
|
-
<!-- QuerySenderListener takes an array of NamedList and executes a
|
273
|
-
local query request for each NamedList in sequence. -->
|
274
|
-
<listener event="newSearcher" class="solr.QuerySenderListener">
|
275
|
-
<arr name="queries">
|
276
|
-
<lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
|
277
|
-
<lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
|
278
|
-
<lst><str name="q">static newSearcher warming query from solrconfig.xml</str></lst>
|
279
|
-
</arr>
|
280
|
-
</listener>
|
281
|
-
|
282
|
-
<!-- a firstSearcher event is fired whenever a new searcher is being
|
283
|
-
prepared but there is no current registered searcher to handle
|
284
|
-
requests or to gain autowarming data from. -->
|
285
|
-
<listener event="firstSearcher" class="solr.QuerySenderListener">
|
286
|
-
<arr name="queries">
|
287
|
-
<lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
|
288
|
-
<lst><str name="q">static firstSearcher warming query from solrconfig.xml</str></lst>
|
289
|
-
</arr>
|
290
|
-
</listener>
|
291
|
-
|
292
|
-
<!-- If a search request comes in and there is no current registered searcher,
|
293
|
-
then immediately register the still warming searcher and use it. If
|
294
|
-
"false" then all requests will block until the first searcher is done
|
295
|
-
warming. -->
|
296
|
-
<useColdSearcher>false</useColdSearcher>
|
297
|
-
|
298
|
-
<!-- Maximum number of searchers that may be warming in the background
|
299
|
-
concurrently. An error is returned if this limit is exceeded. Recommend
|
300
|
-
1-2 for read-only slaves, higher for masters w/o cache warming. -->
|
301
|
-
<maxWarmingSearchers>2</maxWarmingSearchers>
|
302
|
-
|
303
|
-
</query>
|
304
|
-
|
305
|
-
<!--
|
306
|
-
Let the dispatch filter handler /select?qt=XXX
|
307
|
-
handleSelect=true will use consistent error handling for /select and /update
|
308
|
-
handleSelect=false will use solr1.1 style error formatting
|
309
|
-
-->
|
310
|
-
<requestDispatcher handleSelect="true" >
|
311
|
-
<!--Make sure your system has some authentication before enabling remote streaming! -->
|
312
|
-
<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
|
313
|
-
|
314
|
-
<!-- Set HTTP caching related parameters (for proxy caches and clients).
|
315
|
-
|
316
|
-
To get the behaviour of Solr 1.2 (ie: no caching related headers)
|
317
|
-
use the never304="true" option and do not specify a value for
|
318
|
-
<cacheControl>
|
319
|
-
-->
|
320
|
-
<!-- <httpCaching never304="true"> -->
|
321
|
-
<httpCaching lastModifiedFrom="openTime"
|
322
|
-
etagSeed="Solr">
|
323
|
-
<!-- lastModFrom="openTime" is the default, the Last-Modified value
|
324
|
-
(and validation against If-Modified-Since requests) will all be
|
325
|
-
relative to when the current Searcher was opened.
|
326
|
-
You can change it to lastModFrom="dirLastMod" if you want the
|
327
|
-
value to exactly corrispond to when the physical index was last
|
328
|
-
modified.
|
329
|
-
|
330
|
-
etagSeed="..." is an option you can change to force the ETag
|
331
|
-
header (and validation against If-None-Match requests) to be
|
332
|
-
differnet even if the index has not changed (ie: when making
|
333
|
-
significant changes to your config file)
|
334
|
-
|
335
|
-
lastModifiedFrom and etagSeed are both ignored if you use the
|
336
|
-
never304="true" option.
|
337
|
-
-->
|
338
|
-
<!-- If you include a <cacheControl> directive, it will be used to
|
339
|
-
generate a Cache-Control header, as well as an Expires header
|
340
|
-
if the value contains "max-age="
|
341
|
-
|
342
|
-
By default, no Cache-Control header is generated.
|
343
|
-
|
344
|
-
You can use the <cacheControl> option even if you have set
|
345
|
-
never304="true"
|
346
|
-
-->
|
347
|
-
<!-- <cacheControl>max-age=30, public</cacheControl> -->
|
348
|
-
</httpCaching>
|
349
|
-
</requestDispatcher>
|
350
|
-
|
351
|
-
|
352
|
-
<!-- requestHandler plugins... incoming queries will be dispatched to the
|
353
|
-
correct handler based on the path or the qt (query type) param.
|
354
|
-
Names starting with a '/' are accessed with the a path equal to the
|
355
|
-
registered name. Names without a leading '/' are accessed with:
|
356
|
-
http://host/app/select?qt=name
|
357
|
-
If no qt is defined, the requestHandler that declares default="true"
|
358
|
-
will be used.
|
359
|
-
-->
|
360
|
-
<requestHandler name="standard" class="solr.SearchHandler" default="true">
|
361
|
-
<!-- default values for query parameters -->
|
211
|
+
<requestHandler name="standard" class="solr.SearchHandler">
|
362
212
|
<lst name="defaults">
|
363
213
|
<str name="echoParams">explicit</str>
|
364
|
-
<!--
|
365
|
-
<int name="rows">10</int>
|
366
|
-
<str name="fl">*</str>
|
367
|
-
<str name="version">2.1</str>
|
368
|
-
-->
|
369
214
|
</lst>
|
370
215
|
</requestHandler>
|
371
216
|
|
372
|
-
|
373
|
-
<requestHandler name="search" class="solr.SearchHandler" >
|
217
|
+
<requestHandler name="permissions" class="solr.SearchHandler" >
|
374
218
|
<lst name="defaults">
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
<str name="facet">on</str>
|
380
|
-
<str name="facet.mincount">1</str>
|
381
|
-
<str name="echoParams">explicit</str>
|
382
|
-
<float name="tie">0.01</float>
|
383
|
-
<str name="qf_dismax">id^0.8 id_t^0.8 title_t^0.3 mods_t^0.2</str>
|
384
|
-
<str name="pf_dismax">id^0.9 id_t^0.9 title_t^0.5 mods_t^0.2</str>
|
385
|
-
<str name="fl">
|
386
|
-
id,title_t,date_t,year_facet,month_facet,has_model_s,has_collection_member_s,system_create_dt,
|
387
|
-
person_0_role_t,person_1_role_t,person_2_role_t,person_3_role_t,person_4_role_t,person_5_role_t,person_6_role_t,
|
388
|
-
person_7_role_t,person_8_role_t,person_9_role_t,
|
389
|
-
person_0_first_name_t,person_1_first_name_t,person_2_first_name_t,person_3_first_name_t,person_4_first_name_t,
|
390
|
-
person_5_first_name_t,person_6_first_name_t,person_7_first_name_t,person_8_first_name_t,person_9_first_name_t,
|
391
|
-
person_0_last_name_t,person_1_last_name_t,person_2_last_name_t,person_3_last_name_t,person_4_last_name_t,
|
392
|
-
person_5_last_name_t,person_6_last_name_t,person_7_last_name_t,person_8_last_name_t,person_9_last_name_t,
|
393
|
-
status_t,subject_t,depositor_t,
|
394
|
-
journal_title_info_t,journal_issue_publication_date_t,
|
395
|
-
journal_issue_pages_end_t,journal_issue_volume_t,journal_title_info_main_title_t,journal_issue_pages_start_t,
|
396
|
-
journal_issue_start_page_t, journal_issue_end_page_t, abstract_t,
|
397
|
-
person_0_institution_t,person_1_institution_t,person_2_institution_t,person_3_institution_t,person_4_institution_t,person_5_institution_t,person_institution_role_t,
|
398
|
-
person_7_institution_t,person_8_institution_t,person_9_institution_t,
|
399
|
-
mods_gps_t, mods_region_t, mods_site_t, mods_ecosystem_t,
|
400
|
-
mods_timespan_start_t, mods_timespan_end_t, description_t, mods_title_info_main_title_t, mods_0_title_info_0_main_title_t, embargo_release_date_dt, note_t,
|
401
|
-
object_type_facet, department_facet, peer_reviewed_facet
|
402
|
-
</str>
|
403
|
-
<str name="mm">
|
404
|
-
2<-1 5<-2 6<90%
|
405
|
-
</str>
|
406
|
-
<int name="ps">100</int>
|
407
|
-
<str name="q.alt">*:*</str>
|
408
|
-
<!-- example highlighter config, enable per-query with hl=true -->
|
409
|
-
<str name="hl.fl">text features name</str>
|
410
|
-
<!-- for this field, we want no fragmenting, just highlighting -->
|
411
|
-
<str name="f.name.hl.fragsize">0</str>
|
412
|
-
<!-- instructs Solr to return the field itself if no query terms are found -->
|
413
|
-
<str name="f.name.hl.alternateField">name</str>
|
414
|
-
<str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
|
415
|
-
</lst>
|
416
|
-
</requestHandler>
|
417
|
-
|
418
|
-
<requestHandler name="public_search" class="solr.SearchHandler" >
|
419
|
-
<lst name="defaults">
|
420
|
-
<!-- Making defType lucene to exclude file assets -->
|
421
|
-
<str name="defType">lucene</str>
|
422
|
-
<str name="df">has_model_s</str>
|
423
|
-
<str name="q.op">AND</str>
|
424
|
-
<str name="facet">on</str>
|
425
|
-
<str name="facet.mincount">1</str>
|
426
|
-
<str name="echoParams">explicit</str>
|
427
|
-
<float name="tie">0.01</float>
|
428
|
-
<str name="qf_dismax">id^0.8 id_t^0.8 format text^0.3</str>
|
429
|
-
<str name="pf_dismax">id^0.9 id_t^0.9 text^0.5</str>
|
219
|
+
<str name="facet">off</str>
|
220
|
+
<str name="echoParams">all</str>
|
221
|
+
<str name="rows">1</str>
|
222
|
+
<str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
|
430
223
|
<str name="fl">
|
431
|
-
id,
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
person_0_institution_t,person_1_institution_t,person_2_institution_t,person_3_institution_t,person_4_institution_t,person_5_institution_t,person_institution_role_t,
|
438
|
-
person_7_institution_t,person_8_institution_t,person_9_institution_t,
|
439
|
-
mods_gps_t, mods_region_t, mods_site_t, mods_ecosystem_t,
|
440
|
-
mods_timespan_start_t, mods_timespan_end_t, description_t, mods_title_info_t,mods_0_title_info_0_main_title_t, embargo_release_date_dt, note_t,
|
441
|
-
object_type_facet, department_facet, peer_reviewed_facet
|
224
|
+
id,access_t,
|
225
|
+
discover_access_group_t,discover_access_person_t,
|
226
|
+
read_access_group_t,read_access_person_t,
|
227
|
+
edit_access_group_t,edit_access_person_t,
|
228
|
+
depositor_t,
|
229
|
+
embargo_release_date_dt
|
442
230
|
</str>
|
443
|
-
<str name="mm">
|
444
|
-
2<-1 5<-2 6<90%
|
445
|
-
</str>
|
446
|
-
<int name="ps">100</int>
|
447
|
-
<str name="q.alt">*:*</str>
|
448
|
-
<!-- example highlighter config, enable per-query with hl=true -->
|
449
|
-
<str name="hl.fl">text features name</str>
|
450
|
-
<!-- for this field, we want no fragmenting, just highlighting -->
|
451
|
-
<str name="f.name.hl.fragsize">0</str>
|
452
|
-
<!-- instructs Solr to return the field itself if no query terms are found -->
|
453
|
-
<str name="f.name.hl.alternateField">name</str>
|
454
|
-
<str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
|
455
|
-
</lst>
|
456
|
-
</requestHandler>
|
457
|
-
|
458
|
-
<requestHandler name="fulltext" class="solr.SearchHandler" >
|
459
|
-
<lst name="defaults">
|
460
|
-
<str name="defType">dismax</str>
|
461
|
-
<str name="facet">on</str>
|
462
|
-
<str name="facet.mincount">1</str>
|
463
|
-
<str name="echoParams">explicit</str>
|
464
|
-
<float name="tie">0.01</float>
|
465
|
-
<str name="qf">id^0.8 id_t^0.8 format text^0.3</str>
|
466
|
-
<str name="pf">id^0.9 id_t^0.9 text^0.5</str>
|
467
|
-
<str name="fl">
|
468
|
-
id,text,title_t,date_t,year_facet,month_facet,medium_t,series_facet,box_facet,folder_facet
|
469
|
-
</str>
|
470
|
-
<str name="mm">
|
471
|
-
2<-1 5<-2 6<90%
|
472
|
-
</str>
|
473
|
-
<int name="ps">100</int>
|
474
|
-
<str name="q.alt">*:*</str>
|
475
|
-
<!-- example highlighter config, enable per-query with hl=true -->
|
476
|
-
<str name="hl.fl">text features name</str>
|
477
|
-
<!-- for this field, we want no fragmenting, just highlighting -->
|
478
|
-
<str name="f.name.hl.fragsize">0</str>
|
479
|
-
<!-- instructs Solr to return the field itself if no query terms are
|
480
|
-
found -->
|
481
|
-
<str name="f.name.hl.alternateField">name</str>
|
482
|
-
<str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
|
483
231
|
</lst>
|
484
232
|
</requestHandler>
|
485
|
-
|
233
|
+
|
234
|
+
<!-- Hydra Additions End -->
|
235
|
+
|
486
236
|
<!-- for requests to get a single document; use id=666 instead of q=id:666 -->
|
487
237
|
<requestHandler name="document" class="solr.SearchHandler" >
|
488
238
|
<lst name="defaults">
|
@@ -490,351 +240,55 @@ journal_title_info_t, journal_title_info_main_title_t, journal_issue_publication
|
|
490
240
|
<str name="fl">*</str>
|
491
241
|
<str name="rows">1</str>
|
492
242
|
<str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
|
493
|
-
|
494
|
-
<str name="facet">on</str>
|
495
|
-
<str name="facet.mincount">1</str>
|
496
|
-
|
497
|
-
<str name="facet.field">collection_facet</str>
|
498
|
-
<str name="facet.field">technology_facet</str>
|
499
|
-
<str name="facet.field">person_facet</str>
|
500
|
-
<!-- <str name="facet.field">title_t</str> -->
|
501
|
-
<str name="facet.field">city_facet</str>
|
502
|
-
<str name="facet.field">organization_facet</str>
|
503
|
-
<str name="facet.field">company_facet</str>
|
504
|
-
<str name="facet.field">year_facet</str>
|
505
|
-
<str name="facet.field">state_facet</str>
|
506
|
-
<str name="facet.field">series_facet</str>
|
507
|
-
<str name="facet.field">box_facet</str>
|
508
|
-
<str name="facet.field">folder_facet</str>
|
509
|
-
<str name="facet.field">donor_tags_facet</str>
|
510
|
-
<str name="facet.field">archivist_tags_facet</str>
|
511
|
-
|
512
|
-
</lst>
|
513
|
-
</requestHandler>
|
514
|
-
|
515
|
-
<!-- DisMaxRequestHandler allows easy searching across multiple fields
|
516
|
-
for simple user-entered phrases. It's implementation is now
|
517
|
-
just the standard SearchHandler with a default query type
|
518
|
-
of "dismax".
|
519
|
-
see http://wiki.apache.org/solr/DisMaxRequestHandler
|
520
|
-
-->
|
521
|
-
<requestHandler name="dismax" class="solr.SearchHandler" >
|
522
|
-
<lst name="defaults">
|
523
|
-
<str name="facet">on</str>
|
524
|
-
<str name="facet.mincount">1</str>
|
525
|
-
<str name="echoParams">explicit</str>
|
526
|
-
<float name="tie">0.01</float>
|
527
|
-
<str name="qf">
|
528
|
-
text^0.5
|
529
|
-
</str>
|
530
|
-
<str name="pf">
|
531
|
-
text^0.2
|
532
|
-
</str>
|
533
|
-
<str name="bf">
|
534
|
-
ord(popularity)^0.5 recip(rord(price),1,1000,1000)^0.3
|
535
|
-
</str>
|
536
|
-
<str name="fl">
|
537
|
-
id,text,title_facet,date_t,medium_t,location_t
|
538
|
-
</str>
|
539
|
-
<str name="mm">
|
540
|
-
2<-1 5<-2 6<90%
|
541
|
-
</str>
|
542
|
-
<int name="ps">100</int>
|
543
|
-
<str name="q">*:*</str>
|
544
|
-
<str name="q.alt">*:*</str>
|
545
|
-
<!-- example highlighter config, enable per-query with hl=true -->
|
546
|
-
<str name="hl.fl">text features name</str>
|
547
|
-
<!-- for this field, we want no fragmenting, just highlighting -->
|
548
|
-
<str name="f.name.hl.fragsize">0</str>
|
549
|
-
<!-- instructs Solr to return the field itself if no query terms are
|
550
|
-
found -->
|
551
|
-
<str name="f.name.hl.alternateField">name</str>
|
552
|
-
<str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
|
553
243
|
</lst>
|
554
244
|
</requestHandler>
|
555
245
|
|
556
|
-
<!-- Note how you can register the same handler multiple times with
|
557
|
-
different names (and different init parameters)
|
558
|
-
-->
|
559
|
-
<requestHandler name="partitioned" class="solr.SearchHandler" >
|
560
|
-
<lst name="defaults">
|
561
|
-
<str name="defType">dismax</str>
|
562
|
-
<str name="echoParams">explicit</str>
|
563
|
-
<str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
|
564
|
-
<str name="mm">2<-1 5<-2 6<90%</str>
|
565
|
-
<!-- This is an example of using Date Math to specify a constantly
|
566
|
-
moving date range in a config...
|
567
|
-
-->
|
568
|
-
<str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
|
569
|
-
</lst>
|
570
|
-
<!-- In addition to defaults, "appends" params can be specified
|
571
|
-
to identify values which should be appended to the list of
|
572
|
-
multi-val params from the query (or the existing "defaults").
|
573
|
-
|
574
|
-
In this example, the param "fq=instock:true" will be appended to
|
575
|
-
any query time fq params the user may specify, as a mechanism for
|
576
|
-
partitioning the index, independent of any user selected filtering
|
577
|
-
that may also be desired (perhaps as a result of faceted searching).
|
578
|
-
|
579
|
-
NOTE: there is *absolutely* nothing a client can do to prevent these
|
580
|
-
"appends" values from being used, so don't use this mechanism
|
581
|
-
unless you are sure you always want it.
|
582
|
-
-->
|
583
|
-
<lst name="appends">
|
584
|
-
<str name="fq">inStock:true</str>
|
585
|
-
</lst>
|
586
|
-
<!-- "invariants" are a way of letting the Solr maintainer lock down
|
587
|
-
the options available to Solr clients. Any params values
|
588
|
-
specified here are used regardless of what values may be specified
|
589
|
-
in either the query, the "defaults", or the "appends" params.
|
590
|
-
|
591
|
-
In this example, the facet.field and facet.query params are fixed,
|
592
|
-
limiting the facets clients can use. Faceting is not turned on by
|
593
|
-
default - but if the client does specify facet=true in the request,
|
594
|
-
these are the only facets they will be able to see counts for;
|
595
|
-
regardless of what other facet.field or facet.query params they
|
596
|
-
may specify.
|
597
|
-
|
598
|
-
NOTE: there is *absolutely* nothing a client can do to prevent these
|
599
|
-
"invariants" values from being used, so don't use this mechanism
|
600
|
-
unless you are sure you always want it.
|
601
|
-
-->
|
602
|
-
<lst name="invariants">
|
603
|
-
<str name="facet.field">cat</str>
|
604
|
-
<str name="facet.field">manu_exact</str>
|
605
|
-
<str name="facet.query">price:[* TO 500]</str>
|
606
|
-
<str name="facet.query">price:[500 TO *]</str>
|
607
|
-
</lst>
|
608
|
-
</requestHandler>
|
609
|
-
|
610
246
|
|
611
|
-
<!--
|
612
|
-
Search components are registered to SolrCore and used by Search Handlers
|
613
|
-
|
614
|
-
By default, the following components are avaliable:
|
615
|
-
|
616
|
-
<searchComponent name="query" class="org.apache.solr.handler.component.QueryComponent" />
|
617
|
-
<searchComponent name="facet" class="org.apache.solr.handler.component.FacetComponent" />
|
618
|
-
<searchComponent name="mlt" class="org.apache.solr.handler.component.MoreLikeThisComponent" />
|
619
|
-
<searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" />
|
620
|
-
<searchComponent name="debug" class="org.apache.solr.handler.component.DebugComponent" />
|
621
|
-
|
622
|
-
Default configuration in a requestHandler would look like:
|
623
|
-
<arr name="components">
|
624
|
-
<str>query</str>
|
625
|
-
<str>facet</str>
|
626
|
-
<str>mlt</str>
|
627
|
-
<str>highlight</str>
|
628
|
-
<str>debug</str>
|
629
|
-
</arr>
|
630
247
|
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
<str>myFirstComponentName</str>
|
636
|
-
</arr>
|
637
|
-
|
638
|
-
<arr name="last-components">
|
639
|
-
<str>myLastComponentName</str>
|
640
|
-
</arr>
|
641
|
-
-->
|
248
|
+
<!-- Spell Check
|
249
|
+
|
250
|
+
The spell check component can return a list of alternative spelling
|
251
|
+
suggestions.
|
642
252
|
|
643
|
-
|
644
|
-
|
253
|
+
http://wiki.apache.org/solr/SpellCheckComponent
|
254
|
+
-->
|
645
255
|
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
646
256
|
|
647
257
|
<str name="queryAnalyzerFieldType">textSpell</str>
|
648
258
|
|
259
|
+
<!-- Multiple "Spell Checkers" can be declared and used by this
|
260
|
+
component
|
261
|
+
-->
|
262
|
+
|
263
|
+
<!-- a spellchecker built from a field of the main index, and
|
264
|
+
written to disk
|
265
|
+
-->
|
649
266
|
<lst name="spellchecker">
|
650
267
|
<str name="name">default</str>
|
651
268
|
<str name="field">spell</str>
|
652
|
-
<str name="spellcheckIndexDir">./
|
653
|
-
|
269
|
+
<str name="spellcheckIndexDir">./spell</str>
|
270
|
+
<str name="buildOnOptimize">true</str>
|
654
271
|
</lst>
|
655
272
|
<lst name="spellchecker">
|
656
|
-
<str name="name">
|
657
|
-
<str name="field">
|
658
|
-
|
659
|
-
<str name="
|
660
|
-
<str name="
|
661
|
-
|
273
|
+
<str name="name">author</str>
|
274
|
+
<str name="field">author_spell</str>
|
275
|
+
<str name="spellcheckIndexDir">./spell_author</str>
|
276
|
+
<str name="accuracy">0.7</str>
|
277
|
+
<str name="buildOnOptimize">true</str>
|
662
278
|
</lst>
|
663
|
-
|
664
279
|
<lst name="spellchecker">
|
665
|
-
<str name="
|
666
|
-
<str name="
|
667
|
-
<str name="
|
668
|
-
<str name="
|
669
|
-
<str name="
|
280
|
+
<str name="name">subject</str>
|
281
|
+
<str name="field">subject_spell</str>
|
282
|
+
<str name="spellcheckIndexDir">./spell_subject</str>
|
283
|
+
<str name="accuracy">0.7</str>
|
284
|
+
<str name="buildOnOptimize">true</str>
|
670
285
|
</lst>
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
<str name="spellcheck.onlyMorePopular">false</str>
|
678
|
-
<!-- exr = Extended Results -->
|
679
|
-
<str name="spellcheck.extendedResults">false</str>
|
680
|
-
<!-- The number of suggestions to return -->
|
681
|
-
<str name="spellcheck.count">1</str>
|
286
|
+
<lst name="spellchecker">
|
287
|
+
<str name="name">title</str>
|
288
|
+
<str name="field">title_spell</str>
|
289
|
+
<str name="spellcheckIndexDir">./spell_title</str>
|
290
|
+
<str name="accuracy">0.7</str>
|
291
|
+
<str name="buildOnOptimize">true</str>
|
682
292
|
</lst>
|
683
|
-
<arr name="last-components">
|
684
|
-
<str>spellcheck</str>
|
685
|
-
</arr>
|
686
|
-
</requestHandler>
|
687
|
-
|
688
|
-
<!-- a search component that enables you to configure the top results for
|
689
|
-
a given query regardless of the normal lucene scoring.-->
|
690
|
-
<searchComponent name="elevator" class="solr.QueryElevationComponent" >
|
691
|
-
<!-- pick a fieldType to analyze queries -->
|
692
|
-
<str name="queryFieldType">string</str>
|
693
|
-
<str name="config-file">elevate.xml</str>
|
694
293
|
</searchComponent>
|
695
|
-
|
696
|
-
<!-- a request handler utilizing the elevator component -->
|
697
|
-
<requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
|
698
|
-
<lst name="defaults">
|
699
|
-
<str name="echoParams">explicit</str>
|
700
|
-
</lst>
|
701
|
-
<arr name="last-components">
|
702
|
-
<str>elevator</str>
|
703
|
-
</arr>
|
704
|
-
</requestHandler>
|
705
|
-
|
706
|
-
|
707
|
-
<!-- Update request handler.
|
708
|
-
|
709
|
-
Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
|
710
|
-
the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
|
711
|
-
The response format differs from solr1.1 formatting and returns a standard error code.
|
712
|
-
|
713
|
-
To enable solr1.1 behavior, remove the /update handler or change its path
|
714
|
-
-->
|
715
|
-
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
|
716
|
-
|
717
|
-
<!--
|
718
|
-
Analysis request handler. Since Solr 1.3. Use to returnhow a document is analyzed. Useful
|
719
|
-
for debugging and as a token server for other types of applications
|
720
|
-
-->
|
721
|
-
<requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
|
722
|
-
|
723
|
-
|
724
|
-
<!-- CSV update handler, loaded on demand -->
|
725
|
-
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
|
726
|
-
|
727
|
-
|
728
|
-
<!--
|
729
|
-
Admin Handlers - This will register all the standard admin RequestHandlers. Adding
|
730
|
-
this single handler is equivolent to registering:
|
731
|
-
|
732
|
-
<requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
|
733
|
-
<requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" />
|
734
|
-
<requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" />
|
735
|
-
<requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" />
|
736
|
-
<requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
|
737
|
-
<requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
|
738
|
-
|
739
|
-
If you wish to hide files under ${solr.home}/conf, explicitly register the ShowFileRequestHandler using:
|
740
|
-
<requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
|
741
|
-
<lst name="invariants">
|
742
|
-
<str name="hidden">synonyms.txt</str>
|
743
|
-
<str name="hidden">anotherfile.txt</str>
|
744
|
-
</lst>
|
745
|
-
</requestHandler>
|
746
|
-
-->
|
747
|
-
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
748
|
-
|
749
|
-
<!-- ping/healthcheck -->
|
750
|
-
<requestHandler name="/admin/ping" class="PingRequestHandler">
|
751
|
-
<lst name="defaults">
|
752
|
-
<str name="qt">standard</str>
|
753
|
-
<str name="q">solrpingquery</str>
|
754
|
-
<str name="echoParams">all</str>
|
755
|
-
</lst>
|
756
|
-
</requestHandler>
|
757
|
-
|
758
|
-
<!-- Echo the request contents back to the client -->
|
759
|
-
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
|
760
|
-
<lst name="defaults">
|
761
|
-
<str name="echoParams">explicit</str> <!-- for all params (including the default etc) use: 'all' -->
|
762
|
-
<str name="echoHandler">true</str>
|
763
|
-
</lst>
|
764
|
-
</requestHandler>
|
765
|
-
|
766
|
-
<highlighting>
|
767
|
-
<!-- Configure the standard fragmenter -->
|
768
|
-
<!-- This could most likely be commented out in the "default" case -->
|
769
|
-
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
|
770
|
-
<lst name="defaults">
|
771
|
-
<int name="hl.fragsize">100</int>
|
772
|
-
</lst>
|
773
|
-
</fragmenter>
|
774
|
-
|
775
|
-
<!-- A regular-expression-based fragmenter (f.i., for sentence extraction) -->
|
776
|
-
<fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
|
777
|
-
<lst name="defaults">
|
778
|
-
<!-- slightly smaller fragsizes work better because of slop -->
|
779
|
-
<int name="hl.fragsize">70</int>
|
780
|
-
<!-- allow 50% slop on fragment sizes -->
|
781
|
-
<float name="hl.regex.slop">0.5</float>
|
782
|
-
<!-- a basic sentence pattern -->
|
783
|
-
<str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
|
784
|
-
</lst>
|
785
|
-
</fragmenter>
|
786
|
-
|
787
|
-
<!-- Configure the standard formatter -->
|
788
|
-
<formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
|
789
|
-
<lst name="defaults">
|
790
|
-
<str name="hl.simple.pre"><![CDATA[<em>]]></str>
|
791
|
-
<str name="hl.simple.post"><![CDATA[</em>]]></str>
|
792
|
-
</lst>
|
793
|
-
</formatter>
|
794
|
-
</highlighting>
|
795
|
-
|
796
|
-
|
797
|
-
<!-- queryResponseWriter plugins... query responses will be written using the
|
798
|
-
writer specified by the 'wt' request parameter matching the name of a registered
|
799
|
-
writer.
|
800
|
-
The "default" writer is the default and will be used if 'wt' is not specified
|
801
|
-
in the request. XMLResponseWriter will be used if nothing is specified here.
|
802
|
-
The json, python, and ruby writers are also available by default.
|
803
|
-
|
804
|
-
<queryResponseWriter name="xml" class="org.apache.solr.request.XMLResponseWriter" default="true"/>
|
805
|
-
<queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
|
806
|
-
<queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/>
|
807
|
-
<queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>
|
808
|
-
<queryResponseWriter name="php" class="org.apache.solr.request.PHPResponseWriter"/>
|
809
|
-
<queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/>
|
810
|
-
|
811
|
-
<queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
|
812
|
-
-->
|
813
|
-
|
814
|
-
<!-- XSLT response writer transforms the XML output by any xslt file found
|
815
|
-
in Solr's conf/xslt directory. Changes to xslt files are checked for
|
816
|
-
every xsltCacheLifetimeSeconds.
|
817
|
-
-->
|
818
|
-
<queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
|
819
|
-
<int name="xsltCacheLifetimeSeconds">5</int>
|
820
|
-
</queryResponseWriter>
|
821
|
-
|
822
|
-
|
823
|
-
<!-- example of registering a query parser
|
824
|
-
<queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>
|
825
|
-
-->
|
826
|
-
|
827
|
-
<!-- example of registering a custom function parser
|
828
|
-
<valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" />
|
829
|
-
-->
|
830
|
-
|
831
|
-
<!-- config for the admin interface -->
|
832
|
-
<admin>
|
833
|
-
<defaultQuery>solr</defaultQuery>
|
834
|
-
|
835
|
-
<!-- configure a healthcheck file for servers behind a loadbalancer
|
836
|
-
<healthcheck type="file">server-enabled</healthcheck>
|
837
|
-
-->
|
838
|
-
</admin>
|
839
|
-
|
840
294
|
</config>
|