active-fedora 2.2.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/.gitignore +30 -0
  2. data/.gitmodules +3 -0
  3. data/.rvmrc +33 -0
  4. data/CONSOLE_GETTING_STARTED.textile +337 -0
  5. data/Gemfile +6 -1
  6. data/Gemfile.lock +39 -23
  7. data/NOKOGIRI_DATASTREAMS.textile +107 -0
  8. data/README.textile +41 -17
  9. data/Rakefile +5 -30
  10. data/active-fedora.gemspec +34 -496
  11. data/lib/active_fedora.rb +6 -1
  12. data/lib/active_fedora/base.rb +7 -5
  13. data/lib/active_fedora/datastream.rb +9 -8
  14. data/lib/active_fedora/metadata_datastream.rb +10 -3
  15. data/lib/active_fedora/model.rb +8 -4
  16. data/lib/active_fedora/nokogiri_datastream.rb +30 -24
  17. data/lib/active_fedora/qualified_dublin_core_datastream.rb +3 -2
  18. data/lib/active_fedora/rels_ext_datastream.rb +14 -5
  19. data/lib/active_fedora/samples.rb +3 -0
  20. data/lib/active_fedora/samples/hydra-mods_article_datastream.rb +517 -0
  21. data/lib/active_fedora/samples/hydra-rights_metadata_datastream.rb +206 -0
  22. data/lib/active_fedora/samples/marpa-dc_datastream.rb +97 -0
  23. data/lib/active_fedora/samples/special_thing.rb +45 -0
  24. data/lib/active_fedora/semantic_node.rb +16 -13
  25. data/lib/active_fedora/version.rb +3 -0
  26. data/lib/fedora/base.rb +5 -5
  27. data/lib/fedora/datastream.rb +1 -1
  28. data/lib/fedora/fedora_object.rb +1 -1
  29. data/lib/fedora/repository.rb +4 -0
  30. data/lib/tasks/active_fedora.rake +126 -0
  31. data/lib/tasks/active_fedora_dev.rake +127 -0
  32. data/solr/conf/schema.xml +278 -0
  33. data/solr/conf/solrconfig.xml +840 -0
  34. data/spec/integration/full_featured_model_spec.rb +2 -2
  35. data/spec/integration/mods_article_integration_spec.rb +2 -2
  36. data/spec/integration/nokogiri_datastream_spec.rb +2 -2
  37. data/spec/rcov.opts +2 -0
  38. data/spec/samples/models/hydrangea_article.rb +12 -0
  39. data/spec/spec_helper.rb +1 -1
  40. data/spec/unit/nokogiri_datastream_spec.rb +10 -7
  41. metadata +189 -886
  42. data/NG_XML_DATASTREAM.textile +0 -25
  43. data/USING_OM_DATASTREAMS.textile +0 -60
  44. data/VERSION +0 -1
  45. data/lib/hydra.rb +0 -2
  46. data/lib/hydra/sample_mods_datastream.rb +0 -63
  47. data/tasks/hoe.rake +0 -0
  48. data/tasks/rspec.rake +0 -29
