hydra-core 5.0.0.pre1

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.
Files changed (105) hide show
  1. data/.gitignore +2 -0
  2. data/Rakefile +5 -0
  3. data/app/helpers/blacklight_helper.rb +4 -0
  4. data/app/helpers/facets_helper.rb +4 -0
  5. data/app/helpers/hydra/blacklight_helper_behavior.rb +36 -0
  6. data/app/helpers/hydra/facets_helper_behavior.rb +25 -0
  7. data/app/models/hydra/datastream/properties.rb +24 -0
  8. data/app/models/mods_asset.rb +25 -0
  9. data/app/views/_flash_msg.html.erb +5 -0
  10. data/app/views/catalog/_citation.html.erb +11 -0
  11. data/app/views/catalog/_constraints_element.html.erb +34 -0
  12. data/app/views/catalog/_delete_partials/_default.html.erb +22 -0
  13. data/app/views/catalog/_edit_partials/_default.html.erb +57 -0
  14. data/app/views/catalog/_edit_partials/_default_details.html.erb +13 -0
  15. data/app/views/catalog/_facets.html.erb +37 -0
  16. data/app/views/catalog/_home.html.erb +6 -0
  17. data/app/views/catalog/_home_text.html.erb +4 -0
  18. data/app/views/catalog/_index_partials/_default.html.erb +20 -0
  19. data/app/views/catalog/_index_partials/_default_details.html.erb +14 -0
  20. data/app/views/catalog/_opensearch_response_metadata.html.erb +2 -0
  21. data/app/views/catalog/_show_partials/_default.html.erb +21 -0
  22. data/app/views/catalog/_show_partials/_default_details.html.erb +15 -0
  23. data/app/views/catalog/_show_partials/_facets.html.erb +52 -0
  24. data/app/views/catalog/_sms_form.html.erb +21 -0
  25. data/app/views/catalog/_sort_and_per_page.html.erb +23 -0
  26. data/app/views/catalog/_uva_tabs.html.erb +10 -0
  27. data/app/views/catalog/about.html.erb +0 -0
  28. data/app/views/catalog/show.html.erb +40 -0
  29. data/app/views/layouts/hydra-head.html.erb +47 -0
  30. data/config/jetty.yml +6 -0
  31. data/config/locales/hydra.en.yml +7 -0
  32. data/hydra-core.gemspec +40 -0
  33. data/lib/application_helper.rb +3 -0
  34. data/lib/generators/hydra/assets_generator.rb +50 -0
  35. data/lib/generators/hydra/cucumber_support_generator.rb +29 -0
  36. data/lib/generators/hydra/head_generator.rb +160 -0
  37. data/lib/generators/hydra/hyhead_fixtures_generator.rb +27 -0
  38. data/lib/generators/hydra/templates/catalog_controller.rb +162 -0
  39. data/lib/generators/hydra/templates/config/fedora.yml +14 -0
  40. data/lib/generators/hydra/templates/config/initializers/action_dispatch_http_upload_monkey_patch.rb +12 -0
  41. data/lib/generators/hydra/templates/config/initializers/hydra_config.rb +39 -0
  42. data/lib/generators/hydra/templates/config/role_map_cucumber.yml +10 -0
  43. data/lib/generators/hydra/templates/config/role_map_development.yml +12 -0
  44. data/lib/generators/hydra/templates/config/role_map_production.yml +2 -0
  45. data/lib/generators/hydra/templates/config/role_map_test.yml +15 -0
  46. data/lib/generators/hydra/templates/config/solr.yml +10 -0
  47. data/lib/generators/hydra/templates/config/solr_mappings.yml +22 -0
  48. data/lib/generators/hydra/templates/fedora_conf/conf/development/fedora.fcfg +946 -0
  49. data/lib/generators/hydra/templates/fedora_conf/conf/test/fedora.fcfg +946 -0
  50. data/lib/generators/hydra/templates/solr_conf/conf/schema.xml +692 -0
  51. data/lib/generators/hydra/templates/solr_conf/conf/solrconfig.xml +1887 -0
  52. data/lib/generators/hydra/templates/solr_conf/solr.xml +35 -0
  53. data/lib/hydra-core.rb +1 -0
  54. data/lib/hydra-head.rb +27 -0
  55. data/lib/hydra-head/engine.rb +14 -0
  56. data/lib/hydra-head/routes.rb +90 -0
  57. data/lib/hydra-head/version.rb +4 -0
  58. data/lib/hydra.rb +30 -0
  59. data/lib/hydra/catalog.rb +11 -0
  60. data/lib/hydra/controller.rb +25 -0
  61. data/lib/hydra/controller/controller_behavior.rb +39 -0
  62. data/lib/hydra/controller/repository_controller_behavior.rb +78 -0
  63. data/lib/hydra/controller/upload_behavior.rb +139 -0
  64. data/lib/hydra/global_configurable.rb +46 -0
  65. data/lib/hydra/model_methods.rb +109 -0
  66. data/lib/hydra/model_mixins/common_metadata.rb +25 -0
  67. data/lib/hydra/model_mixins/solr_document_extension.rb +24 -0
  68. data/lib/hydra/models/file_asset.rb +76 -0
  69. data/lib/hydra/repository_controller.rb +28 -0
  70. data/lib/hydra/solr.rb +9 -0
  71. data/lib/railties/active-fedora.rake +1 -0
  72. data/lib/railties/hydra-fixtures.rake +50 -0
  73. data/lib/railties/hydra_jetty.rake +53 -0
  74. data/spec/.gitignore +1 -0
  75. data/spec/controllers/catalog_controller_spec.rb +101 -0
  76. data/spec/controllers/catalog_valid_html_spec.rb +114 -0
  77. data/spec/factories.rb +11 -0
  78. data/spec/helpers/blacklight_helper_spec.rb +15 -0
  79. data/spec/helpers/facets_helper_spec.rb +15 -0
  80. data/spec/lib/catalog_spec.rb +16 -0
  81. data/spec/lib/global_configurable_spec.rb +98 -0
  82. data/spec/lib/model_methods_spec.rb +29 -0
  83. data/spec/lib/repository_controller_behavior_spec.rb +28 -0
  84. data/spec/models/mods_asset_spec.rb +21 -0
  85. data/spec/models/solr_document_spec.rb +17 -0
  86. data/spec/models/user_spec.rb +32 -0
  87. data/spec/rcov.opts +3 -0
  88. data/spec/spec.opts +4 -0
  89. data/spec/spec_helper.rb +26 -0
  90. data/spec/support/Gemfile +12 -0
  91. data/spec/support/app/models/generic_content.rb +23 -0
  92. data/spec/support/app/models/sample.rb +33 -0
  93. data/spec/support/app/models/solr_document.rb +5 -0
  94. data/spec/support/db/migrate/20111101221803_create_searches.rb +16 -0
  95. data/spec/support/lib/generators/test_app_generator.rb +33 -0
  96. data/spec/support/matchers/helper_matcher.rb +14 -0
  97. data/spec/support/matchers/solr_matchers.rb +60 -0
  98. data/spec/support/spec/fixtures/hydra_test_generic_content.foxml.xml +138 -0
  99. data/spec/support/spec/fixtures/hydrangea_fixture_mods_article1.foxml.xml +234 -0
  100. data/spec/unit/hydra-head-engine_spec.rb +8 -0
  101. data/spec/unit/hydra-head_spec.rb +8 -0
  102. data/tasks/hydra-head-fixtures.rake +58 -0
  103. data/tasks/hydra_jetty.rake +53 -0
  104. data/tasks/rspec.rake +53 -0
  105. metadata +469 -0
