enju_ndl 0.2.0.beta.2 → 0.2.0.beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/lib/enju_ndl/ndl_search.rb +9 -2
  3. data/lib/enju_ndl/version.rb +1 -1
  4. data/spec/cassette_library/NdlBook/import/should_import_even_with_invalid_url.yml +174 -0
  5. data/spec/controllers/ndl_books_controller_spec.rb +1 -1
  6. data/spec/dummy/app/models/user.rb +2 -0
  7. data/spec/dummy/db/migrate/059_create_libraries.rb +7 -9
  8. data/spec/dummy/db/migrate/069_create_shelves.rb +3 -4
  9. data/spec/dummy/db/migrate/080_create_library_groups.rb +2 -3
  10. data/spec/dummy/db/migrate/120_create_baskets.rb +2 -3
  11. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +4 -7
  12. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +4 -5
  13. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +3 -6
  14. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  15. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +2 -2
  16. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -2
  17. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
  18. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
  19. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
  20. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
  21. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -3
  22. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +3 -5
  23. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +19 -6
  24. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +15 -2
  25. data/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +9 -0
  26. data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +5 -0
  27. data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +5 -0
  28. data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +5 -0
  29. data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +5 -0
  30. data/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +9 -0
  31. data/spec/dummy/db/schema.rb +26 -10
  32. data/spec/dummy/db/test.sqlite3 +0 -0
  33. data/spec/dummy/solr/conf/admin-extra.html +31 -0
  34. data/spec/dummy/solr/conf/elevate.xml +36 -0
  35. data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  36. data/spec/dummy/solr/conf/protwords.txt +21 -0
  37. data/spec/dummy/solr/conf/schema.xml +275 -0
  38. data/spec/dummy/solr/conf/scripts.conf +24 -0
  39. data/spec/dummy/solr/conf/solrconfig.xml +680 -0
  40. data/spec/dummy/solr/conf/spellings.txt +2 -0
  41. data/spec/dummy/solr/conf/stopwords.txt +58 -0
  42. data/spec/dummy/solr/conf/synonyms.txt +31 -0
  43. data/spec/dummy/solr/default/data/index/_1j.fdt +0 -0
  44. data/spec/dummy/solr/default/data/index/_1j.fdx +0 -0
  45. data/spec/dummy/solr/default/data/index/_1j.fnm +0 -0
  46. data/spec/dummy/solr/default/data/index/_1j.nvd +0 -0
  47. data/spec/dummy/solr/default/data/index/_1j.nvm +0 -0
  48. data/spec/dummy/solr/default/data/index/_1j.si +0 -0
  49. data/spec/dummy/solr/default/data/index/_1j_2.del +0 -0
  50. data/spec/dummy/solr/default/data/index/_1j_Lucene41_0.doc +0 -0
  51. data/spec/dummy/solr/default/data/index/_1j_Lucene41_0.pos +0 -0
  52. data/spec/dummy/solr/default/data/index/_1j_Lucene41_0.tim +0 -0
  53. data/spec/dummy/solr/default/data/index/_1j_Lucene41_0.tip +0 -0
  54. data/spec/dummy/solr/default/data/index/_1l.fdt +0 -0
  55. data/spec/dummy/solr/default/data/index/_1l.fdx +0 -0
  56. data/spec/dummy/solr/default/data/index/_1l.fnm +0 -0
  57. data/spec/dummy/solr/default/data/index/_1l.nvd +0 -0
  58. data/spec/dummy/solr/default/data/index/_1l.nvm +0 -0
  59. data/spec/dummy/solr/default/data/index/_1l.si +0 -0
  60. data/spec/dummy/solr/default/data/index/_1l_1.del +0 -0
  61. data/spec/dummy/solr/default/data/index/_1l_Lucene41_0.doc +0 -0
  62. data/spec/dummy/solr/default/data/index/_1l_Lucene41_0.pos +0 -0
  63. data/spec/dummy/solr/default/data/index/_1l_Lucene41_0.tim +0 -0
  64. data/spec/dummy/solr/default/data/index/_1l_Lucene41_0.tip +0 -0
  65. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  66. data/spec/dummy/solr/default/data/index/segments_29 +0 -0
  67. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000068 +0 -0
  68. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000070 +0 -0
  69. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000072 +0 -0
  70. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000073 +0 -0
  71. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000074 +0 -0
  72. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000075 +0 -0
  73. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000076 +0 -0
  74. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000077 +0 -0
  75. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000078 +0 -0
  76. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000079 +0 -0
  77. data/spec/dummy/solr/development/data/index/segments.gen +0 -0
  78. data/spec/dummy/solr/development/data/index/segments_1 +0 -0
  79. data/spec/dummy/solr/solr.xml +8 -0
  80. data/spec/dummy/solr/test/data/index/segments.gen +0 -0
  81. data/spec/dummy/solr/test/data/index/segments_1 +0 -0
  82. data/spec/fixtures/library_groups.yml +1 -1
  83. data/spec/models/import_request_spec.rb +1 -1
  84. data/spec/models/manifestation_spec.rb +1 -1
  85. data/spec/models/ndl_book_spec.rb +11 -1
  86. data/spec/models/question_spec.rb +1 -1
  87. data/spec/rails_helper.rb +61 -0
  88. data/spec/requests/ndl_books_spec.rb +1 -1
  89. data/spec/spec_helper.rb +83 -52
  90. metadata +415 -303
  91. data/spec/dummy/config/initializers/enju_leaf.rb +0 -1
  92. data/spec/dummy/db/migrate/20160813130535_add_email_to_library_group.rb +0 -5