@@ -0,0 +1,840 @@
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
+ <config>
20
+ <!-- Set this to 'false' if you want solr to continue working after it has
21
+ encountered an severe configuration error. In a production environment,
22
+ you may want solr to keep working even if one handler is mis-configured.
23
+
24
+ You may also set this to false using by setting the system property:
25
+ -Dsolr.abortOnConfigurationError=false
26
+ -->
27
+ <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
28
+
29
+ <!-- Used to specify an alternate directory to hold all index data
30
+ other than the default ./data under the Solr home.
31
+ If replication is in use, this should match the replication configuration. -->
32
+ <!-- <dataDir>${solr.data.dir:./solr/data/salt}</dataDir>
33
+ -->
34
+
35
+ <indexDefaults>
36
+ <!-- Values here affect all index writers and act as a default unless overridden. -->
37
+ <useCompoundFile>false</useCompoundFile>
38
+
39
+ <mergeFactor>10</mergeFactor>
40
+ <!--
41
+ If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
42
+
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
47
+
48
+ If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
49
+
50
+ -->
51
+ <ramBufferSizeMB>32</ramBufferSizeMB>
52
+ <maxMergeDocs>2147483647</maxMergeDocs>
53
+ <maxFieldLength>10000</maxFieldLength>
54
+ <writeLockTimeout>1000</writeLockTimeout>
55
+ <commitLockTimeout>10000</commitLockTimeout>
56
+
57
+ <!--
58
+ Expert: Turn on Lucene's auto commit capability.
59
+ This causes intermediate segment flushes to write a new lucene
60
+ index descriptor, enabling it to be opened by an external
61
+ IndexReader.
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
+
70
+ LogByteSizeMergePolicy chooses segments to merge based on their size. The Lucene 2.2 default, LogDocMergePolicy chose when
71
+ to merge based on number of documents
72
+
73
+ Other implementations of MergePolicy must have a no-argument constructor
74
+ -->
75
+ <!--<mergePolicy>org.apache.lucene.index.LogByteSizeMergePolicy</mergePolicy>-->
76
+
77
+ <!--
78
+ Expert:
79
+ The Merge Scheduler in Lucene controls how merges are performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
80
+ can perform merges in the background using separate threads. The SerialMergeScheduler (Lucene 2.2 default) does not.
81
+ -->
82
+ <!--<mergeScheduler>org.apache.lucene.index.ConcurrentMergeScheduler</mergeScheduler>-->
83
+
84
+ <!--
85
+ This option specifies which Lucene LockFactory implementation to use.
86
+
87
+ single = SingleInstanceLockFactory - suggested for a read-only index
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
+ -->
148
+
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
+
174
+ </updateHandler>
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
+ -->
243
+
244
+ <!-- An optimization that attempts to use a filter to satisfy a search.
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 -->
362
+ <lst name="defaults">
363
+ <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
+ </lst>
370
+ </requestHandler>
371
+
372
+
373
+ <requestHandler name="search" class="solr.SearchHandler" >
374
+ <lst name="defaults">
375
+ <!-- Making defType lucene to exclude file assets -->
376
+ <str name="defType">lucene</str>
377
+ <str name="df">has_model_s</str>
378
+ <str name="q.op">AND</str>
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&lt;-1 5&lt;-2 6&lt;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>
430
+ <str name="fl">
431
+ id,text,title_t,date_t,year_facet,month_facet,medium_t,series_facet,box_facet,folder_facet,has_model_s,has_collection_member_s,system_create_dt,
432
+ 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,person_7_role_t,person_8_role_t,person_9_role_t,
433
+ 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,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,
434
+ 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,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,depositor_t,
435
+
436
+ journal_title_info_t, journal_title_info_main_title_t, journal_issue_publication_date_t, journal_issue_pages_start_t, journal_issue_pages_end_t, journal_issue_volume_t, journal_issue_start_page_t, journal_issue_end_page_t, abstract_t,
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
442
+ </str>
443
+ <str name="mm">
444
+ 2&lt;-1 5&lt;-2 6&lt;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&lt;-1 5&lt;-2 6&lt;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
+ </lst>
484
+ </requestHandler>
485
+
486
+ <!-- for requests to get a single document; use id=666 instead of q=id:666 -->
487
+ <requestHandler name="document" class="solr.SearchHandler" >
488
+ <lst name="defaults">
489
+ <str name="echoParams">all</str>
490
+ <str name="fl">*</str>
491
+ <str name="rows">1</str>
492
+ <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&lt;-1 5&lt;-2 6&lt;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
+ </lst>
554
+ </requestHandler>
555
+
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&lt;-1 5&lt;-2 6&lt;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
+
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
+
631
+ If you register a searchComponent to one of the standard names, that will be used instead.
632
+ To insert handlers before or after the 'standard' components, use:
633
+
634
+ <arr name="first-components">
635
+ <str>myFirstComponentName</str>
636
+ </arr>
637
+
638
+ <arr name="last-components">
639
+ <str>myLastComponentName</str>
640
+ </arr>
641
+ -->
642
+
643
+ <!-- The spell check component can return a list of alternative spelling
644
+ suggestions. -->
645
+ <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
646
+
647
+ <str name="queryAnalyzerFieldType">textSpell</str>
648
+
649
+ <lst name="spellchecker">
650
+ <str name="name">default</str>
651
+ <str name="field">spell</str>
652
+ <str name="spellcheckIndexDir">./spellchecker1</str>
653
+
654
+ </lst>
655
+ <lst name="spellchecker">
656
+ <str name="name">jarowinkler</str>
657
+ <str name="field">spell</str>
658
+ <!-- Use a different Distance Measure -->
659
+ <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
660
+ <str name="spellcheckIndexDir">./spellchecker2</str>
661
+
662
+ </lst>
663
+
664
+ <lst name="spellchecker">
665
+ <str name="classname">solr.FileBasedSpellChecker</str>
666
+ <str name="name">file</str>
667
+ <str name="sourceLocation">spellings.txt</str>
668
+ <str name="characterEncoding">UTF-8</str>
669
+ <str name="spellcheckIndexDir">./spellcheckerFile</str>
670
+ </lst>
671
+ </searchComponent>
672
+
673
+ <!-- a request handler utilizing the spellcheck component -->
674
+ <requestHandler name="/spellCheckCompRH" class="solr.SearchHandler">
675
+ <lst name="defaults">
676
+ <!-- omp = Only More Popular -->
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>
682
+ </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
+ </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
+ </config>