@@ -0,0 +1,1887 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <!--
3
+ Licensed to the Apache Software Foundation (ASF) under one or more
4
+ contributor license agreements. See the NOTICE file distributed with
5
+ this work for additional information regarding copyright ownership.
6
+ The ASF licenses this file to You under the Apache License, Version 2.0
7
+ (the "License"); you may not use this file except in compliance with
8
+ the License. You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ -->
18
+
19
+ <!--
20
+ For more details about configurations options that may appear in
21
+ this file, see http://wiki.apache.org/solr/SolrConfigXml.
22
+ -->
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
+ -->
50
+ <luceneMatchVersion>LUCENE_35</luceneMatchVersion>
51
+
52
+ <!-- lib directives can be used to instruct Solr to load an Jars
53
+ identified and use them to resolve any "plugins" specified in
54
+ your solrconfig.xml or schema.xml (ie: Analyzers, Request
55
+ Handlers, etc...).
56
+
57
+ All directories and paths are resolved relative to the
58
+ instanceDir.
59
+
60
+ If a "./lib" directory exists in your instanceDir, all files
61
+ found in it are included as if you had used the following
62
+ syntax...
63
+
64
+ <lib dir="./lib" />
65
+ -->
66
+
67
+ <!-- Blacklight jetty solr lib dirs -->
68
+ <lib dir="./contrib/extraction/lib" />
69
+ <lib dir="./contrib/clustering/lib/" />
70
+ <lib dir="./contrib/velocity/lib" />
71
+ <lib dir="./contrib/analysis-extras/lib" />
72
+ <lib dir="./contrib/analysis-extras/lucene-libs" />
73
+
74
+ <!-- A dir option by itself adds any files found in the directory to
75
+ the classpath, this is useful for including all jars in a
76
+ directory.
77
+ -->
78
+ <lib dir="../../contrib/extraction/lib" />
79
+ <lib dir="../../contrib/clustering/lib/" />
80
+ <lib dir="../../contrib/velocity/lib" />
81
+
82
+ <!-- When a regex is specified in addition to a directory, only the
83
+ files in that directory which completely match the regex
84
+ (anchored on both ends) will be included.
85
+ -->
86
+ <lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar" />
87
+ <lib dir="../../dist/" regex="apache-solr-clustering-\d.*\.jar" />
88
+ <lib dir="../../dist/" regex="apache-solr-dataimporthandler-\d.*\.jar" />
89
+ <lib dir="../../dist/" regex="apache-solr-langid-\d.*\.jar" />
90
+ <lib dir="../../dist/" regex="apache-solr-velocity-\d.*\.jar" />
91
+
92
+ <!-- If a dir option (with or without a regex) is used and nothing
93
+ is found that matches, it will be ignored
94
+ -->
95
+ <lib dir="../../contrib/clustering/lib/" />
96
+ <lib dir="/total/crap/dir/ignored" />
97
+
98
+ <!-- an exact path can be used to specify a specific file. This
99
+ will cause a serious error to be logged if it can't be loaded.
100
+ -->
101
+ <!--
102
+ <lib path="../a-jar-that-does-not-exist.jar" />
103
+ -->
104
+
105
+ <!-- Data Directory
106
+
107
+ Used to specify an alternate directory to hold all index data
108
+ other than the default ./data under the Solr home. If
109
+ replication is in use, this should match the replication
110
+ configuration.
111
+ -->
112
+ <dataDir>${solr.data.dir:}</dataDir>
113
+
114
+
115
+ <!-- The DirectoryFactory to use for indexes.
116
+
117
+ solr.StandardDirectoryFactory, the default, is filesystem
118
+ based. solr.RAMDirectoryFactory is memory based, not
119
+ persistent, and doesn't work with replication.
120
+ -->
121
+ <directoryFactory name="DirectoryFactory"
122
+ class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
123
+
124
+
125
+ <!-- Index Defaults
126
+
127
+ Values here affect all index writers and act as a default
128
+ unless overridden.
129
+
130
+ WARNING: See also the <mainIndex> section below for parameters
131
+ that overfor Solr's main Lucene index.
132
+ -->
133
+ <indexDefaults>
134
+
135
+ <useCompoundFile>false</useCompoundFile>
136
+
137
+ <mergeFactor>10</mergeFactor>
138
+ <!-- Sets the amount of RAM that may be used by Lucene indexing
139
+ for buffering added documents and deletions before they are
140
+ flushed to the Directory. -->
141
+ <ramBufferSizeMB>32</ramBufferSizeMB>
142
+ <!-- If both ramBufferSizeMB and maxBufferedDocs is set, then
143
+ Lucene will flush based on whichever limit is hit first.
144
+ -->
145
+ <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
146
+
147
+ <maxFieldLength>10000</maxFieldLength>
148
+ <writeLockTimeout>1000</writeLockTimeout>
149
+
150
+ <!-- Expert: Merge Policy
151
+
152
+ The Merge Policy in Lucene controls how merging is handled by
153
+ Lucene. The default in Solr 3.3 is TieredMergePolicy.
154
+
155
+ The default in 2.3 was the LogByteSizeMergePolicy,
156
+ previous versions used LogDocMergePolicy.
157
+
158
+ LogByteSizeMergePolicy chooses segments to merge based on
159
+ their size. The Lucene 2.2 default, LogDocMergePolicy chose
160
+ when to merge based on number of documents
161
+
162
+ Other implementations of MergePolicy must have a no-argument
163
+ constructor
164
+ -->
165
+ <!--
166
+ <mergePolicy class="org.apache.lucene.index.TieredMergePolicy"/>
167
+ -->
168
+
169
+ <!-- Expert: Merge Scheduler
170
+
171
+ The Merge Scheduler in Lucene controls how merges are
172
+ performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
173
+ can perform merges in the background using separate threads.
174
+ The SerialMergeScheduler (Lucene 2.2 default) does not.
175
+ -->
176
+ <!--
177
+ <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
178
+ -->
179
+
180
+ <!-- LockFactory
181
+
182
+ This option specifies which Lucene LockFactory implementation
183
+ to use.
184
+
185
+ single = SingleInstanceLockFactory - suggested for a
186
+ read-only index or when there is no possibility of
187
+ another process trying to modify the index.
188
+ native = NativeFSLockFactory - uses OS native file locking.
189
+ Do not use when multiple solr webapps in the same
190
+ JVM are attempting to share a single index.
191
+ simple = SimpleFSLockFactory - uses a plain file for locking
192
+
193
+ (For backwards compatibility with Solr 1.2, 'simple' is the
194
+ default if not specified.)
195
+
196
+ More details on the nuances of each LockFactory...
197
+ http://wiki.apache.org/lucene-java/AvailableLockFactories
198
+ -->
199
+ <lockType>native</lockType>
200
+
201
+ <!-- Expert: Controls how often Lucene loads terms into memory
202
+ Default is 128 and is likely good for most everyone.
203
+ -->
204
+ <!-- <termIndexInterval>256</termIndexInterval> -->
205
+ </indexDefaults>
206
+
207
+ <!-- Main Index
208
+
209
+ Values here override the values in the <indexDefaults> section
210
+ for the main on disk index.
211
+ -->
212
+ <mainIndex>
213
+
214
+ <useCompoundFile>false</useCompoundFile>
215
+ <ramBufferSizeMB>32</ramBufferSizeMB>
216
+ <mergeFactor>10</mergeFactor>
217
+
218
+ <!-- Unlock On Startup
219
+
220
+ If true, unlock any held write or commit locks on startup.
221
+ This defeats the locking mechanism that allows multiple
222
+ processes to safely access a lucene index, and should be used
223
+ with care.
224
+
225
+ This is not needed if lock type is 'none' or 'single'
226
+ -->
227
+ <unlockOnStartup>false</unlockOnStartup>
228
+
229
+ <!-- If true, IndexReaders will be reopened (often more efficient)
230
+ instead of closed and then opened.
231
+ -->
232
+ <reopenReaders>true</reopenReaders>
233
+
234
+ <!-- Commit Deletion Policy
235
+
236
+ Custom deletion policies can specified here. The class must
237
+ implement org.apache.lucene.index.IndexDeletionPolicy.
238
+
239
+ http://lucene.apache.org/java/2_9_1/api/all/org/apache/lucene/index/IndexDeletionPolicy.html
240
+
241
+ The standard Solr IndexDeletionPolicy implementation supports
242
+ deleting index commit points on number of commits, age of
243
+ commit point and optimized status.
244
+
245
+ The latest commit point should always be preserved regardless
246
+ of the criteria.
247
+ -->
248
+ <deletionPolicy class="solr.SolrDeletionPolicy">
249
+ <!-- The number of commit points to be kept -->
250
+ <str name="maxCommitsToKeep">1</str>
251
+ <!-- The number of optimized commit points to be kept -->
252
+ <str name="maxOptimizedCommitsToKeep">0</str>
253
+ <!--
254
+ Delete all commit points once they have reached the given age.
255
+ Supports DateMathParser syntax e.g.
256
+ -->
257
+ <!--
258
+ <str name="maxCommitAge">30MINUTES</str>
259
+ <str name="maxCommitAge">1DAY</str>
260
+ -->
261
+ </deletionPolicy>
262
+
263
+ <!-- Lucene Infostream
264
+
265
+ To aid in advanced debugging, Lucene provides an "InfoStream"
266
+ of detailed information when indexing.
267
+
268
+ Setting The value to true will instruct the underlying Lucene
269
+ IndexWriter to write its debugging info the specified file
270
+ -->
271
+ <infoStream file="INFOSTREAM.txt">false</infoStream>
272
+
273
+ </mainIndex>
274
+
275
+ <!-- JMX
276
+
277
+ This example enables JMX if and only if an existing MBeanServer
278
+ is found, use this if you want to configure JMX through JVM
279
+ parameters. Remove this to disable exposing Solr configuration
280
+ and statistics to JMX.
281
+
282
+ For more details see http://wiki.apache.org/solr/SolrJmx
283
+ -->
284
+ <jmx />
285
+ <!-- If you want to connect to a particular server, specify the
286
+ agentId
287
+ -->
288
+ <!-- <jmx agentId="myAgent" /> -->
289
+ <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
290
+ <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
291
+ -->
292
+
293
+ <!-- The default high-performance update handler -->
294
+ <updateHandler class="solr.DirectUpdateHandler2">
295
+
296
+ <!-- AutoCommit
297
+
298
+ Perform a <commit/> automatically under certain conditions.
299
+ Instead of enabling autoCommit, consider using "commitWithin"
300
+ when adding documents.
301
+
302
+ http://wiki.apache.org/solr/UpdateXmlMessages
303
+
304
+ maxDocs - Maximum number of documents to add since the last
305
+ commit before automatically triggering a new commit.
306
+
307
+ maxTime - Maximum amount of time that is allowed to pass
308
+ since a document was added before automaticly
309
+ triggering a new commit.
310
+ -->
311
+ <!--
312
+ <autoCommit>
313
+ <maxDocs>10000</maxDocs>
314
+ <maxTime>1000</maxTime>
315
+ </autoCommit>
316
+ -->
317
+
318
+ <!-- Update Related Event Listeners
319
+
320
+ Various IndexWriter related events can trigger Listeners to
321
+ take actions.
322
+
323
+ postCommit - fired after every commit or optimize command
324
+ postOptimize - fired after every optimize command
325
+ -->
326
+ <!-- The RunExecutableListener executes an external command from a
327
+ hook such as postCommit or postOptimize.
328
+
329
+ exe - the name of the executable to run
330
+ dir - dir to use as the current working directory. (default=".")
331
+ wait - the calling thread waits until the executable returns.
332
+ (default="true")
333
+ args - the arguments to pass to the program. (default is none)
334
+ env - environment variables to set. (default is none)
335
+ -->
336
+ <!-- This example shows how RunExecutableListener could be used
337
+ with the script based replication...
338
+ http://wiki.apache.org/solr/CollectionDistribution
339
+ -->
340
+ <!--
341
+ <listener event="postCommit" class="solr.RunExecutableListener">
342
+ <str name="exe">solr/bin/snapshooter</str>
343
+ <str name="dir">.</str>
344
+ <bool name="wait">true</bool>
345
+ <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
346
+ <arr name="env"> <str>MYVAR=val1</str> </arr>
347
+ </listener>
348
+ -->
349
+ </updateHandler>
350
+
351
+ <!-- IndexReaderFactory
352
+
353
+ Use the following format to specify a custom IndexReaderFactory,
354
+ which allows for alternate IndexReader implementations.
355
+
356
+ ** Experimental Feature **
357
+
358
+ Please note - Using a custom IndexReaderFactory may prevent
359
+ certain other features from working. The API to
360
+ IndexReaderFactory may change without warning or may even be
361
+ removed from future releases if the problems cannot be
362
+ resolved.
363
+
364
+
365
+ ** Features that may not work with custom IndexReaderFactory **
366
+
367
+ The ReplicationHandler assumes a disk-resident index. Using a
368
+ custom IndexReader implementation may cause incompatibility
369
+ with ReplicationHandler and may cause replication to not work
370
+ correctly. See SOLR-1366 for details.
371
+
372
+ -->
373
+ <!--
374
+ <indexReaderFactory name="IndexReaderFactory" class="package.class">
375
+ <str name="someArg">Some Value</str>
376
+ </indexReaderFactory >
377
+ -->
378
+ <!-- By explicitly declaring the Factory, the termIndexDivisor can
379
+ be specified.
380
+ -->
381
+ <!--
382
+ <indexReaderFactory name="IndexReaderFactory"
383
+ class="solr.StandardIndexReaderFactory">
384
+ <int name="setTermIndexDivisor">12</int>
385
+ </indexReaderFactory >
386
+ -->
387
+
388
+
389
+ <query>
390
+ <!-- Max Boolean Clauses
391
+
392
+ Maximum number of clauses in each BooleanQuery, an exception
393
+ is thrown if exceeded.
394
+
395
+ ** WARNING **
396
+
397
+ This option actually modifies a global Lucene property that
398
+ will affect all SolrCores. If multiple solrconfig.xml files
399
+ disagree on this property, the value at any given moment will
400
+ be based on the last SolrCore to be initialized.
401
+
402
+ -->
403
+ <maxBooleanClauses>1024</maxBooleanClauses>
404
+
405
+
406
+ <!-- Solr Internal Query Caches
407
+
408
+ There are two implementations of cache available for Solr,
409
+ LRUCache, based on a synchronized LinkedHashMap, and
410
+ FastLRUCache, based on a ConcurrentHashMap.
411
+
412
+ FastLRUCache has faster gets and slower puts in single
413
+ threaded operation and thus is generally faster than LRUCache
414
+ when the hit ratio of the cache is high (> 75%), and may be
415
+ faster under other scenarios on multi-cpu systems.
416
+ -->
417
+
418
+ <!-- Filter Cache
419
+
420
+ Cache used by SolrIndexSearcher for filters (DocSets),
421
+ unordered sets of *all* documents that match a query. When a
422
+ new searcher is opened, its caches may be prepopulated or
423
+ "autowarmed" using data from caches in the old searcher.
424
+ autowarmCount is the number of items to prepopulate. For
425
+ LRUCache, the autowarmed items will be the most recently
426
+ accessed items.
427
+
428
+ Parameters:
429
+ class - the SolrCache implementation LRUCache or
430
+ (LRUCache or FastLRUCache)
431
+ size - the maximum number of entries in the cache
432
+ initialSize - the initial capacity (number of entries) of
433
+ the cache. (see java.util.HashMap)
434
+ autowarmCount - the number of entries to prepopulate from
435
+ and old cache.
436
+ -->
437
+ <filterCache class="solr.FastLRUCache"
438
+ size="512"
439
+ initialSize="512"
440
+ autowarmCount="0"/>
441
+
442
+ <!-- Query Result Cache
443
+
444
+ Caches results of searches - ordered lists of document ids
445
+ (DocList) based on a query, a sort, and the range of documents requested.
446
+ -->
447
+ <queryResultCache class="solr.LRUCache"
448
+ size="512"
449
+ initialSize="512"
450
+ autowarmCount="0"/>
451
+
452
+ <!-- Document Cache
453
+
454
+ Caches Lucene Document objects (the stored fields for each
455
+ document). Since Lucene internal document ids are transient,
456
+ this cache will not be autowarmed.
457
+ -->
458
+ <documentCache class="solr.LRUCache"
459
+ size="512"
460
+ initialSize="512"
461
+ autowarmCount="0"/>
462
+
463
+ <!-- Field Value Cache
464
+
465
+ Cache used to hold field values that are quickly accessible
466
+ by document id. The fieldValueCache is created by default
467
+ even if not configured here.
468
+ -->
469
+ <!--
470
+ <fieldValueCache class="solr.FastLRUCache"
471
+ size="512"
472
+ autowarmCount="128"
473
+ showItems="32" />
474
+ -->
475
+
476
+ <!-- Custom Cache
477
+
478
+ Example of a generic cache. These caches may be accessed by
479
+ name through SolrIndexSearcher.getCache(),cacheLookup(), and
480
+ cacheInsert(). The purpose is to enable easy caching of
481
+ user/application level data. The regenerator argument should
482
+ be specified as an implementation of solr.CacheRegenerator
483
+ if autowarming is desired.
484
+ -->
485
+ <!--
486
+ <cache name="myUserCache"
487
+ class="solr.LRUCache"
488
+ size="4096"
489
+ initialSize="1024"
490
+ autowarmCount="1024"
491
+ regenerator="com.mycompany.MyRegenerator"
492
+ />
493
+ -->
494
+
495
+
496
+ <!-- Lazy Field Loading
497
+
498
+ If true, stored fields that are not requested will be loaded
499
+ lazily. This can result in a significant speed improvement
500
+ if the usual case is to not load all stored fields,
501
+ especially if the skipped fields are large compressed text
502
+ fields.
503
+ -->
504
+ <enableLazyFieldLoading>true</enableLazyFieldLoading>
505
+
506
+ <!-- Use Filter For Sorted Query
507
+
508
+ A possible optimization that attempts to use a filter to
509
+ satisfy a search. If the requested sort does not include
510
+ score, then the filterCache will be checked for a filter
511
+ matching the query. If found, the filter will be used as the
512
+ source of document ids, and then the sort will be applied to
513
+ that.
514
+
515
+ For most situations, this will not be useful unless you
516
+ frequently get the same search repeatedly with different sort
517
+ options, and none of them ever use "score"
518
+ -->
519
+ <!--
520
+ <useFilterForSortedQuery>true</useFilterForSortedQuery>
521
+ -->
522
+
523
+ <!-- Result Window Size
524
+
525
+ An optimization for use with the queryResultCache. When a search
526
+ is requested, a superset of the requested number of document ids
527
+ are collected. For example, if a search for a particular query
528
+ requests matching documents 10 through 19, and queryWindowSize is 50,
529
+ then documents 0 through 49 will be collected and cached. Any further
530
+ requests in that range can be satisfied via the cache.
531
+ -->
532
+ <queryResultWindowSize>20</queryResultWindowSize>
533
+
534
+ <!-- Maximum number of documents to cache for any entry in the
535
+ queryResultCache.
536
+ -->
537
+ <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
538
+
539
+ <!-- Query Related Event Listeners
540
+
541
+ Various IndexSearcher related events can trigger Listeners to
542
+ take actions.
543
+
544
+ newSearcher - fired whenever a new searcher is being prepared
545
+ and there is a current searcher handling requests (aka
546
+ registered). It can be used to prime certain caches to
547
+ prevent long request times for certain requests.
548
+
549
+ firstSearcher - fired whenever a new searcher is being
550
+ prepared but there is no current registered searcher to handle
551
+ requests or to gain autowarming data from.
552
+
553
+
554
+ -->
555
+ <!-- QuerySenderListener takes an array of NamedList and executes a
556
+ local query request for each NamedList in sequence.
557
+ -->
558
+ <listener event="newSearcher" class="solr.QuerySenderListener">
559
+ <arr name="queries">
560
+ <lst>
561
+ <str name="q">hydrus</str>
562
+ </lst>
563
+ </arr>
564
+ </listener>
565
+ <listener event="firstSearcher" class="solr.QuerySenderListener">
566
+ <arr name="queries">
567
+ <lst>
568
+ <str name="q">hydrus</str>
569
+ </lst>
570
+ </arr>
571
+ </listener>
572
+
573
+ <!-- Use Cold Searcher
574
+
575
+ If a search request comes in and there is no current
576
+ registered searcher, then immediately register the still
577
+ warming searcher and use it. If "false" then all requests
578
+ will block until the first searcher is done warming.
579
+ -->
580
+ <useColdSearcher>false</useColdSearcher>
581
+
582
+ <!-- Max Warming Searchers
583
+
584
+ Maximum number of searchers that may be warming in the
585
+ background concurrently. An error is returned if this limit
586
+ is exceeded.
587
+
588
+ Recommend values of 1-2 for read-only slaves, higher for
589
+ masters w/o cache warming.
590
+ -->
591
+ <maxWarmingSearchers>2</maxWarmingSearchers>
592
+
593
+ </query>
594
+
595
+
596
+ <!-- Request Dispatcher
597
+
598
+ This section contains instructions for how the SolrDispatchFilter
599
+ should behave when processing requests for this SolrCore.
600
+
601
+ handleSelect affects the behavior of requests such as /select?qt=XXX
602
+
603
+ handleSelect="true" will cause the SolrDispatchFilter to process
604
+ the request and will result in consistent error handling and
605
+ formatting for all types of requests.
606
+
607
+ handleSelect="false" will cause the SolrDispatchFilter to
608
+ ignore "/select" requests and fallback to using the legacy
609
+ SolrServlet and it's Solr 1.1 style error formatting
610
+ -->
611
+ <requestDispatcher handleSelect="true" >
612
+ <!-- Request Parsing
613
+
614
+ These settings indicate how Solr Requests may be parsed, and
615
+ what restrictions may be placed on the ContentStreams from
616
+ those requests
617
+
618
+ enableRemoteStreaming - enables use of the stream.file
619
+ and stream.url parameters for specifying remote streams.
620
+
621
+ multipartUploadLimitInKB - specifies the max size of
622
+ Multipart File Uploads that Solr will allow in a Request.
623
+
624
+ *** WARNING ***
625
+ The settings below authorize Solr to fetch remote files, You
626
+ should make sure your system has some authentication before
627
+ using enableRemoteStreaming="true"
628
+
629
+ -->
630
+ <requestParsers enableRemoteStreaming="true"
631
+ multipartUploadLimitInKB="2048000" />
632
+
633
+ <!-- HTTP Caching
634
+
635
+ Set HTTP caching related parameters (for proxy caches and clients).
636
+
637
+ The options below instruct Solr not to output any HTTP Caching
638
+ related headers
639
+ -->
640
+ <httpCaching never304="true" />
641
+ <!-- If you include a <cacheControl> directive, it will be used to
642
+ generate a Cache-Control header (as well as an Expires header
643
+ if the value contains "max-age=")
644
+
645
+ By default, no Cache-Control header is generated.
646
+
647
+ You can use the <cacheControl> option even if you have set
648
+ never304="true"
649
+ -->
650
+ <!--
651
+ <httpCaching never304="true" >
652
+ <cacheControl>max-age=30, public</cacheControl>
653
+ </httpCaching>
654
+ -->
655
+ <!-- To enable Solr to respond with automatically generated HTTP
656
+ Caching headers, and to response to Cache Validation requests
657
+ correctly, set the value of never304="false"
658
+
659
+ This will cause Solr to generate Last-Modified and ETag
660
+ headers based on the properties of the Index.
661
+
662
+ The following options can also be specified to affect the
663
+ values of these headers...
664
+
665
+ lastModFrom - the default value is "openTime" which means the
666
+ Last-Modified value (and validation against If-Modified-Since
667
+ requests) will all be relative to when the current Searcher
668
+ was opened. You can change it to lastModFrom="dirLastMod" if
669
+ you want the value to exactly correspond to when the physical
670
+ index was last modified.
671
+
672
+ etagSeed="..." is an option you can change to force the ETag
673
+ header (and validation against If-None-Match requests) to be
674
+ different even if the index has not changed (ie: when making
675
+ significant changes to your config file)
676
+
677
+ (lastModifiedFrom and etagSeed are both ignored if you use
678
+ the never304="true" option)
679
+ -->
680
+ <!--
681
+ <httpCaching lastModifiedFrom="openTime"
682
+ etagSeed="Solr">
683
+ <cacheControl>max-age=30, public</cacheControl>
684
+ </httpCaching>
685
+ -->
686
+ </requestDispatcher>
687
+
688
+ <!-- Request Handlers
689
+
690
+ http://wiki.apache.org/solr/SolrRequestHandler
691
+
692
+ incoming queries will be dispatched to the correct handler
693
+ based on the path or the qt (query type) param.
694
+
695
+ Names starting with a '/' are accessed with the a path equal to
696
+ the registered name. Names without a leading '/' are accessed
697
+ with: http://host/app/[core/]select?qt=name
698
+
699
+ If a /select request is processed with out a qt param
700
+ specified, the requestHandler that declares default="true" will
701
+ be used.
702
+
703
+ If a Request Handler is declared with startup="lazy", then it will
704
+ not be initialized until the first request that uses it.
705
+
706
+ -->
707
+ <!-- SearchHandler
708
+
709
+ http://wiki.apache.org/solr/SearchHandler
710
+
711
+ For processing Search Queries, the primary Request Handler
712
+ provided with Solr is "SearchHandler" It delegates to a sequent
713
+ of SearchComponents (see below) and supports distributed
714
+ queries across multiple shards
715
+ -->
716
+
717
+ <requestHandler name="search" class="solr.SearchHandler" default="true">
718
+ <!-- default values for query parameters can be specified, these
719
+ will be overridden by parameters in the request
720
+ -->
721
+ <lst name="defaults">
722
+ <str name="defType">dismax</str>
723
+ <str name="echoParams">explicit</str>
724
+ <str name="q.alt">*:*</str>
725
+ <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
726
+ <!-- this qf and pf are used by default, if not otherwise specified by
727
+ client. The default blacklight_config will use these for the
728
+ "keywords" search. See the author_qf/author_pf, title_qf, etc
729
+ below, which the default blacklight_config will specify for
730
+ those searches. You may also be interested in:
731
+ http://wiki.apache.org/solr/LocalParams
732
+ -->
733
+ <str name="qf">
734
+ id
735
+ title_t^25000
736
+ text
737
+ active_fedora_model_s
738
+ object_type_facet
739
+ </str>
740
+ <str name="pf">
741
+ id
742
+ title_t^250000
743
+ text^10
744
+ active_fedora_model_s
745
+ object_type_facet
746
+ </str>
747
+
748
+ <str name="author_qf">
749
+ author_unstem_search^200
750
+ author_addl_unstem_search^50
751
+ author_t^20
752
+ author_addl_t
753
+ </str>
754
+ <str name="author_pf">
755
+ author_unstem_search^2000
756
+ author_addl_unstem_search^500
757
+ author_t^200
758
+ author_addl_t^10
759
+ </str>
760
+ <str name="title_qf">
761
+ title_unstem_search^50000
762
+ subtitle_unstem_search^25000
763
+ title_addl_unstem_search^10000
764
+ title_t^5000
765
+ subtitle_t^2500
766
+ title_addl_t^100
767
+ title_added_entry_unstem_search^50
768
+ title_added_entry_t^10
769
+ title_series_unstem_search^5
770
+ title_series_t
771
+ </str>
772
+ <str name="title_pf">
773
+ title_unstem_search^500000
774
+ subtitle_unstem_search^250000
775
+ title_addl_unstem_search^100000
776
+ title_t^50000
777
+ subtitle_t^25000
778
+ title_addl_t^1000
779
+ title_added_entry_unstem_search^500
780
+ title_added_entry_t^100
781
+ title_series_t^50
782
+ title_series_unstem_search^10
783
+ </str>
784
+ <str name="subject_qf">
785
+ subject_topic_unstem_search^200
786
+ subject_unstem_search^125
787
+ subject_topic_facet^100
788
+ subject_t^50
789
+ subject_addl_unstem_search^10
790
+ subject_addl_t
791
+ </str>
792
+ <str name="subject_pf">
793
+ subject_topic_unstem_search^2000
794
+ subject_unstem_search^1250
795
+ subject_t^1000
796
+ subject_topic_facet^500
797
+ subject_addl_unstem_search^100
798
+ subject_addl_t^10
799
+ </str>
800
+
801
+ <int name="ps">3</int>
802
+ <float name="tie">0.01</float>
803
+
804
+ <!-- NOT using marc_display because it is large and will slow things down for search results -->
805
+ <str name="fl">
806
+ *,
807
+ score,
808
+ </str>
809
+
810
+ <str name="facet">true</str>
811
+ <str name="facet.mincount">1</str>
812
+ <str name="facet.limit">10</str>
813
+ <str name="facet.field">format</str>
814
+ <str name="facet.field">lc_1letter_facet</str>
815
+ <str name="facet.field">lc_alpha_facet</str>
816
+ <str name="facet.field">lc_b4cutter_facet</str>
817
+ <str name="facet.field">language_facet</str>
818
+ <str name="facet.field">pub_date</str>
819
+ <str name="facet.field">subject_era_facet</str>
820
+ <str name="facet.field">subject_geo_facet</str>
821
+ <str name="facet.field">subject_topic_facet</str>
822
+
823
+ <str name="spellcheck">true</str>
824
+ <str name="spellcheck.dictionary">default</str>
825
+ <str name="spellcheck.onlyMorePopular">true</str>
826
+ <str name="spellcheck.extendedResults">true</str>
827
+ <str name="spellcheck.collate">false</str>
828
+ <str name="spellcheck.count">5</str>
829
+
830
+ </lst>
831
+ <!-- In addition to defaults, "appends" params can be specified
832
+ to identify values which should be appended to the list of
833
+ multi-val params from the query (or the existing "defaults").
834
+ -->
835
+ <!-- In this example, the param "fq=instock:true" would be appended to
836
+ any query time fq params the user may specify, as a mechanism for
837
+ partitioning the index, independent of any user selected filtering
838
+ that may also be desired (perhaps as a result of faceted searching).
839
+
840
+ NOTE: there is *absolutely* nothing a client can do to prevent these
841
+ "appends" values from being used, so don't use this mechanism
842
+ unless you are sure you always want it.
843
+ -->
844
+ <!--
845
+ <lst name="appends">
846
+ <str name="fq">inStock:true</str>
847
+ </lst>
848
+ -->
849
+ <!-- "invariants" are a way of letting the Solr maintainer lock down
850
+ the options available to Solr clients. Any params values
851
+ specified here are used regardless of what values may be specified
852
+ in either the query, the "defaults", or the "appends" params.
853
+
854
+ In this example, the facet.field and facet.query params would
855
+ be fixed, limiting the facets clients can use. Faceting is
856
+ not turned on by default - but if the client does specify
857
+ facet=true in the request, these are the only facets they
858
+ will be able to see counts for; regardless of what other
859
+ facet.field or facet.query params they may specify.
860
+
861
+ NOTE: there is *absolutely* nothing a client can do to prevent these
862
+ "invariants" values from being used, so don't use this mechanism
863
+ unless you are sure you always want it.
864
+ -->
865
+ <!--
866
+ <lst name="invariants">
867
+ <str name="facet.field">cat</str>
868
+ <str name="facet.field">manu_exact</str>
869
+ <str name="facet.query">price:[* TO 500]</str>
870
+ <str name="facet.query">price:[500 TO *]</str>
871
+ </lst>
872
+ -->
873
+ <!-- If the default list of SearchComponents is not desired, that
874
+ list can either be overridden completely, or components can be
875
+ prepended or appended to the default list. (see below)
876
+ -->
877
+ <!--
878
+ <arr name="components">
879
+ <str>nameOfCustomComponent1</str>
880
+ <str>nameOfCustomComponent2</str>
881
+ </arr>
882
+ -->
883
+ <arr name="last-components">
884
+ <str>spellcheck</str>
885
+ </arr>
886
+
887
+ </requestHandler>
888
+
889
+
890
+ <!-- Hydra Additions Start -->
891
+
892
+ <requestHandler name="standard" class="solr.SearchHandler">
893
+ <lst name="defaults">
894
+ <str name="echoParams">explicit</str>
895
+ </lst>
896
+ </requestHandler>
897
+
898
+ <requestHandler name="fulltext" class="solr.SearchHandler" >
899
+ <lst name="defaults">
900
+ <str name="defType">dismax</str>
901
+ <str name="facet">on</str>
902
+ <str name="facet.mincount">1</str>
903
+ <str name="echoParams">explicit</str>
904
+ <float name="tie">0.01</float>
905
+ <str name="qf">id^0.8 id_t^0.8 format text^0.3</str>
906
+ <str name="pf">id^0.9 id_t^0.9 text^0.5</str>
907
+ <str name="fl">
908
+ id,text,title_t,date_t,year_facet,month_facet,medium_t,series_facet,box_facet,folder_facet
909
+ </str>
910
+ <str name="mm"> 2&lt;-1 5&lt;-2 6&lt;90% </str>
911
+ <int name="ps">100</int>
912
+ <str name="q.alt">*:*</str>
913
+ </lst>
914
+ </requestHandler>
915
+
916
+ <requestHandler name="permissions" class="solr.SearchHandler" >
917
+ <lst name="defaults">
918
+ <str name="facet">off</str>
919
+ <str name="echoParams">all</str>
920
+ <str name="rows">1</str>
921
+ <str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
922
+ <str name="fl">
923
+ id,access_t,
924
+ discover_access_group_t,discover_access_person_t,
925
+ read_access_group_t,read_access_person_t,
926
+ edit_access_group_t,edit_access_person_t,
927
+ depositor_t,
928
+ embargo_release_date_dt,
929
+ inheritable_access_t,
930
+ inheritable_discover_access_group_t,inheritable_discover_access_person_t,
931
+ inheritable_read_access_group_t,inheritable_read_access_person_t,
932
+ inheritable_edit_access_group_t,inheritable_edit_access_person_t,
933
+ inheritable_embargo_release_date_dt
934
+ </str>
935
+ </lst>
936
+ </requestHandler>
937
+
938
+ <requestHandler name="public_search" class="solr.SearchHandler" >
939
+ <lst name="defaults">
940
+ <!-- Making defType lucene to exclude file assets -->
941
+ <str name="defType">lucene</str>
942
+ <!-- lucene params -->
943
+ <str name="df">has_model_s</str>
944
+ <str name="q.op">AND</str>
945
+ <!-- dismax params -->
946
+ <str name="mm"> 2&lt;-1 5&lt;-2 6&lt;90% </str>
947
+ <str name="q.alt">*:*</str>
948
+ <str name="qf">id^0.8 id_t^0.8 format text^0.3 journal_issn_t</str>
949
+ <str name="pf">id^0.9 id_t^0.9 text^0.5 journal_issn_t</str>
950
+ <str name="qf_dismax">id^0.8 id_t^0.8 format text^0.3</str>
951
+ <str name="pf_dismax">id^0.9 id_t^0.9 text^0.5</str>
952
+ <int name="ps">100</int>
953
+ <float name="tie">0.01</float>
954
+ <!-- general -->
955
+ <str name="facet">on</str>
956
+ <str name="facet.mincount">1</str>
957
+ <str name="echoParams">explicit</str>
958
+ <str name="fl">
959
+ *,score
960
+ </str>
961
+ </lst>
962
+ </requestHandler>
963
+
964
+ <requestHandler name="fulltext" class="solr.SearchHandler" >
965
+ <lst name="defaults">
966
+ <str name="defType">dismax</str>
967
+ <str name="facet">on</str>
968
+ <str name="facet.mincount">1</str>
969
+ <str name="echoParams">explicit</str>
970
+ <float name="tie">0.01</float>
971
+ <str name="qf">id^0.8 id_t^0.8 format text^0.3</str>
972
+ <str name="pf">id^0.9 id_t^0.9 text^0.5</str>
973
+ <str name="fl">
974
+ id,text,title_t,date_t,year_facet,month_facet,medium_t,series_facet,box_facet,folder_facet
975
+ </str>
976
+ <str name="mm"> 2&lt;-1 5&lt;-2 6&lt;90% </str>
977
+ <int name="ps">100</int>
978
+ <str name="q.alt">*:*</str>
979
+ </lst>
980
+ </requestHandler>
981
+ <!-- Hydra Additions End -->
982
+
983
+ <!-- for requests to get a single document; use id=666 instead of q=id:666 -->
984
+ <requestHandler name="document" class="solr.SearchHandler" >
985
+ <lst name="defaults">
986
+ <str name="echoParams">all</str>
987
+ <str name="fl">*</str>
988
+ <str name="rows">1</str>
989
+ <str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
990
+ </lst>
991
+ </requestHandler>
992
+
993
+ <!-- For Advanced Search -->
994
+ <requestHandler name="advanced" class="solr.SearchHandler" >
995
+ <lst name="defaults">
996
+ <str name="defType">lucene</str>
997
+ <str name="echoParams">explicit</str>
998
+ <str name="sort">score desc, pub_date_sort desc, title_sort asc</str>
999
+ <str name="df">text</str>
1000
+ <str name="q.op">AND</str>
1001
+ <str name="qs">1</str>
1002
+
1003
+ <!-- used for dismax query parser -->
1004
+ <str name="mm">1</str>
1005
+ <str name="ps">3</str>
1006
+ <float name="tie">0.01</float>
1007
+
1008
+ <!-- for user query terms in author text box -->
1009
+ <str name="qf_author">
1010
+ author_unstem_search^200
1011
+ author_addl_unstem_search^50
1012
+ author_t^20
1013
+ author_addl_t
1014
+ </str>
1015
+ <str name="pf_author">
1016
+ author_unstem_search^2000
1017
+ author_addl_unstem_search^500
1018
+ author_t^200
1019
+ author_addl_t^10
1020
+ </str>
1021
+
1022
+ <!-- for user query terms in title text box -->
1023
+ <str name="qf_title">
1024
+ title_unstem_search^50000
1025
+ subtitle_unstem_search^25000
1026
+ title_addl_unstem_search^10000
1027
+ title_t^5000
1028
+ subtitle_t^2500
1029
+ title_addl_t^100
1030
+ title_added_entry_unstem_search^50
1031
+ title_added_entry_t^10
1032
+ title_series_unstem_search^5
1033
+ title_series_t
1034
+ </str>
1035
+ <str name="pf_title">
1036
+ title_unstem_search^500000
1037
+ subtitle_unstem_search^250000
1038
+ title_addl_unstem_search^100000
1039
+ title_t^50000
1040
+ subtitle_t^25000
1041
+ title_addl_t^1000
1042
+ title_added_entry_unstem_search^500
1043
+ title_added_entry_t^100
1044
+ title_series_t^50
1045
+ title_series_unstem_search^10
1046
+ </str>
1047
+
1048
+ <!-- for user query terms in subject text box -->
1049
+ <str name="qf_subject">
1050
+ subject_topic_unstem_search^200
1051
+ subject_unstem_search^125
1052
+ subject_topic_facet^100
1053
+ subject_t^50
1054
+ subject_addl_unstem_search^10
1055
+ subject_addl_t
1056
+ </str>
1057
+ <str name="pf_subject">
1058
+ subject_topic_unstem_search^2000
1059
+ subject_unstem_search^1250
1060
+ subject_t^1000
1061
+ subject_topic_facet^500
1062
+ subject_addl_unstem_search^100
1063
+ subject_addl_t^10
1064
+ </str>
1065
+
1066
+ <!-- for user query terms in number text box -->
1067
+ <str name="qf_number">isbn_t</str>
1068
+
1069
+ <!-- for user query terms in keyword text box -->
1070
+ <str name="qf_keyword">text</str>
1071
+ <str name="pf_keyword">text^10</str>
1072
+
1073
+ <!-- NOT using marc_display because it is large and will slow things down for search results -->
1074
+ <str name="fl">
1075
+ id,
1076
+ score,
1077
+ author_display,
1078
+ author_vern_display,
1079
+ format,
1080
+ isbn_t,
1081
+ language_facet,
1082
+ lc_callnum_display,
1083
+ material_type_display,
1084
+ published_display,
1085
+ published_vern_display,
1086
+ pub_date,
1087
+ title_display,
1088
+ title_vern_display,
1089
+ subject_topic_facet,
1090
+ subject_geo_facet,
1091
+ subject_era_facet,
1092
+ subtitle_display,
1093
+ subtitle_vern_display,
1094
+ url_fulltext_display,
1095
+ url_suppl_display,
1096
+ </str>
1097
+
1098
+ <str name="facet">true</str>
1099
+ <str name="facet.mincount">1</str>
1100
+ <str name="facet.limit">10</str>
1101
+ <str name="facet.field">format</str>
1102
+ <str name="facet.field">lc_1letter_facet</str>
1103
+ <str name="facet.field">lc_alpha_facet</str>
1104
+ <str name="facet.field">lc_b4cutter_facet</str>
1105
+ <str name="facet.field">language_facet</str>
1106
+ <str name="facet.field">pub_date</str>
1107
+ <str name="facet.field">subject_era_facet</str>
1108
+ <str name="facet.field">subject_geo_facet</str>
1109
+ <str name="facet.field">subject_topic_facet</str>
1110
+
1111
+ <str name="spellcheck">true</str>
1112
+ <str name="spellcheck.dictionary">subject</str>
1113
+ <str name="spellcheck.onlyMorePopular">true</str>
1114
+ <str name="spellcheck.extendedResults">true</str>
1115
+ <str name="spellcheck.collate">false</str>
1116
+ <str name="spellcheck.count">5</str>
1117
+ </lst>
1118
+ <arr name="last-components">
1119
+ <str>spellcheck</str>
1120
+ </arr>
1121
+ </requestHandler>
1122
+
1123
+
1124
+ <!-- XML Update Request Handler.
1125
+
1126
+ http://wiki.apache.org/solr/UpdateXmlMessages
1127
+
1128
+ The canonical Request Handler for Modifying the Index through
1129
+ commands specified using XML.
1130
+
1131
+ Note: Since solr1.1 requestHandlers requires a valid content
1132
+ type header if posted in the body. For example, curl now
1133
+ requires: -H 'Content-type:text/xml; charset=utf-8'
1134
+ -->
1135
+ <requestHandler name="/update"
1136
+ class="solr.XmlUpdateRequestHandler">
1137
+ <!-- See below for information on defining
1138
+ updateRequestProcessorChains that can be used by name
1139
+ on each Update Request
1140
+ -->
1141
+ <!--
1142
+ <lst name="defaults">
1143
+ <str name="update.chain">dedupe</str>
1144
+ </lst>
1145
+ -->
1146
+ </requestHandler>
1147
+ <!-- Binary Update Request Handler
1148
+ http://wiki.apache.org/solr/javabin
1149
+ -->
1150
+ <requestHandler name="/update/javabin"
1151
+ class="solr.BinaryUpdateRequestHandler" />
1152
+
1153
+ <!-- CSV Update Request Handler
1154
+ http://wiki.apache.org/solr/UpdateCSV
1155
+ -->
1156
+ <requestHandler name="/update/csv"
1157
+ class="solr.CSVRequestHandler"
1158
+ startup="lazy" />
1159
+
1160
+ <!-- JSON Update Request Handler
1161
+ http://wiki.apache.org/solr/UpdateJSON
1162
+ -->
1163
+ <requestHandler name="/update/json"
1164
+ class="solr.JsonUpdateRequestHandler"
1165
+ startup="lazy" />
1166
+
1167
+ <!-- Solr Cell Update Request Handler
1168
+
1169
+ http://wiki.apache.org/solr/ExtractingRequestHandler
1170
+
1171
+ -->
1172
+ <requestHandler name="/update/extract"
1173
+ startup="lazy"
1174
+ class="solr.extraction.ExtractingRequestHandler" >
1175
+ <lst name="defaults">
1176
+ <!-- All the main content goes into "text"... if you need to return
1177
+ the extracted text or do highlighting, use a stored field. -->
1178
+ <str name="fmap.content">text</str>
1179
+ <str name="lowernames">true</str>
1180
+ <str name="uprefix">ignored_</str>
1181
+
1182
+ <!-- capture link hrefs but ignore div attributes -->
1183
+ <str name="captureAttr">true</str>
1184
+ <str name="fmap.a">links</str>
1185
+ <str name="fmap.div">ignored_</str>
1186
+ </lst>
1187
+ </requestHandler>
1188
+
1189
+ <!-- Field Analysis Request Handler
1190
+
1191
+ RequestHandler that provides much the same functionality as
1192
+ analysis.jsp. Provides the ability to specify multiple field
1193
+ types and field names in the same request and outputs
1194
+ index-time and query-time analysis for each of them.
1195
+
1196
+ Request parameters are:
1197
+ analysis.fieldname - field name whose analyzers are to be used
1198
+
1199
+ analysis.fieldtype - field type whose analyzers are to be used
1200
+ analysis.fieldvalue - text for index-time analysis
1201
+ q (or analysis.q) - text for query time analysis
1202
+ analysis.showmatch (true|false) - When set to true and when
1203
+ query analysis is performed, the produced tokens of the
1204
+ field value analysis will be marked as "matched" for every
1205
+ token that is produces by the query analysis
1206
+ -->
1207
+ <requestHandler name="/analysis/field"
1208
+ startup="lazy"
1209
+ class="solr.FieldAnalysisRequestHandler" />
1210
+
1211
+
1212
+ <!-- Document Analysis Handler
1213
+
1214
+ http://wiki.apache.org/solr/AnalysisRequestHandler
1215
+
1216
+ An analysis handler that provides a breakdown of the analysis
1217
+ process of provided docuemnts. This handler expects a (single)
1218
+ content stream with the following format:
1219
+
1220
+ <docs>
1221
+ <doc>
1222
+ <field name="id">1</field>
1223
+ <field name="name">The Name</field>
1224
+ <field name="text">The Text Value</field>
1225
+ </doc>
1226
+ <doc>...</doc>
1227
+ <doc>...</doc>
1228
+ ...
1229
+ </docs>
1230
+
1231
+ Note: Each document must contain a field which serves as the
1232
+ unique key. This key is used in the returned response to associate
1233
+ an analysis breakdown to the analyzed document.
1234
+
1235
+ Like the FieldAnalysisRequestHandler, this handler also supports
1236
+ query analysis by sending either an "analysis.query" or "q"
1237
+ request parameter that holds the query text to be analyzed. It
1238
+ also supports the "analysis.showmatch" parameter which when set to
1239
+ true, all field tokens that match the query tokens will be marked
1240
+ as a "match".
1241
+ -->
1242
+ <requestHandler name="/analysis/document"
1243
+ class="solr.DocumentAnalysisRequestHandler"
1244
+ startup="lazy" />
1245
+
1246
+ <!-- Admin Handlers
1247
+
1248
+ Admin Handlers - This will register all the standard admin
1249
+ RequestHandlers.
1250
+ -->
1251
+ <requestHandler name="/admin/"
1252
+ class="solr.admin.AdminHandlers" />
1253
+ <!-- This single handler is equivalent to the following... -->
1254
+ <!--
1255
+ <requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
1256
+ <requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
1257
+ <requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
1258
+ <requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
1259
+ <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
1260
+ <requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
1261
+ -->
1262
+ <!-- If you wish to hide files under ${solr.home}/conf, explicitly
1263
+ register the ShowFileRequestHandler using:
1264
+ -->
1265
+ <!--
1266
+ <requestHandler name="/admin/file"
1267
+ class="solr.admin.ShowFileRequestHandler" >
1268
+ <lst name="invariants">
1269
+ <str name="hidden">synonyms.txt</str>
1270
+ <str name="hidden">anotherfile.txt</str>
1271
+ </lst>
1272
+ </requestHandler>
1273
+ -->
1274
+
1275
+ <!-- ping/healthcheck -->
1276
+ <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
1277
+ <lst name="defaults">
1278
+ <str name="qt">search</str>
1279
+ <str name="q">solrpingquery</str>
1280
+ <str name="echoParams">all</str>
1281
+ </lst>
1282
+ </requestHandler>
1283
+
1284
+ <!-- Echo the request contents back to the client -->
1285
+ <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
1286
+ <lst name="defaults">
1287
+ <str name="echoParams">explicit</str>
1288
+ <str name="echoHandler">true</str>
1289
+ </lst>
1290
+ </requestHandler>
1291
+
1292
+ <!-- Solr Replication
1293
+
1294
+ The SolrReplicationHandler supports replicating indexes from a
1295
+ "master" used for indexing and "salves" used for queries.
1296
+
1297
+ http://wiki.apache.org/solr/SolrReplication
1298
+
1299
+ In the example below, remove the <lst name="master"> section if
1300
+ this is just a slave and remove the <lst name="slave"> section
1301
+ if this is just a master.
1302
+ -->
1303
+ <!--
1304
+ <requestHandler name="/replication" class="solr.ReplicationHandler" >
1305
+ <lst name="master">
1306
+ <str name="replicateAfter">commit</str>
1307
+ <str name="replicateAfter">startup</str>
1308
+ <str name="confFiles">schema.xml,stopwords.txt</str>
1309
+ </lst>
1310
+ <lst name="slave">
1311
+ <str name="masterUrl">http://localhost:8983/solr/replication</str>
1312
+ <str name="pollInterval">00:00:60</str>
1313
+ </lst>
1314
+ </requestHandler>
1315
+ -->
1316
+
1317
+ <!-- Search Components
1318
+
1319
+ Search components are registered to SolrCore and used by
1320
+ instances of SearchHandler (which can access them by name)
1321
+
1322
+ By default, the following components are available:
1323
+
1324
+ <searchComponent name="query" class="solr.QueryComponent" />
1325
+ <searchComponent name="facet" class="solr.FacetComponent" />
1326
+ <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
1327
+ <searchComponent name="highlight" class="solr.HighlightComponent" />
1328
+ <searchComponent name="stats" class="solr.StatsComponent" />
1329
+ <searchComponent name="debug" class="solr.DebugComponent" />
1330
+
1331
+ Default configuration in a requestHandler would look like:
1332
+
1333
+ <arr name="components">
1334
+ <str>query</str>
1335
+ <str>facet</str>
1336
+ <str>mlt</str>
1337
+ <str>highlight</str>
1338
+ <str>stats</str>
1339
+ <str>debug</str>
1340
+ </arr>
1341
+
1342
+ If you register a searchComponent to one of the standard names,
1343
+ that will be used instead of the default.
1344
+
1345
+ To insert components before or after the 'standard' components, use:
1346
+
1347
+ <arr name="first-components">
1348
+ <str>myFirstComponentName</str>
1349
+ </arr>
1350
+
1351
+ <arr name="last-components">
1352
+ <str>myLastComponentName</str>
1353
+ </arr>
1354
+
1355
+ NOTE: The component registered with the name "debug" will
1356
+ always be executed after the "last-components"
1357
+
1358
+ -->
1359
+
1360
+ <!-- Spell Check
1361
+
1362
+ The spell check component can return a list of alternative spelling
1363
+ suggestions.
1364
+
1365
+ http://wiki.apache.org/solr/SpellCheckComponent
1366
+ -->
1367
+ <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
1368
+
1369
+ <str name="queryAnalyzerFieldType">textSpell</str>
1370
+
1371
+ <!-- Multiple "Spell Checkers" can be declared and used by this
1372
+ component
1373
+ -->
1374
+
1375
+ <!-- a spellchecker built from a field of the main index, and
1376
+ written to disk
1377
+ -->
1378
+ <lst name="spellchecker">
1379
+ <str name="name">default</str>
1380
+ <str name="field">spell</str>
1381
+ <str name="spellcheckIndexDir">./spell</str>
1382
+ <str name="buildOnOptimize">true</str>
1383
+ </lst>
1384
+ <lst name="spellchecker">
1385
+ <str name="name">author</str>
1386
+ <str name="field">author_spell</str>
1387
+ <str name="spellcheckIndexDir">./spell_author</str>
1388
+ <str name="accuracy">0.7</str>
1389
+ <str name="buildOnOptimize">true</str>
1390
+ </lst>
1391
+ <lst name="spellchecker">
1392
+ <str name="name">subject</str>
1393
+ <str name="field">subject_spell</str>
1394
+ <str name="spellcheckIndexDir">./spell_subject</str>
1395
+ <str name="accuracy">0.7</str>
1396
+ <str name="buildOnOptimize">true</str>
1397
+ </lst>
1398
+ <lst name="spellchecker">
1399
+ <str name="name">title</str>
1400
+ <str name="field">title_spell</str>
1401
+ <str name="spellcheckIndexDir">./spell_title</str>
1402
+ <str name="accuracy">0.7</str>
1403
+ <str name="buildOnOptimize">true</str>
1404
+ </lst>
1405
+
1406
+ <!-- a spellchecker that uses a different distance measure -->
1407
+ <!--
1408
+ <lst name="spellchecker">
1409
+ <str name="name">jarowinkler</str>
1410
+ <str name="field">spell</str>
1411
+ <str name="distanceMeasure">
1412
+ org.apache.lucene.search.spell.JaroWinklerDistance
1413
+ </str>
1414
+ <str name="spellcheckIndexDir">spellcheckerJaro</str>
1415
+ </lst>
1416
+ -->
1417
+
1418
+ <!-- a spellchecker that use an alternate comparator
1419
+
1420
+ comparatorClass be one of:
1421
+ 1. score (default)
1422
+ 2. freq (Frequency first, then score)
1423
+ 3. A fully qualified class name
1424
+ -->
1425
+ <!--
1426
+ <lst name="spellchecker">
1427
+ <str name="name">freq</str>
1428
+ <str name="field">lowerfilt</str>
1429
+ <str name="spellcheckIndexDir">spellcheckerFreq</str>
1430
+ <str name="comparatorClass">freq</str>
1431
+ <str name="buildOnCommit">true</str>
1432
+ -->
1433
+
1434
+ <!-- A spellchecker that reads the list of words from a file -->
1435
+ <!--
1436
+ <lst name="spellchecker">
1437
+ <str name="classname">solr.FileBasedSpellChecker</str>
1438
+ <str name="name">file</str>
1439
+ <str name="sourceLocation">spellings.txt</str>
1440
+ <str name="characterEncoding">UTF-8</str>
1441
+ <str name="spellcheckIndexDir">spellcheckerFile</str>
1442
+ </lst>
1443
+ -->
1444
+ </searchComponent>
1445
+
1446
+ <!-- A request handler for demonstrating the spellcheck component.
1447
+
1448
+ NOTE: This is purely as an example. The whole purpose of the
1449
+ SpellCheckComponent is to hook it into the request handler that
1450
+ handles your normal user queries so that a separate request is
1451
+ not needed to get suggestions.
1452
+
1453
+ IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
1454
+ NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
1455
+
1456
+ See http://wiki.apache.org/solr/SpellCheckComponent for details
1457
+ on the request parameters.
1458
+ -->
1459
+ <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
1460
+ <lst name="defaults">
1461
+ <str name="spellcheck.onlyMorePopular">false</str>
1462
+ <str name="spellcheck.extendedResults">false</str>
1463
+ <str name="spellcheck.count">1</str>
1464
+ </lst>
1465
+ <arr name="last-components">
1466
+ <str>spellcheck</str>
1467
+ </arr>
1468
+ </requestHandler>
1469
+
1470
+ <!-- Term Vector Component
1471
+
1472
+ http://wiki.apache.org/solr/TermVectorComponent
1473
+ -->
1474
+ <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
1475
+
1476
+ <!-- A request handler for demonstrating the term vector component
1477
+
1478
+ This is purely as an example.
1479
+
1480
+ In reality you will likely want to add the component to your
1481
+ already specified request handlers.
1482
+ -->
1483
+ <requestHandler name="tvrh" class="solr.SearchHandler" startup="lazy">
1484
+ <lst name="defaults">
1485
+ <bool name="tv">true</bool>
1486
+ </lst>
1487
+ <arr name="last-components">
1488
+ <str>tvComponent</str>
1489
+ </arr>
1490
+ </requestHandler>
1491
+
1492
+ <!-- Clustering Component
1493
+
1494
+ http://wiki.apache.org/solr/ClusteringComponent
1495
+
1496
+ This relies on third party jars which are notincluded in the
1497
+ release. To use this component (and the "/clustering" handler)
1498
+ Those jars will need to be downloaded, and you'll need to set
1499
+ the solr.cluster.enabled system property when running solr...
1500
+
1501
+ java -Dsolr.clustering.enabled=true -jar start.jar
1502
+ -->
1503
+ <searchComponent name="clustering"
1504
+ enable="${solr.clustering.enabled:false}"
1505
+ class="solr.clustering.ClusteringComponent" >
1506
+ <!-- Declare an engine -->
1507
+ <lst name="engine">
1508
+ <!-- The name, only one can be named "default" -->
1509
+ <str name="name">default</str>
1510
+
1511
+ <!-- Class name of Carrot2 clustering algorithm.
1512
+
1513
+ Currently available algorithms are:
1514
+
1515
+ * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
1516
+ * org.carrot2.clustering.stc.STCClusteringAlgorithm
1517
+ * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
1518
+
1519
+ See http://project.carrot2.org/algorithms.html for the
1520
+ algorithm's characteristics.
1521
+ -->
1522
+ <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
1523
+
1524
+ <!-- Overriding values for Carrot2 default algorithm attributes.
1525
+
1526
+ For a description of all available attributes, see:
1527
+ http://download.carrot2.org/stable/manual/#chapter.components.
1528
+ Use attribute key as name attribute of str elements
1529
+ below. These can be further overridden for individual
1530
+ requests by specifying attribute key as request parameter
1531
+ name and attribute value as parameter value.
1532
+ -->
1533
+ <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
1534
+
1535
+ <!-- Location of Carrot2 lexical resources.
1536
+
1537
+ A directory from which to load Carrot2-specific stop words
1538
+ and stop labels. Absolute or relative to Solr config directory.
1539
+ If a specific resource (e.g. stopwords.en) is present in the
1540
+ specified dir, it will completely override the corresponding
1541
+ default one that ships with Carrot2.
1542
+
1543
+ For an overview of Carrot2 lexical resources, see:
1544
+ http://download.carrot2.org/head/manual/#chapter.lexical-resources
1545
+ -->
1546
+ <str name="carrot.lexicalResourcesDir">clustering/carrot2</str>
1547
+
1548
+ <!-- The language to assume for the documents.
1549
+
1550
+ For a list of allowed values, see:
1551
+ http://download.carrot2.org/stable/manual/#section.attribute.lingo.MultilingualClustering.defaultLanguage
1552
+ -->
1553
+ <str name="MultilingualClustering.defaultLanguage">ENGLISH</str>
1554
+ </lst>
1555
+ <lst name="engine">
1556
+ <str name="name">stc</str>
1557
+ <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
1558
+ </lst>
1559
+ </searchComponent>
1560
+
1561
+ <!-- A request handler for demonstrating the clustering component
1562
+
1563
+ This is purely as an example.
1564
+
1565
+ In reality you will likely want to add the component to your
1566
+ already specified request handlers.
1567
+ -->
1568
+ <requestHandler name="/clustering"
1569
+ startup="lazy"
1570
+ enable="${solr.clustering.enabled:false}"
1571
+ class="solr.SearchHandler">
1572
+ <lst name="defaults">
1573
+ <bool name="clustering">true</bool>
1574
+ <str name="clustering.engine">default</str>
1575
+ <bool name="clustering.results">true</bool>
1576
+ <!-- The title field -->
1577
+ <str name="carrot.title">name</str>
1578
+ <str name="carrot.url">id</str>
1579
+ <!-- The field to cluster on -->
1580
+ <str name="carrot.snippet">features</str>
1581
+ <!-- produce summaries -->
1582
+ <bool name="carrot.produceSummary">true</bool>
1583
+ <!-- the maximum number of labels per cluster -->
1584
+ <!--<int name="carrot.numDescriptions">5</int>-->
1585
+ <!-- produce sub clusters -->
1586
+ <bool name="carrot.outputSubClusters">false</bool>
1587
+
1588
+ <str name="defType">edismax</str>
1589
+ <str name="qf">
1590
+ text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
1591
+ </str>
1592
+ <str name="q.alt">*:*</str>
1593
+ <str name="rows">10</str>
1594
+ <str name="fl">*,score</str>
1595
+ </lst>
1596
+ <arr name="last-components">
1597
+ <str>clustering</str>
1598
+ </arr>
1599
+ </requestHandler>
1600
+
1601
+ <!-- Terms Component
1602
+
1603
+ http://wiki.apache.org/solr/TermsComponent
1604
+
1605
+ A component to return terms and document frequency of those
1606
+ terms
1607
+ -->
1608
+ <searchComponent name="terms" class="solr.TermsComponent"/>
1609
+
1610
+ <!-- A request handler for demonstrating the terms component -->
1611
+ <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
1612
+ <lst name="defaults">
1613
+ <bool name="terms">true</bool>
1614
+ </lst>
1615
+ <arr name="components">
1616
+ <str>terms</str>
1617
+ </arr>
1618
+ </requestHandler>
1619
+
1620
+
1621
+ <!-- Query Elevation Component
1622
+
1623
+ http://wiki.apache.org/solr/QueryElevationComponent
1624
+
1625
+ a search component that enables you to configure the top
1626
+ results for a given query regardless of the normal lucene
1627
+ scoring.
1628
+ -->
1629
+ <searchComponent name="elevator" class="solr.QueryElevationComponent" >
1630
+ <!-- pick a fieldType to analyze queries -->
1631
+ <str name="queryFieldType">string</str>
1632
+ <str name="config-file">elevate.xml</str>
1633
+ </searchComponent>
1634
+
1635
+ <!-- A request handler for demonstrating the elevator component -->
1636
+ <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
1637
+ <lst name="defaults">
1638
+ <str name="echoParams">explicit</str>
1639
+ </lst>
1640
+ <arr name="last-components">
1641
+ <str>elevator</str>
1642
+ </arr>
1643
+ </requestHandler>
1644
+
1645
+ <!-- Highlighting Component
1646
+
1647
+ http://wiki.apache.org/solr/HighlightingParameters
1648
+ -->
1649
+ <searchComponent class="solr.HighlightComponent" name="highlight">
1650
+ <highlighting>
1651
+ <!-- Configure the standard fragmenter -->
1652
+ <!-- This could most likely be commented out in the "default" case -->
1653
+ <fragmenter name="gap"
1654
+ default="true"
1655
+ class="solr.highlight.GapFragmenter">
1656
+ <lst name="defaults">
1657
+ <int name="hl.fragsize">100</int>
1658
+ </lst>
1659
+ </fragmenter>
1660
+
1661
+ <!-- A regular-expression-based fragmenter
1662
+ (for sentence extraction)
1663
+ -->
1664
+ <fragmenter name="regex"
1665
+ class="solr.highlight.RegexFragmenter">
1666
+ <lst name="defaults">
1667
+ <!-- slightly smaller fragsizes work better because of slop -->
1668
+ <int name="hl.fragsize">70</int>
1669
+ <!-- allow 50% slop on fragment sizes -->
1670
+ <float name="hl.regex.slop">0.5</float>
1671
+ <!-- a basic sentence pattern -->
1672
+ <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
1673
+ </lst>
1674
+ </fragmenter>
1675
+
1676
+ <!-- Configure the standard formatter -->
1677
+ <formatter name="html"
1678
+ default="true"
1679
+ class="solr.highlight.HtmlFormatter">
1680
+ <lst name="defaults">
1681
+ <str name="hl.simple.pre"><![CDATA[<em>]]></str>
1682
+ <str name="hl.simple.post"><![CDATA[</em>]]></str>
1683
+ </lst>
1684
+ </formatter>
1685
+
1686
+ <!-- Configure the standard encoder -->
1687
+ <encoder name="html"
1688
+ class="solr.highlight.HtmlEncoder" />
1689
+
1690
+ <!-- Configure the standard fragListBuilder -->
1691
+ <fragListBuilder name="simple"
1692
+ default="true"
1693
+ class="solr.highlight.SimpleFragListBuilder"/>
1694
+
1695
+ <!-- Configure the single fragListBuilder -->
1696
+ <fragListBuilder name="single"
1697
+ class="solr.highlight.SingleFragListBuilder"/>
1698
+
1699
+ <!-- default tag FragmentsBuilder -->
1700
+ <fragmentsBuilder name="default"
1701
+ default="true"
1702
+ class="solr.highlight.ScoreOrderFragmentsBuilder">
1703
+ <!--
1704
+ <lst name="defaults">
1705
+ <str name="hl.multiValuedSeparatorChar">/</str>
1706
+ </lst>
1707
+ -->
1708
+ </fragmentsBuilder>
1709
+
1710
+ <!-- multi-colored tag FragmentsBuilder -->
1711
+ <fragmentsBuilder name="colored"
1712
+ class="solr.highlight.ScoreOrderFragmentsBuilder">
1713
+ <lst name="defaults">
1714
+ <str name="hl.tag.pre"><![CDATA[
1715
+ <b style="background:yellow">,<b style="background:lawgreen">,
1716
+ <b style="background:aquamarine">,<b style="background:magenta">,
1717
+ <b style="background:palegreen">,<b style="background:coral">,
1718
+ <b style="background:wheat">,<b style="background:khaki">,
1719
+ <b style="background:lime">,<b style="background:deepskyblue">]]></str>
1720
+ <str name="hl.tag.post"><![CDATA[</b>]]></str>
1721
+ </lst>
1722
+ </fragmentsBuilder>
1723
+
1724
+ <boundaryScanner name="default"
1725
+ default="true"
1726
+ class="solr.highlight.SimpleBoundaryScanner">
1727
+ <lst name="defaults">
1728
+ <str name="hl.bs.maxScan">10</str>
1729
+ <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
1730
+ </lst>
1731
+ </boundaryScanner>
1732
+
1733
+ <boundaryScanner name="breakIterator"
1734
+ class="solr.highlight.BreakIteratorBoundaryScanner">
1735
+ <lst name="defaults">
1736
+ <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
1737
+ <str name="hl.bs.type">WORD</str>
1738
+ <!-- language and country are used when constructing Locale object. -->
1739
+ <!-- And the Locale object will be used when getting instance of BreakIterator -->
1740
+ <str name="hl.bs.language">en</str>
1741
+ <str name="hl.bs.country">US</str>
1742
+ </lst>
1743
+ </boundaryScanner>
1744
+ </highlighting>
1745
+ </searchComponent>
1746
+
1747
+ <!-- Update Processors
1748
+
1749
+ Chains of Update Processor Factories for dealing with Update
1750
+ Requests can be declared, and then used by name in Update
1751
+ Request Processors
1752
+
1753
+ http://wiki.apache.org/solr/UpdateRequestProcessor
1754
+
1755
+ -->
1756
+ <!-- Deduplication
1757
+
1758
+ An example dedup update processor that creates the "id" field
1759
+ on the fly based on the hash code of some other fields. This
1760
+ example has overwriteDupes set to false since we are using the
1761
+ id field as the signatureField and Solr will maintain
1762
+ uniqueness based on that anyway.
1763
+
1764
+ -->
1765
+ <!--
1766
+ <updateRequestProcessorChain name="dedupe">
1767
+ <processor class="solr.processor.SignatureUpdateProcessorFactory">
1768
+ <bool name="enabled">true</bool>
1769
+ <str name="signatureField">id</str>
1770
+ <bool name="overwriteDupes">false</bool>
1771
+ <str name="fields">name,features,cat</str>
1772
+ <str name="signatureClass">solr.processor.Lookup3Signature</str>
1773
+ </processor>
1774
+ <processor class="solr.LogUpdateProcessorFactory" />
1775
+ <processor class="solr.RunUpdateProcessorFactory" />
1776
+ </updateRequestProcessorChain>
1777
+ -->
1778
+
1779
+ <!--
1780
+ This example update chain identifies the language of the incoming
1781
+ documents using the langid contrib. The detected language is
1782
+ written to field language_s. No field name mapping is done.
1783
+ The fields used for detection are text, title, subject and description,
1784
+ making this example suitable for detecting languages form full-text
1785
+ rich documents injected via ExtractingRequestHandler.
1786
+ See more about langId at http://wiki.apache.org/solr/LanguageDetection
1787
+ -->
1788
+ <!--
1789
+ <updateRequestProcessorChain name="langid">
1790
+ <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
1791
+ <str name="langid.fl">text,title,subject,description</str>
1792
+ <str name="langid.langField">language_s</str>
1793
+ <str name="langid.fallback">en</str>
1794
+ </processor>
1795
+ <processor class="solr.LogUpdateProcessorFactory" />
1796
+ <processor class="solr.RunUpdateProcessorFactory" />
1797
+ </updateRequestProcessorChain>
1798
+ -->
1799
+
1800
+ <!-- Response Writers
1801
+
1802
+ http://wiki.apache.org/solr/QueryResponseWriter
1803
+
1804
+ Request responses will be written using the writer specified by
1805
+ the 'wt' request parameter matching the name of a registered
1806
+ writer.
1807
+
1808
+ The "default" writer is the default and will be used if 'wt' is
1809
+ not specified in the request.
1810
+ -->
1811
+ <!-- The following response writers are implicitly configured unless
1812
+ overridden...
1813
+ -->
1814
+ <!--
1815
+ <queryResponseWriter name="xml"
1816
+ default="true"
1817
+ class="solr.XMLResponseWriter" />
1818
+ <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
1819
+ <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
1820
+ <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
1821
+ <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
1822
+ <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
1823
+ <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
1824
+ -->
1825
+
1826
+ <queryResponseWriter name="json" class="solr.JSONResponseWriter">
1827
+ <!-- For the purposes of the tutorial, JSON responses are written as
1828
+ plain text so that they are easy to read in *any* browser.
1829
+ If you expect a MIME type of "application/json" just remove this override.
1830
+ -->
1831
+ <str name="content-type">text/plain; charset=UTF-8</str>
1832
+ </queryResponseWriter>
1833
+
1834
+ <!--
1835
+ Custom response writers can be declared as needed...
1836
+ -->
1837
+ <!-- The solr.velocity.enabled flag is used by Solr's test cases so that this response writer is not
1838
+ loaded (causing an error if contrib/velocity has not been built fully) -->
1839
+ <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" enable="${solr.velocity.enabled:true}"/>
1840
+
1841
+ <!-- XSLT response writer transforms the XML output by any xslt file found
1842
+ in Solr's conf/xslt directory. Changes to xslt files are checked for
1843
+ every xsltCacheLifetimeSeconds.
1844
+ -->
1845
+ <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
1846
+ <int name="xsltCacheLifetimeSeconds">5</int>
1847
+ </queryResponseWriter>
1848
+
1849
+ <!-- Query Parsers
1850
+
1851
+ http://wiki.apache.org/solr/SolrQuerySyntax
1852
+
1853
+ Multiple QParserPlugins can be registered by name, and then
1854
+ used in either the "defType" param for the QueryComponent (used
1855
+ by SearchHandler) or in LocalParams
1856
+ -->
1857
+ <!-- example of registering a query parser -->
1858
+ <!--
1859
+ <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
1860
+ -->
1861
+
1862
+ <!-- Function Parsers
1863
+
1864
+ http://wiki.apache.org/solr/FunctionQuery
1865
+
1866
+ Multiple ValueSourceParsers can be registered by name, and then
1867
+ used as function names when using the "func" QParser.
1868
+ -->
1869
+ <!-- example of registering a custom function parser -->
1870
+ <!--
1871
+ <valueSourceParser name="myfunc"
1872
+ class="com.mycompany.MyValueSourceParser" />
1873
+ -->
1874
+
1875
+ <!-- Legacy config for the admin interface -->
1876
+ <admin>
1877
+ <defaultQuery>hydra</defaultQuery>
1878
+
1879
+ <!-- configure a healthcheck file for servers behind a
1880
+ loadbalancer
1881
+ -->
1882
+ <!--
1883
+ <healthcheck type="file">server-enabled</healthcheck>
1884
+ -->
1885
+ </admin>
1886
+
1887
+ </config>