@@ -0,0 +1,680 @@
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
+ <!-- Controls what version of Lucene various components of Solr
33
+ adhere to. Generally, you want to use the latest version to
34
+ get all bug fixes and improvements. It is highly recommended
35
+ that you fully re-index after changing this setting as it can
36
+ affect both how text is indexed and queried.
37
+ -->
38
+ <luceneMatchVersion>LUCENE_41</luceneMatchVersion>
39
+
40
+ <!-- <lib/> directives can be used to instruct Solr to load an Jars
41
+ identified and use them to resolve any "plugins" specified in
42
+ your solrconfig.xml or schema.xml (ie: Analyzers, Request
43
+ Handlers, etc...).
44
+
45
+ All directories and paths are resolved relative to the
46
+ instanceDir.
47
+
48
+ Please note that <lib/> directives are processed in the order
49
+ that they appear in your solrconfig.xml file, and are "stacked"
50
+ on top of each other when building a ClassLoader - so if you have
51
+ plugin jars with dependencies on other jars, the "lower level"
52
+ dependency jars should be loaded first.
53
+
54
+ If a "./lib" directory exists in your instanceDir, all files
55
+ found in it are included as if you had used the following
56
+ syntax...
57
+
58
+ <lib dir="./lib" />
59
+ -->
60
+ <dataDir>${solr.data.dir:}</dataDir>
61
+
62
+
63
+ <!-- The DirectoryFactory to use for indexes.
64
+
65
+ solr.StandardDirectoryFactory is filesystem
66
+ based and tries to pick the best implementation for the current
67
+ JVM and platform. solr.NRTCachingDirectoryFactory, the default,
68
+ wraps solr.StandardDirectoryFactory and caches small files in memory
69
+ for better NRT performance.
70
+
71
+ One can force a particular implementation via solr.MMapDirectoryFactory,
72
+ solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
73
+
74
+ solr.RAMDirectoryFactory is memory based, not
75
+ persistent, and doesn't work with replication.
76
+ -->
77
+ <directoryFactory name="DirectoryFactory"
78
+ class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
79
+
80
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81
+ Index Config - These settings control low-level behavior of indexing
82
+ Most example settings here show the default value, but are commented
83
+ out, to more easily see where customizations have been made.
84
+
85
+ Note: This replaces <indexDefaults> and <mainIndex> from older versions
86
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
87
+ <indexConfig>
88
+ <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
89
+ LimitTokenCountFilterFactory in your fieldType definition. E.g.
90
+ <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
91
+ -->
92
+ <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
93
+ <!-- <writeLockTimeout>1000</writeLockTimeout> -->
94
+
95
+ <!-- The maximum number of simultaneous threads that may be
96
+ indexing documents at once in IndexWriter; if more than this
97
+ many threads arrive they will wait for others to finish.
98
+ Default in Solr/Lucene is 8. -->
99
+ <maxIndexingThreads>2</maxIndexingThreads>
100
+
101
+ <useCompoundFile>true</useCompoundFile>
102
+
103
+ <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
104
+ indexing for buffering added documents and deletions before they are
105
+ flushed to the Directory.
106
+ maxBufferedDocs sets a limit on the number of documents buffered
107
+ before flushing.
108
+ If both ramBufferSizeMB and maxBufferedDocs is set, then
109
+ Lucene will flush based on whichever limit is hit first. -->
110
+ <ramBufferSizeMB>20</ramBufferSizeMB> -->
111
+ <maxBufferedDocs>10000</maxBufferedDocs>
112
+
113
+ <!-- Expert: Merge Policy
114
+ The Merge Policy in Lucene controls how merging of segments is done.
115
+ The default since Solr/Lucene 3.3 is TieredMergePolicy.
116
+ The default since Lucene 2.3 was the LogByteSizeMergePolicy,
117
+ Even older versions of Lucene used LogDocMergePolicy.
118
+ -->
119
+ <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
120
+ <int name="maxMergeAtOnce">4</int>
121
+ <int name="segmentsPerTier">4</int>
122
+ </mergePolicy>
123
+
124
+ <unlockOnStartup>true</unlockOnStartup>
125
+
126
+ </indexConfig>
127
+
128
+ <updateHandler class="solr.DirectUpdateHandler2">
129
+
130
+ <!-- Enables a transaction log, used for real-time get, durability, and
131
+ and solr cloud replica recovery. The log can grow as big as
132
+ uncommitted changes to the index, so use of a hard autoCommit
133
+ is recommended (see below).
134
+ "dir" - the target directory for transaction logs, defaults to the
135
+ solr data directory. -->
136
+ <updateLog>
137
+ <str name="dir">${solr.ulog.dir:}</str>
138
+ </updateLog>
139
+
140
+ <autoCommit>
141
+ <maxTime>15000</maxTime>
142
+ <openSearcher>false</openSearcher>
143
+ </autoCommit>
144
+
145
+ <autoSoftCommit>
146
+ <maxTime>5000</maxTime>
147
+ </autoSoftCommit>
148
+ </updateHandler>
149
+
150
+ <query>
151
+ <maxBooleanClauses>1024</maxBooleanClauses>
152
+
153
+
154
+ <!-- Solr Internal Query Caches
155
+
156
+ There are two implementations of cache available for Solr,
157
+ LRUCache, based on a synchronized LinkedHashMap, and
158
+ FastLRUCache, based on a ConcurrentHashMap.
159
+
160
+ FastLRUCache has faster gets and slower puts in single
161
+ threaded operation and thus is generally faster than LRUCache
162
+ when the hit ratio of the cache is high (> 75%), and may be
163
+ faster under other scenarios on multi-cpu systems.
164
+ -->
165
+
166
+ <!-- Filter Cache
167
+
168
+ Cache used by SolrIndexSearcher for filters (DocSets),
169
+ unordered sets of *all* documents that match a query. When a
170
+ new searcher is opened, its caches may be prepopulated or
171
+ "autowarmed" using data from caches in the old searcher.
172
+ autowarmCount is the number of items to prepopulate. For
173
+ LRUCache, the autowarmed items will be the most recently
174
+ accessed items.
175
+
176
+ Parameters:
177
+ class - the SolrCache implementation LRUCache or
178
+ (LRUCache or FastLRUCache)
179
+ size - the maximum number of entries in the cache
180
+ initialSize - the initial capacity (number of entries) of
181
+ the cache. (see java.util.HashMap)
182
+ autowarmCount - the number of entries to prepopulate from
183
+ and old cache.
184
+ -->
185
+ <filterCache class="solr.FastLRUCache"
186
+ size="512"
187
+ initialSize="512"
188
+ autowarmCount="0"/>
189
+
190
+ <!-- Query Result Cache
191
+
192
+ Caches results of searches - ordered lists of document ids
193
+ (DocList) based on a query, a sort, and the range of documents requested.
194
+ -->
195
+ <queryResultCache class="solr.LRUCache"
196
+ size="512"
197
+ initialSize="512"
198
+ autowarmCount="0"/>
199
+
200
+ <!-- Document Cache
201
+
202
+ Caches Lucene Document objects (the stored fields for each
203
+ document). Since Lucene internal document ids are transient,
204
+ this cache will not be autowarmed.
205
+ -->
206
+ <documentCache class="solr.LRUCache"
207
+ size="512"
208
+ initialSize="512"
209
+ autowarmCount="0"/>
210
+
211
+ <!-- Lazy Field Loading
212
+
213
+ If true, stored fields that are not requested will be loaded
214
+ lazily. This can result in a significant speed improvement
215
+ if the usual case is to not load all stored fields,
216
+ especially if the skipped fields are large compressed text
217
+ fields.
218
+ -->
219
+ <enableLazyFieldLoading>true</enableLazyFieldLoading>
220
+
221
+ <!-- Use Filter For Sorted Query
222
+
223
+ A possible optimization that attempts to use a filter to
224
+ satisfy a search. If the requested sort does not include
225
+ score, then the filterCache will be checked for a filter
226
+ matching the query. If found, the filter will be used as the
227
+ source of document ids, and then the sort will be applied to
228
+ that.
229
+
230
+ For most situations, this will not be useful unless you
231
+ frequently get the same search repeatedly with different sort
232
+ options, and none of them ever use "score"
233
+ -->
234
+ <!--
235
+ <useFilterForSortedQuery>true</useFilterForSortedQuery>
236
+ -->
237
+
238
+ <!-- Result Window Size
239
+
240
+ An optimization for use with the queryResultCache. When a search
241
+ is requested, a superset of the requested number of document ids
242
+ are collected. For example, if a search for a particular query
243
+ requests matching documents 10 through 19, and queryWindowSize is 50,
244
+ then documents 0 through 49 will be collected and cached. Any further
245
+ requests in that range can be satisfied via the cache.
246
+ -->
247
+ <queryResultWindowSize>20</queryResultWindowSize>
248
+
249
+ <!-- Maximum number of documents to cache for any entry in the
250
+ queryResultCache.
251
+ -->
252
+ <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
253
+
254
+ <!-- Query Related Event Listeners
255
+
256
+ Various IndexSearcher related events can trigger Listeners to
257
+ take actions.
258
+
259
+ newSearcher - fired whenever a new searcher is being prepared
260
+ and there is a current searcher handling requests (aka
261
+ registered). It can be used to prime certain caches to
262
+ prevent long request times for certain requests.
263
+
264
+ firstSearcher - fired whenever a new searcher is being
265
+ prepared but there is no current registered searcher to handle
266
+ requests or to gain autowarming data from.
267
+
268
+
269
+ -->
270
+
271
+ <!-- Use Cold Searcher
272
+
273
+ If a search request comes in and there is no current
274
+ registered searcher, then immediately register the still
275
+ warming searcher and use it. If "false" then all requests
276
+ will block until the first searcher is done warming.
277
+ -->
278
+ <useColdSearcher>false</useColdSearcher>
279
+
280
+ <!-- Max Warming Searchers
281
+
282
+ Maximum number of searchers that may be warming in the
283
+ background concurrently. An error is returned if this limit
284
+ is exceeded.
285
+
286
+ Recommend values of 1-2 for read-only slaves, higher for
287
+ masters w/o cache warming.
288
+ -->
289
+ <maxWarmingSearchers>5</maxWarmingSearchers>
290
+
291
+ </query>
292
+
293
+
294
+ <!-- Request Dispatcher
295
+
296
+ This section contains instructions for how the SolrDispatchFilter
297
+ should behave when processing requests for this SolrCore.
298
+
299
+ handleSelect is a legacy option that affects the behavior of requests
300
+ such as /select?qt=XXX
301
+
302
+ handleSelect="true" will cause the SolrDispatchFilter to process
303
+ the request and dispatch the query to a handler specified by the
304
+ "qt" param, assuming "/select" isn't already registered.
305
+
306
+ handleSelect="false" will cause the SolrDispatchFilter to
307
+ ignore "/select" requests, resulting in a 404 unless a handler
308
+ is explicitly registered with the name "/select"
309
+
310
+ handleSelect="true" is not recommended for new users, but is the default
311
+ for backwards compatibility
312
+ -->
313
+ <requestDispatcher handleSelect="false" >
314
+ <!-- Request Parsing
315
+
316
+ These settings indicate how Solr Requests may be parsed, and
317
+ what restrictions may be placed on the ContentStreams from
318
+ those requests
319
+
320
+ enableRemoteStreaming - enables use of the stream.file
321
+ and stream.url parameters for specifying remote streams.
322
+
323
+ multipartUploadLimitInKB - specifies the max size (in KiB) of
324
+ Multipart File Uploads that Solr will allow in a Request.
325
+
326
+ formdataUploadLimitInKB - specifies the max size (in KiB) of
327
+ form data (application/x-www-form-urlencoded) sent via
328
+ POST. You can use POST to pass request parameters not
329
+ fitting into the URL.
330
+
331
+ *** WARNING ***
332
+ The settings below authorize Solr to fetch remote files, You
333
+ should make sure your system has some authentication before
334
+ using enableRemoteStreaming="true"
335
+
336
+ -->
337
+
338
+ <!-- HTTP Caching
339
+
340
+ Set HTTP caching related parameters (for proxy caches and clients).
341
+
342
+ The options below instruct Solr not to output any HTTP Caching
343
+ related headers
344
+ -->
345
+ <httpCaching never304="true" />
346
+ <!-- If you include a <cacheControl> directive, it will be used to
347
+ generate a Cache-Control header (as well as an Expires header
348
+ if the value contains "max-age=")
349
+
350
+ By default, no Cache-Control header is generated.
351
+
352
+ You can use the <cacheControl> option even if you have set
353
+ never304="true"
354
+ -->
355
+ <!--
356
+ <httpCaching never304="true" >
357
+ <cacheControl>max-age=30, public</cacheControl>
358
+ </httpCaching>
359
+ -->
360
+ <!-- To enable Solr to respond with automatically generated HTTP
361
+ Caching headers, and to response to Cache Validation requests
362
+ correctly, set the value of never304="false"
363
+
364
+ This will cause Solr to generate Last-Modified and ETag
365
+ headers based on the properties of the Index.
366
+
367
+ The following options can also be specified to affect the
368
+ values of these headers...
369
+
370
+ lastModFrom - the default value is "openTime" which means the
371
+ Last-Modified value (and validation against If-Modified-Since
372
+ requests) will all be relative to when the current Searcher
373
+ was opened. You can change it to lastModFrom="dirLastMod" if
374
+ you want the value to exactly correspond to when the physical
375
+ index was last modified.
376
+
377
+ etagSeed="..." is an option you can change to force the ETag
378
+ header (and validation against If-None-Match requests) to be
379
+ different even if the index has not changed (ie: when making
380
+ significant changes to your config file)
381
+
382
+ (lastModifiedFrom and etagSeed are both ignored if you use
383
+ the never304="true" option)
384
+ -->
385
+ <!--
386
+ <httpCaching lastModifiedFrom="openTime"
387
+ etagSeed="Solr">
388
+ <cacheControl>max-age=30, public</cacheControl>
389
+ </httpCaching>
390
+ -->
391
+ </requestDispatcher>
392
+
393
+ <!-- Request Handlers
394
+
395
+ http://wiki.apache.org/solr/SolrRequestHandler
396
+
397
+ Incoming queries will be dispatched to a specific handler by name
398
+ based on the path specified in the request.
399
+
400
+ Legacy behavior: If the request path uses "/select" but no Request
401
+ Handler has that name, and if handleSelect="true" has been specified in
402
+ the requestDispatcher, then the Request Handler is dispatched based on
403
+ the qt parameter. Handlers without a leading '/' are accessed this way
404
+ like so: http://host/app/[core/]select?qt=name If no qt is
405
+ given, then the requestHandler that declares default="true" will be
406
+ used or the one named "standard".
407
+
408
+ If a Request Handler is declared with startup="lazy", then it will
409
+ not be initialized until the first request that uses it.
410
+
411
+ -->
412
+ <!-- SearchHandler
413
+
414
+ http://wiki.apache.org/solr/SearchHandler
415
+
416
+ For processing Search Queries, the primary Request Handler
417
+ provided with Solr is "SearchHandler" It delegates to a sequent
418
+ of SearchComponents (see below) and supports distributed
419
+ queries across multiple shards
420
+ -->
421
+ <requestHandler name="/select" class="solr.SearchHandler">
422
+ <lst name="defaults">
423
+ <str name="spellcheck.dictionary">default</str>
424
+ <str name="spellcheck.extendedResults">true</str>
425
+ <str name="spellcheck.collate">true</str>
426
+ </lst>
427
+ <arr name="last-components">
428
+ <str>spellcheck</str>
429
+ </arr>
430
+ </requestHandler>
431
+
432
+ <!-- A request handler that returns indented JSON by default -->
433
+ <requestHandler name="/query" class="solr.SearchHandler">
434
+ <lst name="defaults">
435
+ <str name="echoParams">explicit</str>
436
+ <str name="wt">json</str>
437
+ <str name="indent">true</str>
438
+ <str name="df">text</str>
439
+ </lst>
440
+ <arr name="last-components">
441
+ <str>spellcheck</str>
442
+ </arr>
443
+ </requestHandler>
444
+
445
+
446
+ <!-- realtime get handler, guaranteed to return the latest stored fields of
447
+ any document, without the need to commit or open a new searcher. The
448
+ current implementation relies on the updateLog feature being enabled. -->
449
+ <requestHandler name="/get" class="solr.RealTimeGetHandler">
450
+ <lst name="defaults">
451
+ <str name="omitHeader">true</str>
452
+ <str name="wt">json</str>
453
+ <str name="indent">true</str>
454
+ </lst>
455
+ </requestHandler>
456
+
457
+ <requestHandler name="/update" class="solr.UpdateRequestHandler">
458
+ </requestHandler>
459
+
460
+ <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler">
461
+ <lst name="defaults">
462
+ <str name="stream.contentType">application/json</str>
463
+ </lst>
464
+ </requestHandler>
465
+
466
+ <requestHandler name="/update/csv" class="solr.CSVRequestHandler">
467
+ <lst name="defaults">
468
+ <str name="stream.contentType">application/csv</str>
469
+ </lst>
470
+ </requestHandler>
471
+
472
+ <requestHandler name="/update/extract"
473
+ startup="lazy"
474
+ class="solr.extraction.ExtractingRequestHandler" >
475
+ <lst name="defaults">
476
+ <str name="lowernames">true</str>
477
+ <str name="uprefix">ignored_</str>
478
+
479
+ <!-- capture link hrefs but ignore div attributes -->
480
+ <str name="captureAttr">true</str>
481
+ <str name="fmap.a">links</str>
482
+ <str name="fmap.div">ignored_</str>
483
+ </lst>
484
+ </requestHandler>
485
+
486
+ <requestHandler name="/analysis/field"
487
+ startup="lazy"
488
+ class="solr.FieldAnalysisRequestHandler" />
489
+
490
+ <requestHandler name="/analysis/document"
491
+ class="solr.DocumentAnalysisRequestHandler"
492
+ startup="lazy" />
493
+
494
+ <!-- ping/healthcheck -->
495
+ <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
496
+ <lst name="invariants">
497
+ <str name="q">solrpingquery</str>
498
+ </lst>
499
+ <lst name="defaults">
500
+ <str name="echoParams">all</str>
501
+ </lst>
502
+ </requestHandler>
503
+
504
+ <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
505
+ <lst name="defaults">
506
+ <str name="echoParams">explicit</str>
507
+ <str name="echoHandler">true</str>
508
+ </lst>
509
+ </requestHandler>
510
+
511
+ <requestHandler name="/replication" class="solr.ReplicationHandler" >
512
+ </requestHandler>
513
+
514
+ <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
515
+
516
+ <str name="queryAnalyzerFieldType">textSpell</str>
517
+
518
+ <!-- Multiple "Spell Checkers" can be declared and used by this
519
+ component
520
+ -->
521
+ <lst name="spellchecker">
522
+ <str name="name">default</str>
523
+ <!-- change field to textSpell and use copyField in schema.xml
524
+ to spellcheck multiple fields -->
525
+ <str name="field">textSpell</str>
526
+ <str name="buildOnCommit">true</str>
527
+ </lst>
528
+
529
+ <lst name="spellchecker">
530
+ <str name="name">example</str>
531
+ <str name="field">title_text</str>
532
+ <str name="buildOnCommit">true</str>
533
+ <str name="classname">solr.DirectSolrSpellChecker</str>
534
+ <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
535
+ <str name="distanceMeasure">internal</str>
536
+ <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
537
+ <float name="accuracy">0.5</float>
538
+ <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
539
+ <int name="maxEdits">2</int>
540
+ <!-- the minimum shared prefix when enumerating terms -->
541
+ <int name="minPrefix">1</int>
542
+ <!-- maximum number of inspections per result. -->
543
+ <int name="maxInspections">5</int>
544
+ <!-- minimum length of a query term to be considered for correction -->
545
+ <int name="minQueryLength">4</int>
546
+ <!-- maximum threshold of documents a query term can appear to be considered for correction -->
547
+ <float name="maxQueryFrequency">0.01</float>
548
+ <!-- uncomment this to require suggestions to occur in 1% of the documents
549
+ <float name="thresholdTokenFrequency">.01</float>
550
+ -->
551
+ </lst>
552
+
553
+ <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
554
+ <lst name="spellchecker">
555
+ <str name="name">wordbreak</str>
556
+ <str name="classname">solr.WordBreakSolrSpellChecker</str>
557
+ <str name="field">name</str>
558
+ <str name="combineWords">true</str>
559
+ <str name="breakWords">true</str>
560
+ <int name="maxChanges">10</int>
561
+ </lst>
562
+ -->
563
+ </searchComponent>
564
+
565
+ <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
566
+
567
+ <searchComponent name="terms" class="solr.TermsComponent"/>
568
+
569
+ <searchComponent class="solr.HighlightComponent" name="highlight">
570
+ <highlighting>
571
+ <!-- Configure the standard fragmenter -->
572
+ <!-- This could most likely be commented out in the "default" case -->
573
+ <fragmenter name="gap"
574
+ default="true"
575
+ class="solr.highlight.GapFragmenter">
576
+ <lst name="defaults">
577
+ <int name="hl.fragsize">100</int>
578
+ </lst>
579
+ </fragmenter>
580
+
581
+ <!-- A regular-expression-based fragmenter
582
+ (for sentence extraction)
583
+ -->
584
+ <fragmenter name="regex"
585
+ class="solr.highlight.RegexFragmenter">
586
+ <lst name="defaults">
587
+ <!-- slightly smaller fragsizes work better because of slop -->
588
+ <int name="hl.fragsize">70</int>
589
+ <!-- allow 50% slop on fragment sizes -->
590
+ <float name="hl.regex.slop">0.5</float>
591
+ <!-- a basic sentence pattern -->
592
+ <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
593
+ </lst>
594
+ </fragmenter>
595
+
596
+ <!-- Configure the standard formatter -->
597
+ <formatter name="html"
598
+ default="true"
599
+ class="solr.highlight.HtmlFormatter">
600
+ <lst name="defaults">
601
+ <str name="hl.simple.pre"><![CDATA[<em>]]></str>
602
+ <str name="hl.simple.post"><![CDATA[</em>]]></str>
603
+ </lst>
604
+ </formatter>
605
+
606
+ <!-- Configure the standard encoder -->
607
+ <encoder name="html"
608
+ class="solr.highlight.HtmlEncoder" />
609
+
610
+ <!-- Configure the standard fragListBuilder -->
611
+ <fragListBuilder name="simple"
612
+ class="solr.highlight.SimpleFragListBuilder"/>
613
+
614
+ <!-- Configure the single fragListBuilder -->
615
+ <fragListBuilder name="single"
616
+ class="solr.highlight.SingleFragListBuilder"/>
617
+
618
+ <!-- Configure the weighted fragListBuilder -->
619
+ <fragListBuilder name="weighted"
620
+ default="true"
621
+ class="solr.highlight.WeightedFragListBuilder"/>
622
+
623
+ <!-- default tag FragmentsBuilder -->
624
+ <fragmentsBuilder name="default"
625
+ default="true"
626
+ class="solr.highlight.ScoreOrderFragmentsBuilder">
627
+ <!--
628
+ <lst name="defaults">
629
+ <str name="hl.multiValuedSeparatorChar">/</str>
630
+ </lst>
631
+ -->
632
+ </fragmentsBuilder>
633
+
634
+ <!-- multi-colored tag FragmentsBuilder -->
635
+ <fragmentsBuilder name="colored"
636
+ class="solr.highlight.ScoreOrderFragmentsBuilder">
637
+ <lst name="defaults">
638
+ <str name="hl.tag.pre"><![CDATA[
639
+ <b style="background:yellow">,<b style="background:lawgreen">,
640
+ <b style="background:aquamarine">,<b style="background:magenta">,
641
+ <b style="background:palegreen">,<b style="background:coral">,
642
+ <b style="background:wheat">,<b style="background:khaki">,
643
+ <b style="background:lime">,<b style="background:deepskyblue">]]></str>
644
+ <str name="hl.tag.post"><![CDATA[</b>]]></str>
645
+ </lst>
646
+ </fragmentsBuilder>
647
+
648
+ <boundaryScanner name="default"
649
+ default="true"
650
+ class="solr.highlight.SimpleBoundaryScanner">
651
+ <lst name="defaults">
652
+ <str name="hl.bs.maxScan">10</str>
653
+ <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
654
+ </lst>
655
+ </boundaryScanner>
656
+
657
+ <boundaryScanner name="breakIterator"
658
+ class="solr.highlight.BreakIteratorBoundaryScanner">
659
+ <lst name="defaults">
660
+ <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
661
+ <str name="hl.bs.type">WORD</str>
662
+ <!-- language and country are used when constructing Locale object. -->
663
+ <!-- And the Locale object will be used when getting instance of BreakIterator -->
664
+ <str name="hl.bs.language">en</str>
665
+ <str name="hl.bs.country">US</str>
666
+ </lst>
667
+ </boundaryScanner>
668
+ </highlighting>
669
+ </searchComponent>
670
+
671
+ <requestHandler class="solr.MoreLikeThisHandler" name="/mlt">
672
+ <lst name="defaults">
673
+ <str name="mlt.mintf">1</str>
674
+ <str name="mlt.mindf">2</str>
675
+ </lst>
676
+ </requestHandler>
677
+
678
+ <!-- Admin Handlers - This will register all the standard admin RequestHandlers. -->
679
+ <requestHandler name="/admin/" class="solr.admin.AdminHandlers" />
680
+ </config>
@@ -0,0 +1,2 @@
1
+ pizza
2
+ history