supernova 0.2.1 → 0.2.2

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 (50) hide show
  1. data/Gemfile +1 -0
  2. data/Gemfile.lock +2 -0
  3. data/VERSION +1 -1
  4. data/lib/supernova/criteria.rb +6 -2
  5. data/lib/supernova/solr.rb +1 -0
  6. data/lib/supernova/solr_criteria.rb +10 -1
  7. data/lib/supernova/solr_indexer.rb +71 -0
  8. data/solr/conf/admin-extra.html +31 -0
  9. data/solr/conf/elevate.xml +36 -0
  10. data/solr/conf/mapping-FoldToASCII.txt +3813 -0
  11. data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  12. data/solr/conf/protwords.txt +21 -0
  13. data/solr/conf/schema.xml +475 -0
  14. data/solr/conf/scripts.conf +24 -0
  15. data/solr/conf/solrconfig.xml +1508 -0
  16. data/solr/conf/spellings.txt +2 -0
  17. data/solr/conf/stopwords.txt +58 -0
  18. data/solr/conf/synonyms.txt +29 -0
  19. data/solr/conf/velocity/VM_global_library.vm +184 -0
  20. data/solr/conf/velocity/browse.vm +45 -0
  21. data/solr/conf/velocity/cluster.vm +26 -0
  22. data/solr/conf/velocity/clusterResults.vm +29 -0
  23. data/solr/conf/velocity/doc.vm +29 -0
  24. data/solr/conf/velocity/facet_dates.vm +0 -0
  25. data/solr/conf/velocity/facet_fields.vm +12 -0
  26. data/solr/conf/velocity/facet_queries.vm +3 -0
  27. data/solr/conf/velocity/facet_ranges.vm +30 -0
  28. data/solr/conf/velocity/facets.vm +7 -0
  29. data/solr/conf/velocity/footer.vm +17 -0
  30. data/solr/conf/velocity/head.vm +45 -0
  31. data/solr/conf/velocity/header.vm +3 -0
  32. data/solr/conf/velocity/hit.vm +5 -0
  33. data/solr/conf/velocity/jquery.autocomplete.css +48 -0
  34. data/solr/conf/velocity/jquery.autocomplete.js +762 -0
  35. data/solr/conf/velocity/layout.vm +20 -0
  36. data/solr/conf/velocity/main.css +184 -0
  37. data/solr/conf/velocity/query.vm +56 -0
  38. data/solr/conf/velocity/querySpatial.vm +40 -0
  39. data/solr/conf/velocity/suggest.vm +3 -0
  40. data/solr/conf/velocity/tabs.vm +22 -0
  41. data/solr/conf/xslt/example.xsl +132 -0
  42. data/solr/conf/xslt/example_atom.xsl +67 -0
  43. data/solr/conf/xslt/example_rss.xsl +66 -0
  44. data/solr/conf/xslt/luke.xsl +337 -0
  45. data/spec/integration/solr_spec.rb +6 -0
  46. data/spec/spec_helper.rb +1 -1
  47. data/spec/supernova/solr_criteria_spec.rb +16 -0
  48. data/spec/supernova/solr_indexer_spec.rb +167 -0
  49. data/supernova.gemspec +45 -3
  50. metadata +91 -36
@@ -0,0 +1,24 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright ownership.
4
+ # The ASF licenses this file to You under the Apache License, Version 2.0
5
+ # (the "License"); you may not use this file except in compliance with
6
+ # the License. You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ user=
17
+ solr_hostname=localhost
18
+ solr_port=8983
19
+ rsyncd_port=18983
20
+ data_dir=
21
+ webapp_name=solr
22
+ master_host=
23
+ master_data_dir=
24
+ master_status_dir=
@@ -0,0 +1,1508 @@
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_31</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
+ <!-- A dir option by itself adds any files found in the directory to
67
+ the classpath, this is useful for including all jars in a
68
+ directory.
69
+ -->
70
+ <lib dir="../../contrib/extraction/lib" />
71
+ <!-- When a regex is specified in addition to a directory, only the
72
+ files in that directory which completely match the regex
73
+ (anchored on both ends) will be included.
74
+ -->
75
+ <lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar" />
76
+ <lib dir="../../dist/" regex="apache-solr-clustering-\d.*\.jar" />
77
+ <lib dir="../../dist/" regex="apache-solr-dataimporthandler-\d.*\.jar" />
78
+
79
+ <!-- If a dir option (with or without a regex) is used and nothing
80
+ is found that matches, it will be ignored
81
+ -->
82
+ <lib dir="../../contrib/clustering/lib/" />
83
+ <lib dir="/total/crap/dir/ignored" />
84
+ <!-- an exact path can be used to specify a specific file. This
85
+ will cause a serious error to be logged if it can't be loaded.
86
+ -->
87
+ <!--
88
+ <lib path="../a-jar-that-does-not-exist.jar" />
89
+ -->
90
+
91
+ <!-- Data Directory
92
+
93
+ Used to specify an alternate directory to hold all index data
94
+ other than the default ./data under the Solr home. If
95
+ replication is in use, this should match the replication
96
+ configuration.
97
+ -->
98
+ <dataDir>${solr.data.dir:}</dataDir>
99
+
100
+
101
+ <!-- The DirectoryFactory to use for indexes.
102
+
103
+ solr.StandardDirectoryFactory, the default, is filesystem
104
+ based. solr.RAMDirectoryFactory is memory based, not
105
+ persistent, and doesn't work with replication.
106
+ -->
107
+ <directoryFactory name="DirectoryFactory"
108
+ class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
109
+
110
+
111
+ <!-- Index Defaults
112
+
113
+ Values here affect all index writers and act as a default
114
+ unless overridden.
115
+
116
+ WARNING: See also the <mainIndex> section below for parameters
117
+ that overfor Solr's main Lucene index.
118
+ -->
119
+ <indexDefaults>
120
+
121
+ <useCompoundFile>false</useCompoundFile>
122
+
123
+ <mergeFactor>10</mergeFactor>
124
+ <!-- Sets the amount of RAM that may be used by Lucene indexing
125
+ for buffering added documents and deletions before they are
126
+ flushed to the Directory. -->
127
+ <ramBufferSizeMB>32</ramBufferSizeMB>
128
+ <!-- If both ramBufferSizeMB and maxBufferedDocs is set, then
129
+ Lucene will flush based on whichever limit is hit first.
130
+ -->
131
+ <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
132
+
133
+ <maxFieldLength>10000</maxFieldLength>
134
+ <writeLockTimeout>1000</writeLockTimeout>
135
+ <commitLockTimeout>10000</commitLockTimeout>
136
+
137
+ <!-- Expert: Merge Policy
138
+
139
+ The Merge Policy in Lucene controls how merging is handled by
140
+ Lucene. The default in 2.3 is the LogByteSizeMergePolicy,
141
+ previous versions used LogDocMergePolicy.
142
+
143
+ LogByteSizeMergePolicy chooses segments to merge based on
144
+ their size. The Lucene 2.2 default, LogDocMergePolicy chose
145
+ when to merge based on number of documents
146
+
147
+ Other implementations of MergePolicy must have a no-argument
148
+ constructor
149
+ -->
150
+ <!--
151
+ <mergePolicy class="org.apache.lucene.index.LogByteSizeMergePolicy"/>
152
+ -->
153
+
154
+ <!-- Expert: Merge Scheduler
155
+
156
+ The Merge Scheduler in Lucene controls how merges are
157
+ performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
158
+ can perform merges in the background using separate threads.
159
+ The SerialMergeScheduler (Lucene 2.2 default) does not.
160
+ -->
161
+ <!--
162
+ <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
163
+ -->
164
+
165
+ <!-- LockFactory
166
+
167
+ This option specifies which Lucene LockFactory implementation
168
+ to use.
169
+
170
+ single = SingleInstanceLockFactory - suggested for a
171
+ read-only index or when there is no possibility of
172
+ another process trying to modify the index.
173
+ native = NativeFSLockFactory - uses OS native file locking.
174
+ Do not use when multiple solr webapps in the same
175
+ JVM are attempting to share a single index.
176
+ simple = SimpleFSLockFactory - uses a plain file for locking
177
+
178
+ (For backwards compatibility with Solr 1.2, 'simple' is the
179
+ default if not specified.)
180
+
181
+ More details on the nuances of each LockFactory...
182
+ http://wiki.apache.org/lucene-java/AvailableLockFactories
183
+ -->
184
+ <lockType>native</lockType>
185
+
186
+ <!-- Expert: Controls how often Lucene loads terms into memory
187
+ Default is 128 and is likely good for most everyone.
188
+ -->
189
+ <!-- <termIndexInterval>256</termIndexInterval> -->
190
+ </indexDefaults>
191
+
192
+ <!-- Main Index
193
+
194
+ Values here override the values in the <indexDefaults> section
195
+ for the main on disk index.
196
+ -->
197
+ <mainIndex>
198
+
199
+ <useCompoundFile>false</useCompoundFile>
200
+ <ramBufferSizeMB>32</ramBufferSizeMB>
201
+ <mergeFactor>10</mergeFactor>
202
+
203
+ <!-- Unlock On Startup
204
+
205
+ If true, unlock any held write or commit locks on startup.
206
+ This defeats the locking mechanism that allows multiple
207
+ processes to safely access a lucene index, and should be used
208
+ with care.
209
+
210
+ This is not needed if lock type is 'none' or 'single'
211
+ -->
212
+ <unlockOnStartup>false</unlockOnStartup>
213
+
214
+ <!-- If true, IndexReaders will be reopened (often more efficient)
215
+ instead of closed and then opened.
216
+ -->
217
+ <reopenReaders>true</reopenReaders>
218
+
219
+ <!-- Commit Deletion Policy
220
+
221
+ Custom deletion policies can specified here. The class must
222
+ implement org.apache.lucene.index.IndexDeletionPolicy.
223
+
224
+ http://lucene.apache.org/java/2_9_1/api/all/org/apache/lucene/index/IndexDeletionPolicy.html
225
+
226
+ The standard Solr IndexDeletionPolicy implementation supports
227
+ deleting index commit points on number of commits, age of
228
+ commit point and optimized status.
229
+
230
+ The latest commit point should always be preserved regardless
231
+ of the criteria.
232
+ -->
233
+ <deletionPolicy class="solr.SolrDeletionPolicy">
234
+ <!-- The number of commit points to be kept -->
235
+ <str name="maxCommitsToKeep">1</str>
236
+ <!-- The number of optimized commit points to be kept -->
237
+ <str name="maxOptimizedCommitsToKeep">0</str>
238
+ <!--
239
+ Delete all commit points once they have reached the given age.
240
+ Supports DateMathParser syntax e.g.
241
+ -->
242
+ <!--
243
+ <str name="maxCommitAge">30MINUTES</str>
244
+ <str name="maxCommitAge">1DAY</str>
245
+ -->
246
+ </deletionPolicy>
247
+
248
+ <!-- Lucene Infostream
249
+
250
+ To aid in advanced debugging, Lucene provides an "InfoStream"
251
+ of detailed information when indexing.
252
+
253
+ Setting The value to true will instruct the underlying Lucene
254
+ IndexWriter to write it's debugging info the specified file
255
+ -->
256
+ <infoStream file="INFOSTREAM.txt">false</infoStream>
257
+
258
+ </mainIndex>
259
+
260
+ <!-- JMX
261
+
262
+ This example enables JMX if and only if an existing MBeanServer
263
+ is found, use this if you want to configure JMX through JVM
264
+ parameters. Remove this to disable exposing Solr configuration
265
+ and statistics to JMX.
266
+
267
+ For more details see http://wiki.apache.org/solr/SolrJmx
268
+ -->
269
+ <jmx />
270
+ <!-- If you want to connect to a particular server, specify the
271
+ agentId
272
+ -->
273
+ <!-- <jmx agentId="myAgent" /> -->
274
+ <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
275
+ <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
276
+ -->
277
+
278
+ <!-- The default high-performance update handler -->
279
+ <updateHandler class="solr.DirectUpdateHandler2">
280
+
281
+ <!-- AutoCommit
282
+
283
+ Perform a <commit/> automatically under certain conditions.
284
+ Instead of enabling autoCommit, consider using "commitWithin"
285
+ when adding documents.
286
+
287
+ http://wiki.apache.org/solr/UpdateXmlMessages
288
+
289
+ maxDocs - Maximum number of documents to add since the last
290
+ commit before automaticly triggering a new commit.
291
+
292
+ maxTime - Maximum amount of time that is allowed to pass
293
+ since a document was added before automaticly
294
+ triggering a new commit.
295
+ -->
296
+ <!--
297
+ <autoCommit>
298
+ <maxDocs>10000</maxDocs>
299
+ <maxTime>1000</maxTime>
300
+ </autoCommit>
301
+ -->
302
+
303
+ <!-- Update Related Event Listeners
304
+
305
+ Various IndexWriter realted events can trigger Listeners to
306
+ take actions.
307
+
308
+ postCommit - fired after every commit or optimize command
309
+ postOptimize - fired after every optimize command
310
+ -->
311
+ <!-- The RunExecutableListener executes an external command from a
312
+ hook such as postCommit or postOptimize.
313
+
314
+ exe - the name of the executable to run
315
+ dir - dir to use as the current working directory. (default=".")
316
+ wait - the calling thread waits until the executable returns.
317
+ (default="true")
318
+ args - the arguments to pass to the program. (default is none)
319
+ env - environment variables to set. (default is none)
320
+ -->
321
+ <!-- This example shows how RunExecutableListener could be used
322
+ with the script based replication...
323
+ http://wiki.apache.org/solr/CollectionDistribution
324
+ -->
325
+ <!--
326
+ <listener event="postCommit" class="solr.RunExecutableListener">
327
+ <str name="exe">solr/bin/snapshooter</str>
328
+ <str name="dir">.</str>
329
+ <bool name="wait">true</bool>
330
+ <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
331
+ <arr name="env"> <str>MYVAR=val1</str> </arr>
332
+ </listener>
333
+ -->
334
+ </updateHandler>
335
+
336
+ <!-- IndexReaderFactory
337
+
338
+ Use the following format to specify a custom IndexReaderFactory,
339
+ which allows for alternate IndexReader implementations.
340
+
341
+ ** Experimental Feature **
342
+
343
+ Please note - Using a custom IndexReaderFactory may prevent
344
+ certain other features from working. The API to
345
+ IndexReaderFactory may change without warning or may even be
346
+ removed from future releases if the problems cannot be
347
+ resolved.
348
+
349
+
350
+ ** Features that may not work with custom IndexReaderFactory **
351
+
352
+ The ReplicationHandler assumes a disk-resident index. Using a
353
+ custom IndexReader implementation may cause incompatibility
354
+ with ReplicationHandler and may cause replication to not work
355
+ correctly. See SOLR-1366 for details.
356
+
357
+ -->
358
+ <!--
359
+ <indexReaderFactory name="IndexReaderFactory" class="package.class">
360
+ <str name="someArg">Some Value</str>
361
+ </indexReaderFactory >
362
+ -->
363
+ <!-- By explicitly declaring the Factory, the termIndexDivisor can
364
+ be specified.
365
+ -->
366
+ <!--
367
+ <indexReaderFactory name="IndexReaderFactory"
368
+ class="solr.StandardIndexReaderFactory">
369
+ <int name="setTermIndexDivisor">12</int>
370
+ </indexReaderFactory >
371
+ -->
372
+
373
+
374
+ <query>
375
+ <!-- Max Boolean Clauses
376
+
377
+ Maximum number of clauses in each BooleanQuery, an exception
378
+ is thrown if exceeded.
379
+
380
+ ** WARNING **
381
+
382
+ This option actually modifies a global Lucene property that
383
+ will affect all SolrCores. If multiple solrconfig.xml files
384
+ disagree on this property, the value at any given moment will
385
+ be based on the last SolrCore to be initialized.
386
+
387
+ -->
388
+ <maxBooleanClauses>1024</maxBooleanClauses>
389
+
390
+
391
+ <!-- Solr Internal Query Caches
392
+
393
+ There are two implementations of cache available for Solr,
394
+ LRUCache, based on a synchronized LinkedHashMap, and
395
+ FastLRUCache, based on a ConcurrentHashMap.
396
+
397
+ FastLRUCache has faster gets and slower puts in single
398
+ threaded operation and thus is generally faster than LRUCache
399
+ when the hit ratio of the cache is high (> 75%), and may be
400
+ faster under other scenarios on multi-cpu systems.
401
+ -->
402
+
403
+ <!-- Filter Cache
404
+
405
+ Cache used by SolrIndexSearcher for filters (DocSets),
406
+ unordered sets of *all* documents that match a query. When a
407
+ new searcher is opened, its caches may be prepopulated or
408
+ "autowarmed" using data from caches in the old searcher.
409
+ autowarmCount is the number of items to prepopulate. For
410
+ LRUCache, the autowarmed items will be the most recently
411
+ accessed items.
412
+
413
+ Parameters:
414
+ class - the SolrCache implementation LRUCache or
415
+ (LRUCache or FastLRUCache)
416
+ size - the maximum number of entries in the cache
417
+ initialSize - the initial capacity (number of entries) of
418
+ the cache. (see java.util.HashMap)
419
+ autowarmCount - the number of entries to prepopulate from
420
+ and old cache.
421
+ -->
422
+ <filterCache class="solr.FastLRUCache"
423
+ size="512"
424
+ initialSize="512"
425
+ autowarmCount="0"/>
426
+
427
+ <!-- Query Result Cache
428
+
429
+ Caches results of searches - ordered lists of document ids
430
+ (DocList) based on a query, a sort, and the range of documents requested.
431
+ -->
432
+ <queryResultCache class="solr.LRUCache"
433
+ size="512"
434
+ initialSize="512"
435
+ autowarmCount="0"/>
436
+
437
+ <!-- Document Cache
438
+
439
+ Caches Lucene Document objects (the stored fields for each
440
+ document). Since Lucene internal document ids are transient,
441
+ this cache will not be autowarmed.
442
+ -->
443
+ <documentCache class="solr.LRUCache"
444
+ size="512"
445
+ initialSize="512"
446
+ autowarmCount="0"/>
447
+
448
+ <!-- Field Value Cache
449
+
450
+ Cache used to hold field values that are quickly accessible
451
+ by document id. The fieldValueCache is created by default
452
+ even if not configured here.
453
+ -->
454
+ <!--
455
+ <fieldValueCache class="solr.FastLRUCache"
456
+ size="512"
457
+ autowarmCount="128"
458
+ showItems="32" />
459
+ -->
460
+
461
+ <!-- Custom Cache
462
+
463
+ Example of a generic cache. These caches may be accessed by
464
+ name through SolrIndexSearcher.getCache(),cacheLookup(), and
465
+ cacheInsert(). The purpose is to enable easy caching of
466
+ user/application level data. The regenerator argument should
467
+ be specified as an implementation of solr.CacheRegenerator
468
+ if autowarming is desired.
469
+ -->
470
+ <!--
471
+ <cache name="myUserCache"
472
+ class="solr.LRUCache"
473
+ size="4096"
474
+ initialSize="1024"
475
+ autowarmCount="1024"
476
+ regenerator="com.mycompany.MyRegenerator"
477
+ />
478
+ -->
479
+
480
+
481
+ <!-- Lazy Field Loading
482
+
483
+ If true, stored fields that are not requested will be loaded
484
+ lazily. This can result in a significant speed improvement
485
+ if the usual case is to not load all stored fields,
486
+ especially if the skipped fields are large compressed text
487
+ fields.
488
+ -->
489
+ <enableLazyFieldLoading>true</enableLazyFieldLoading>
490
+
491
+ <!-- Use Filter For Sorted Query
492
+
493
+ A possible optimization that attempts to use a filter to
494
+ satisfy a search. If the requested sort does not include
495
+ score, then the filterCache will be checked for a filter
496
+ matching the query. If found, the filter will be used as the
497
+ source of document ids, and then the sort will be applied to
498
+ that.
499
+
500
+ For most situations, this will not be useful unless you
501
+ frequently get the same search repeatedly with differnet sort
502
+ options, and none of them ever use "score"
503
+ -->
504
+ <!--
505
+ <useFilterForSortedQuery>true</useFilterForSortedQuery>
506
+ -->
507
+
508
+ <!-- Result Window Size
509
+
510
+ An optimization for use with the queryResultCache. When a search
511
+ is requested, a superset of the requested number of document ids
512
+ are collected. For example, if a search for a particular query
513
+ requests matching documents 10 through 19, and queryWindowSize is 50,
514
+ then documents 0 through 49 will be collected and cached. Any further
515
+ requests in that range can be satisfied via the cache.
516
+ -->
517
+ <queryResultWindowSize>20</queryResultWindowSize>
518
+
519
+ <!-- Maximum number of documents to cache for any entry in the
520
+ queryResultCache.
521
+ -->
522
+ <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
523
+
524
+ <!-- Query Related Event Listeners
525
+
526
+ Various IndexSearcher related events can trigger Listeners to
527
+ take actions.
528
+
529
+ newSearcher - fired whenever a new searcher is being prepared
530
+ and there is a current searcher handling requests (aka
531
+ registered). It can be used to prime certain caches to
532
+ prevent long request times for certain requests.
533
+
534
+ firstSearcher - fired whenever a new searcher is being
535
+ prepared but there is no current registered searcher to handle
536
+ requests or to gain autowarming data from.
537
+
538
+
539
+ -->
540
+ <!-- QuerySenderListener takes an array of NamedList and executes a
541
+ local query request for each NamedList in sequence.
542
+ -->
543
+ <listener event="newSearcher" class="solr.QuerySenderListener">
544
+ <arr name="queries">
545
+ <!--
546
+ <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
547
+ <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
548
+ -->
549
+ </arr>
550
+ </listener>
551
+ <listener event="firstSearcher" class="solr.QuerySenderListener">
552
+ <arr name="queries">
553
+ <lst>
554
+ <str name="q">static firstSearcher warming in solrconfig.xml</str>
555
+ </lst>
556
+ </arr>
557
+ </listener>
558
+
559
+ <!-- Use Cold Searcher
560
+
561
+ If a search request comes in and there is no current
562
+ registered searcher, then immediately register the still
563
+ warming searcher and use it. If "false" then all requests
564
+ will block until the first searcher is done warming.
565
+ -->
566
+ <useColdSearcher>false</useColdSearcher>
567
+
568
+ <!-- Max Warming Searchers
569
+
570
+ Maximum number of searchers that may be warming in the
571
+ background concurrently. An error is returned if this limit
572
+ is exceeded.
573
+
574
+ Recommend values of 1-2 for read-only slaves, higher for
575
+ masters w/o cache warming.
576
+ -->
577
+ <maxWarmingSearchers>2</maxWarmingSearchers>
578
+
579
+ </query>
580
+
581
+
582
+ <!-- Request Dispatcher
583
+
584
+ This section contains instructions for how the SolrDispatchFilter
585
+ should behave when processing requests for this SolrCore.
586
+
587
+ handleSelect affects the behavior of requests such as /select?qt=XXX
588
+
589
+ handleSelect="true" will cause the SolrDispatchFilter to process
590
+ the request and will result in consistent error handling and
591
+ formating for all types of requests.
592
+
593
+ handleSelect="false" will cause the SolrDispatchFilter to
594
+ ignore "/select" requests and fallback to using the legacy
595
+ SolrServlet and it's Solr 1.1 style error formatting
596
+ -->
597
+ <requestDispatcher handleSelect="true" >
598
+ <!-- Request Parsing
599
+
600
+ These settings indicate how Solr Requests may be parsed, and
601
+ what restrictions may be placed on the ContentStreams from
602
+ those requests
603
+
604
+ enableRemoteStreaming - enables use of the stream.file
605
+ and stream.url paramaters for specifying remote streams.
606
+
607
+ multipartUploadLimitInKB - specifies the max size of
608
+ Multipart File Uploads that Solr will alow in a Request.
609
+
610
+ *** WARNING ***
611
+ The settings below authorize Solr to fetch remote files, You
612
+ should make sure your system has some authentication before
613
+ using enableRemoteStreaming="true"
614
+
615
+ -->
616
+ <requestParsers enableRemoteStreaming="true"
617
+ multipartUploadLimitInKB="2048000" />
618
+
619
+ <!-- HTTP Caching
620
+
621
+ Set HTTP caching related parameters (for proxy caches and clients).
622
+
623
+ The options below instruct Solr not to output any HTTP Caching
624
+ related headers
625
+ -->
626
+ <httpCaching never304="true" />
627
+ <!-- If you include a <cacheControl> directive, it will be used to
628
+ generate a Cache-Control header (as well as an Expires header
629
+ if the value contains "max-age=")
630
+
631
+ By default, no Cache-Control header is generated.
632
+
633
+ You can use the <cacheControl> option even if you have set
634
+ never304="true"
635
+ -->
636
+ <!--
637
+ <httpCaching never304="true" >
638
+ <cacheControl>max-age=30, public</cacheControl>
639
+ </httpCaching>
640
+ -->
641
+ <!-- To enable Solr to responde with automaticly generated HTTP
642
+ Caching headers, and to response to Cache Validation requests
643
+ correctly, set the value of never304="false"
644
+
645
+ This will cause Solr to generate Last-Modified and ETag
646
+ headers based on the properties of the Index.
647
+
648
+ The following options can also be specified to affect the
649
+ values of these headers...
650
+
651
+ lastModFrom - the default value is "openTime" which means the
652
+ Last-Modified value (and validation against If-Modified-Since
653
+ requests) will all be relative to when the current Searcher
654
+ was opened. You can change it to lastModFrom="dirLastMod" if
655
+ you want the value to exactly corrispond to when the physical
656
+ index was last modified.
657
+
658
+ etagSeed="..." is an option you can change to force the ETag
659
+ header (and validation against If-None-Match requests) to be
660
+ differnet even if the index has not changed (ie: when making
661
+ significant changes to your config file)
662
+
663
+ (lastModifiedFrom and etagSeed are both ignored if you use
664
+ the never304="true" option)
665
+ -->
666
+ <!--
667
+ <httpCaching lastModifiedFrom="openTime"
668
+ etagSeed="Solr">
669
+ <cacheControl>max-age=30, public</cacheControl>
670
+ </httpCaching>
671
+ -->
672
+ </requestDispatcher>
673
+
674
+ <!-- Request Handlers
675
+
676
+ http://wiki.apache.org/solr/SolrRequestHandler
677
+
678
+ incoming queries will be dispatched to the correct handler
679
+ based on the path or the qt (query type) param.
680
+
681
+ Names starting with a '/' are accessed with the a path equal to
682
+ the registered name. Names without a leading '/' are accessed
683
+ with: http://host/app/[core/]select?qt=name
684
+
685
+ If a /select request is processed with out a qt param
686
+ specified, the requestHandler that declares default="true" will
687
+ be used.
688
+
689
+ If a Request Handler is declared with startup="lazy", then it will
690
+ not be initialized until the first request that uses it.
691
+
692
+ -->
693
+ <!-- SearchHandler
694
+
695
+ http://wiki.apache.org/solr/SearchHandler
696
+
697
+ For processing Search Queries, the primary Request Handler
698
+ provided with Solr is "SearchHandler" It delegates to a sequent
699
+ of SearchComponents (see below) and supports distributed
700
+ queries across multiple shards
701
+ -->
702
+ <requestHandler name="search" class="solr.SearchHandler" default="true">
703
+ <!-- default values for query parameters can be specified, these
704
+ will be overridden by parameters in the request
705
+ -->
706
+ <lst name="defaults">
707
+ <str name="echoParams">explicit</str>
708
+ <int name="rows">10</int>
709
+ </lst>
710
+ <!-- In addition to defaults, "appends" params can be specified
711
+ to identify values which should be appended to the list of
712
+ multi-val params from the query (or the existing "defaults").
713
+ -->
714
+ <!-- In this example, the param "fq=instock:true" would be appended to
715
+ any query time fq params the user may specify, as a mechanism for
716
+ partitioning the index, independent of any user selected filtering
717
+ that may also be desired (perhaps as a result of faceted searching).
718
+
719
+ NOTE: there is *absolutely* nothing a client can do to prevent these
720
+ "appends" values from being used, so don't use this mechanism
721
+ unless you are sure you always want it.
722
+ -->
723
+ <!--
724
+ <lst name="appends">
725
+ <str name="fq">inStock:true</str>
726
+ </lst>
727
+ -->
728
+ <!-- "invariants" are a way of letting the Solr maintainer lock down
729
+ the options available to Solr clients. Any params values
730
+ specified here are used regardless of what values may be specified
731
+ in either the query, the "defaults", or the "appends" params.
732
+
733
+ In this example, the facet.field and facet.query params would
734
+ be fixed, limiting the facets clients can use. Faceting is
735
+ not turned on by default - but if the client does specify
736
+ facet=true in the request, these are the only facets they
737
+ will be able to see counts for; regardless of what other
738
+ facet.field or facet.query params they may specify.
739
+
740
+ NOTE: there is *absolutely* nothing a client can do to prevent these
741
+ "invariants" values from being used, so don't use this mechanism
742
+ unless you are sure you always want it.
743
+ -->
744
+ <!--
745
+ <lst name="invariants">
746
+ <str name="facet.field">cat</str>
747
+ <str name="facet.field">manu_exact</str>
748
+ <str name="facet.query">price:[* TO 500]</str>
749
+ <str name="facet.query">price:[500 TO *]</str>
750
+ </lst>
751
+ -->
752
+ <!-- If the default list of SearchComponents is not desired, that
753
+ list can either be overridden completely, or components can be
754
+ prepended or appended to the default list. (see below)
755
+ -->
756
+ <!--
757
+ <arr name="components">
758
+ <str>nameOfCustomComponent1</str>
759
+ <str>nameOfCustomComponent2</str>
760
+ </arr>
761
+ -->
762
+ </requestHandler>
763
+
764
+ <!-- A Robust Example
765
+
766
+ This example SearchHandler declaration shows off usage of the
767
+ SearchHandler with many defaults declared
768
+
769
+ Note that multiple instances of hte same Request Handler
770
+ (SearchHandler) can be registered multiple times with different
771
+ names (and different init parameters)
772
+ -->
773
+ <requestHandler name="/browse" class="solr.SearchHandler">
774
+ <lst name="defaults">
775
+ <str name="echoParams">explicit</str>
776
+
777
+ <!-- VelocityResponseWriter settings -->
778
+ <str name="wt">velocity</str>
779
+
780
+ <str name="v.template">browse</str>
781
+ <str name="v.layout">layout</str>
782
+ <str name="title">Solritas</str>
783
+
784
+ <str name="defType">edismax</str>
785
+ <str name="q.alt">*:*</str>
786
+ <str name="rows">10</str>
787
+ <str name="fl">*,score</str>
788
+ <str name="mlt.qf">
789
+ text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
790
+ </str>
791
+ <str name="mlt.fl">text,features,name,sku,id,manu,cat</str>
792
+ <int name="mlt.count">3</int>
793
+
794
+ <str name="qf">
795
+ text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
796
+ </str>
797
+
798
+ <str name="facet">on</str>
799
+ <str name="facet.field">cat</str>
800
+ <str name="facet.field">manu_exact</str>
801
+ <str name="facet.query">ipod</str>
802
+ <str name="facet.query">GB</str>
803
+ <str name="facet.mincount">1</str>
804
+ <str name="facet.pivot">cat,inStock</str>
805
+ <str name="facet.range">price</str>
806
+ <int name="f.price.facet.range.start">0</int>
807
+ <int name="f.price.facet.range.end">600</int>
808
+ <int name="f.price.facet.range.gap">50</int>
809
+ <str name="f.price.facet.range.other">after</str>
810
+ <str name="facet.range">manufacturedate_dt</str>
811
+ <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
812
+ <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
813
+ <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
814
+ <str name="f.manufacturedate_dt.facet.range.other">before</str>
815
+ <str name="f.manufacturedate_dt.facet.range.other">after</str>
816
+
817
+
818
+ <!-- Highlighting defaults -->
819
+ <str name="hl">on</str>
820
+ <str name="hl.fl">text features name</str>
821
+ <str name="f.name.hl.fragsize">0</str>
822
+ <str name="f.name.hl.alternateField">name</str>
823
+ </lst>
824
+ <arr name="last-components">
825
+ <str>spellcheck</str>
826
+ </arr>
827
+ <!--
828
+ <str name="url-scheme">httpx</str>
829
+ -->
830
+ </requestHandler>
831
+
832
+ <!-- XML Update Request Handler.
833
+
834
+ http://wiki.apache.org/solr/UpdateXmlMessages
835
+
836
+ The canonical Request Handler for Modifying the Index through
837
+ commands specified using XML.
838
+
839
+ Note: Since solr1.1 requestHandlers requires a valid content
840
+ type header if posted in the body. For example, curl now
841
+ requires: -H 'Content-type:text/xml; charset=utf-8'
842
+ -->
843
+ <requestHandler name="/update"
844
+ class="solr.XmlUpdateRequestHandler">
845
+ <!-- See below for information on defining
846
+ updateRequestProcessorChains that can be used by name
847
+ on each Update Request
848
+ -->
849
+ <!--
850
+ <lst name="defaults">
851
+ <str name="update.processor">dedupe</str>
852
+ </lst>
853
+ -->
854
+ </requestHandler>
855
+ <!-- Binary Update Request Handler
856
+ http://wiki.apache.org/solr/javabin
857
+ -->
858
+ <requestHandler name="/update/javabin"
859
+ class="solr.BinaryUpdateRequestHandler" />
860
+
861
+ <!-- CSV Update Request Handler
862
+ http://wiki.apache.org/solr/UpdateCSV
863
+ -->
864
+ <requestHandler name="/update/csv"
865
+ class="solr.CSVRequestHandler"
866
+ startup="lazy" />
867
+
868
+ <!-- JSON Update Request Handler
869
+ http://wiki.apache.org/solr/UpdateJSON
870
+ -->
871
+ <requestHandler name="/update/json"
872
+ class="solr.JsonUpdateRequestHandler"
873
+ startup="lazy" />
874
+
875
+ <!-- Solr Cell Update Request Handler
876
+
877
+ http://wiki.apache.org/solr/ExtractingRequestHandler
878
+
879
+ -->
880
+ <requestHandler name="/update/extract"
881
+ startup="lazy"
882
+ class="solr.extraction.ExtractingRequestHandler" >
883
+ <lst name="defaults">
884
+ <!-- All the main content goes into "text"... if you need to return
885
+ the extracted text or do highlighting, use a stored field. -->
886
+ <str name="fmap.content">text</str>
887
+ <str name="lowernames">true</str>
888
+ <str name="uprefix">ignored_</str>
889
+
890
+ <!-- capture link hrefs but ignore div attributes -->
891
+ <str name="captureAttr">true</str>
892
+ <str name="fmap.a">links</str>
893
+ <str name="fmap.div">ignored_</str>
894
+ </lst>
895
+ </requestHandler>
896
+
897
+ <!-- Field Analysis Request Handler
898
+
899
+ RequestHandler that provides much the same functionality as
900
+ analysis.jsp. Provides the ability to specify multiple field
901
+ types and field names in the same request and outputs
902
+ index-time and query-time analysis for each of them.
903
+
904
+ Request parameters are:
905
+ analysis.fieldname - field name whose analyzers are to be used
906
+
907
+ analysis.fieldtype - field type whose analyzers are to be used
908
+ analysis.fieldvalue - text for index-time analysis
909
+ q (or analysis.q) - text for query time analysis
910
+ analysis.showmatch (true|false) - When set to true and when
911
+ query analysis is performed, the produced tokens of the
912
+ field value analysis will be marked as "matched" for every
913
+ token that is produces by the query analysis
914
+ -->
915
+ <requestHandler name="/analysis/field"
916
+ startup="lazy"
917
+ class="solr.FieldAnalysisRequestHandler" />
918
+
919
+
920
+ <!-- Document Analysis Handler
921
+
922
+ http://wiki.apache.org/solr/AnalysisRequestHandler
923
+
924
+ An analysis handler that provides a breakdown of the analysis
925
+ process of provided docuemnts. This handler expects a (single)
926
+ content stream with the following format:
927
+
928
+ <docs>
929
+ <doc>
930
+ <field name="id">1</field>
931
+ <field name="name">The Name</field>
932
+ <field name="text">The Text Value</field>
933
+ </doc>
934
+ <doc>...</doc>
935
+ <doc>...</doc>
936
+ ...
937
+ </docs>
938
+
939
+ Note: Each document must contain a field which serves as the
940
+ unique key. This key is used in the returned response to assoicate
941
+ ananalysis breakdown to the analyzed document.
942
+
943
+ Like the FieldAnalysisRequestHandler, this handler also supports
944
+ query analysis by sending either an "analysis.query" or "q"
945
+ request paraemter that holds the query text to be analyized. It
946
+ also supports the "analysis.showmatch" parameter which when set to
947
+ true, all field tokens that match the query tokens will be marked
948
+ as a "match".
949
+ -->
950
+ <requestHandler name="/analysis/document"
951
+ class="solr.DocumentAnalysisRequestHandler"
952
+ startup="lazy" />
953
+
954
+ <!-- Admin Handlers
955
+
956
+ Admin Handlers - This will register all the standard admin
957
+ RequestHandlers.
958
+ -->
959
+ <requestHandler name="/admin/"
960
+ class="solr.admin.AdminHandlers" />
961
+ <!-- This single handler is equivilent to the following... -->
962
+ <!--
963
+ <requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
964
+ <requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
965
+ <requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
966
+ <requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
967
+ <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
968
+ <requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
969
+ -->
970
+ <!-- If you wish to hide files under ${solr.home}/conf, explicitly
971
+ register the ShowFileRequestHandler using:
972
+ -->
973
+ <!--
974
+ <requestHandler name="/admin/file"
975
+ class="solr.admin.ShowFileRequestHandler" >
976
+ <lst name="invariants">
977
+ <str name="hidden">synonyms.txt</str>
978
+ <str name="hidden">anotherfile.txt</str>
979
+ </lst>
980
+ </requestHandler>
981
+ -->
982
+
983
+ <!-- ping/healthcheck -->
984
+ <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
985
+ <lst name="defaults">
986
+ <str name="qt">search</str>
987
+ <str name="q">solrpingquery</str>
988
+ <str name="echoParams">all</str>
989
+ </lst>
990
+ </requestHandler>
991
+
992
+ <!-- Echo the request contents back to the client -->
993
+ <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
994
+ <lst name="defaults">
995
+ <str name="echoParams">explicit</str>
996
+ <str name="echoHandler">true</str>
997
+ </lst>
998
+ </requestHandler>
999
+
1000
+ <!-- Solr Replication
1001
+
1002
+ The SolrReplicationHandler supports replicating indexes from a
1003
+ "master" used for indexing and "salves" used for queries.
1004
+
1005
+ http://wiki.apache.org/solr/SolrReplication
1006
+
1007
+ In the example below, remove the <lst name="master"> section if
1008
+ this is just a slave and remove the <lst name="slave"> section
1009
+ if this is just a master.
1010
+ -->
1011
+ <!--
1012
+ <requestHandler name="/replication" class="solr.ReplicationHandler" >
1013
+ <lst name="master">
1014
+ <str name="replicateAfter">commit</str>
1015
+ <str name="replicateAfter">startup</str>
1016
+ <str name="confFiles">schema.xml,stopwords.txt</str>
1017
+ </lst>
1018
+ <lst name="slave">
1019
+ <str name="masterUrl">http://localhost:8983/solr/replication</str>
1020
+ <str name="pollInterval">00:00:60</str>
1021
+ </lst>
1022
+ </requestHandler>
1023
+ -->
1024
+
1025
+ <!-- Search Components
1026
+
1027
+ Search components are registered to SolrCore and used by
1028
+ instances of SearchHandler (which can access them by name)
1029
+
1030
+ By default, the following components are avaliable:
1031
+
1032
+ <searchComponent name="query" class="solr.QueryComponent" />
1033
+ <searchComponent name="facet" class="solr.FacetComponent" />
1034
+ <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
1035
+ <searchComponent name="highlight" class="solr.HighlightComponent" />
1036
+ <searchComponent name="stats" class="solr.StatsComponent" />
1037
+ <searchComponent name="debug" class="solr.DebugComponent" />
1038
+
1039
+ Default configuration in a requestHandler would look like:
1040
+
1041
+ <arr name="components">
1042
+ <str>query</str>
1043
+ <str>facet</str>
1044
+ <str>mlt</str>
1045
+ <str>highlight</str>
1046
+ <str>stats</str>
1047
+ <str>debug</str>
1048
+ </arr>
1049
+
1050
+ If you register a searchComponent to one of the standard names,
1051
+ that will be used instead of the default.
1052
+
1053
+ To insert components before or after the 'standard' components, use:
1054
+
1055
+ <arr name="first-components">
1056
+ <str>myFirstComponentName</str>
1057
+ </arr>
1058
+
1059
+ <arr name="last-components">
1060
+ <str>myLastComponentName</str>
1061
+ </arr>
1062
+
1063
+ NOTE: The component registered with the name "debug" will
1064
+ always be executed after the "last-components"
1065
+
1066
+ -->
1067
+
1068
+ <!-- Spell Check
1069
+
1070
+ The spell check component can return a list of alternative spelling
1071
+ suggestions.
1072
+
1073
+ http://wiki.apache.org/solr/SpellCheckComponent
1074
+ -->
1075
+ <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
1076
+
1077
+ <str name="queryAnalyzerFieldType">textSpell</str>
1078
+
1079
+ <!-- Multiple "Spell Checkers" can be declared and used by this
1080
+ component
1081
+ -->
1082
+
1083
+ <!-- a spellchecker built from a field of hte main index, and
1084
+ written to disk
1085
+ -->
1086
+ <lst name="spellchecker">
1087
+ <str name="name">default</str>
1088
+ <str name="field">name</str>
1089
+ <str name="spellcheckIndexDir">spellchecker</str>
1090
+ </lst>
1091
+
1092
+ <!-- a spellchecker that uses a different distance measure -->
1093
+ <!--
1094
+ <lst name="spellchecker">
1095
+ <str name="name">jarowinkler</str>
1096
+ <str name="field">spell</str>
1097
+ <str name="distanceMeasure">
1098
+ org.apache.lucene.search.spell.JaroWinklerDistance
1099
+ </str>
1100
+ <str name="spellcheckIndexDir">spellcheckerJaro</str>
1101
+ </lst>
1102
+ -->
1103
+
1104
+ <!-- a spellchecker that use an alternate comparator
1105
+
1106
+ comparatorClass be one of:
1107
+ 1. score (default)
1108
+ 2. freq (Frequency first, then score)
1109
+ 3. A fully qualified class name
1110
+ -->
1111
+ <!--
1112
+ <lst name="spellchecker">
1113
+ <str name="name">freq</str>
1114
+ <str name="field">lowerfilt</str>
1115
+ <str name="spellcheckIndexDir">spellcheckerFreq</str>
1116
+ <str name="comparatorClass">freq</str>
1117
+ <str name="buildOnCommit">true</str>
1118
+ -->
1119
+
1120
+ <!-- A spellchecker that reads the list of words from a file -->
1121
+ <!--
1122
+ <lst name="spellchecker">
1123
+ <str name="classname">solr.FileBasedSpellChecker</str>
1124
+ <str name="name">file</str>
1125
+ <str name="sourceLocation">spellings.txt</str>
1126
+ <str name="characterEncoding">UTF-8</str>
1127
+ <str name="spellcheckIndexDir">spellcheckerFile</str>
1128
+ </lst>
1129
+ -->
1130
+ </searchComponent>
1131
+
1132
+ <!-- A request handler for demonstrating the spellcheck component.
1133
+
1134
+ NOTE: This is purely as an example. The whole purpose of the
1135
+ SpellCheckComponent is to hook it into the request handler that
1136
+ handles your normal user queries so that a separate request is
1137
+ not needed to get suggestions.
1138
+
1139
+ IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
1140
+ NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
1141
+
1142
+ See http://wiki.apache.org/solr/SpellCheckComponent for details
1143
+ on the request parameters.
1144
+ -->
1145
+ <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
1146
+ <lst name="defaults">
1147
+ <str name="spellcheck.onlyMorePopular">false</str>
1148
+ <str name="spellcheck.extendedResults">false</str>
1149
+ <str name="spellcheck.count">1</str>
1150
+ </lst>
1151
+ <arr name="last-components">
1152
+ <str>spellcheck</str>
1153
+ </arr>
1154
+ </requestHandler>
1155
+
1156
+ <!-- Term Vector Component
1157
+
1158
+ http://wiki.apache.org/solr/TermVectorComponent
1159
+ -->
1160
+ <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
1161
+
1162
+ <!-- A request handler for demonstrating the term vector component
1163
+
1164
+ This is purely as an example.
1165
+
1166
+ In reality you will likely want to add the component to your
1167
+ already specified request handlers.
1168
+ -->
1169
+ <requestHandler name="tvrh" class="solr.SearchHandler" startup="lazy">
1170
+ <lst name="defaults">
1171
+ <bool name="tv">true</bool>
1172
+ </lst>
1173
+ <arr name="last-components">
1174
+ <str>tvComponent</str>
1175
+ </arr>
1176
+ </requestHandler>
1177
+
1178
+ <!-- Clustering Component
1179
+
1180
+ http://wiki.apache.org/solr/ClusteringComponent
1181
+
1182
+ This relies on third party jars which are notincluded in the
1183
+ release. To use this component (and the "/clustering" handler)
1184
+ Those jars will need to be downloaded, and you'll need to set
1185
+ the solr.cluster.enabled system property when running solr...
1186
+
1187
+ java -Dsolr.clustering.enabled=true -jar start.jar
1188
+ -->
1189
+ <searchComponent name="clustering"
1190
+ enable="${solr.clustering.enabled:false}"
1191
+ class="solr.clustering.ClusteringComponent" >
1192
+ <!-- Declare an engine -->
1193
+ <lst name="engine">
1194
+ <!-- The name, only one can be named "default" -->
1195
+ <str name="name">default</str>
1196
+ <!-- Class name of Carrot2 clustering algorithm.
1197
+
1198
+ Currently available algorithms are:
1199
+
1200
+ * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
1201
+ * org.carrot2.clustering.stc.STCClusteringAlgorithm
1202
+
1203
+ See http://project.carrot2.org/algorithms.html for the
1204
+ algorithm's characteristics.
1205
+ -->
1206
+ <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
1207
+ <!-- Overriding values for Carrot2 default algorithm attributes.
1208
+
1209
+ For a description of all available attributes, see:
1210
+ http://download.carrot2.org/stable/manual/#chapter.components.
1211
+ Use attribute key as name attribute of str elements
1212
+ below. These can be further overridden for individual
1213
+ requests by specifying attribute key as request parameter
1214
+ name and attribute value as parameter value.
1215
+ -->
1216
+ <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
1217
+
1218
+ <!-- The language to assume for the documents.
1219
+
1220
+ For a list of allowed values, see:
1221
+ http://download.carrot2.org/stable/manual/#section.attribute.lingo.MultilingualClustering.defaultLanguage
1222
+ -->
1223
+ <str name="MultilingualClustering.defaultLanguage">ENGLISH</str>
1224
+ </lst>
1225
+ <lst name="engine">
1226
+ <str name="name">stc</str>
1227
+ <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
1228
+ </lst>
1229
+ </searchComponent>
1230
+
1231
+ <!-- A request handler for demonstrating the clustering component
1232
+
1233
+ This is purely as an example.
1234
+
1235
+ In reality you will likely want to add the component to your
1236
+ already specified request handlers.
1237
+ -->
1238
+ <requestHandler name="/clustering"
1239
+ startup="lazy"
1240
+ enable="${solr.clustering.enabled:false}"
1241
+ class="solr.SearchHandler">
1242
+ <lst name="defaults">
1243
+ <bool name="clustering">true</bool>
1244
+ <str name="clustering.engine">default</str>
1245
+ <bool name="clustering.results">true</bool>
1246
+ <!-- The title field -->
1247
+ <str name="carrot.title">name</str>
1248
+ <str name="carrot.url">id</str>
1249
+ <!-- The field to cluster on -->
1250
+ <str name="carrot.snippet">features</str>
1251
+ <!-- produce summaries -->
1252
+ <bool name="carrot.produceSummary">true</bool>
1253
+ <!-- the maximum number of labels per cluster -->
1254
+ <!--<int name="carrot.numDescriptions">5</int>-->
1255
+ <!-- produce sub clusters -->
1256
+ <bool name="carrot.outputSubClusters">false</bool>
1257
+
1258
+ <str name="defType">edismax</str>
1259
+ <str name="qf">
1260
+ text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
1261
+ </str>
1262
+ <str name="q.alt">*:*</str>
1263
+ <str name="rows">10</str>
1264
+ <str name="fl">*,score</str>
1265
+ </lst>
1266
+ <arr name="last-components">
1267
+ <str>clustering</str>
1268
+ </arr>
1269
+ </requestHandler>
1270
+
1271
+ <!-- Terms Component
1272
+
1273
+ http://wiki.apache.org/solr/TermsComponent
1274
+
1275
+ A component to return terms and document frequency of those
1276
+ terms
1277
+ -->
1278
+ <searchComponent name="terms" class="solr.TermsComponent"/>
1279
+
1280
+ <!-- A request handler for demonstrating the terms component -->
1281
+ <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
1282
+ <lst name="defaults">
1283
+ <bool name="terms">true</bool>
1284
+ </lst>
1285
+ <arr name="components">
1286
+ <str>terms</str>
1287
+ </arr>
1288
+ </requestHandler>
1289
+
1290
+
1291
+ <!-- Query Elevation Component
1292
+
1293
+ http://wiki.apache.org/solr/QueryElevationComponent
1294
+
1295
+ a search component that enables you to configure the top
1296
+ results for a given query regardless of the normal lucene
1297
+ scoring.
1298
+ -->
1299
+ <searchComponent name="elevator" class="solr.QueryElevationComponent" >
1300
+ <!-- pick a fieldType to analyze queries -->
1301
+ <str name="queryFieldType">string</str>
1302
+ <str name="config-file">elevate.xml</str>
1303
+ </searchComponent>
1304
+
1305
+ <!-- A request handler for demonstrating the elevator component -->
1306
+ <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
1307
+ <lst name="defaults">
1308
+ <str name="echoParams">explicit</str>
1309
+ </lst>
1310
+ <arr name="last-components">
1311
+ <str>elevator</str>
1312
+ </arr>
1313
+ </requestHandler>
1314
+
1315
+ <!-- Highlighting Component
1316
+
1317
+ http://wiki.apache.org/solr/HighlightingParameters
1318
+ -->
1319
+ <searchComponent class="solr.HighlightComponent" name="highlight">
1320
+ <highlighting>
1321
+ <!-- Configure the standard fragmenter -->
1322
+ <!-- This could most likely be commented out in the "default" case -->
1323
+ <fragmenter name="gap"
1324
+ default="true"
1325
+ class="solr.highlight.GapFragmenter">
1326
+ <lst name="defaults">
1327
+ <int name="hl.fragsize">100</int>
1328
+ </lst>
1329
+ </fragmenter>
1330
+
1331
+ <!-- A regular-expression-based fragmenter
1332
+ (for sentence extraction)
1333
+ -->
1334
+ <fragmenter name="regex"
1335
+ class="solr.highlight.RegexFragmenter">
1336
+ <lst name="defaults">
1337
+ <!-- slightly smaller fragsizes work better because of slop -->
1338
+ <int name="hl.fragsize">70</int>
1339
+ <!-- allow 50% slop on fragment sizes -->
1340
+ <float name="hl.regex.slop">0.5</float>
1341
+ <!-- a basic sentence pattern -->
1342
+ <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
1343
+ </lst>
1344
+ </fragmenter>
1345
+
1346
+ <!-- Configure the standard formatter -->
1347
+ <formatter name="html"
1348
+ default="true"
1349
+ class="solr.highlight.HtmlFormatter">
1350
+ <lst name="defaults">
1351
+ <str name="hl.simple.pre"><![CDATA[<em>]]></str>
1352
+ <str name="hl.simple.post"><![CDATA[</em>]]></str>
1353
+ </lst>
1354
+ </formatter>
1355
+
1356
+ <!-- Configure the standard encoder -->
1357
+ <encoder name="html"
1358
+ default="true"
1359
+ class="solr.highlight.HtmlEncoder" />
1360
+
1361
+ <!-- Configure the standard fragListBuilder -->
1362
+ <fragListBuilder name="simple"
1363
+ default="true"
1364
+ class="solr.highlight.SimpleFragListBuilder"/>
1365
+
1366
+ <!-- Configure the single fragListBuilder -->
1367
+ <fragListBuilder name="single"
1368
+ class="solr.highlight.SingleFragListBuilder"/>
1369
+
1370
+ <!-- default tag FragmentsBuilder -->
1371
+ <fragmentsBuilder name="default"
1372
+ default="true"
1373
+ class="solr.highlight.ScoreOrderFragmentsBuilder">
1374
+ <!--
1375
+ <lst name="defaults">
1376
+ <str name="hl.multiValuedSeparatorChar">/</str>
1377
+ </lst>
1378
+ -->
1379
+ </fragmentsBuilder>
1380
+
1381
+ <!-- multi-colored tag FragmentsBuilder -->
1382
+ <fragmentsBuilder name="colored"
1383
+ class="solr.highlight.ScoreOrderFragmentsBuilder">
1384
+ <lst name="defaults">
1385
+ <str name="hl.tag.pre"><![CDATA[
1386
+ <b style="background:yellow">,<b style="background:lawgreen">,
1387
+ <b style="background:aquamarine">,<b style="background:magenta">,
1388
+ <b style="background:palegreen">,<b style="background:coral">,
1389
+ <b style="background:wheat">,<b style="background:khaki">,
1390
+ <b style="background:lime">,<b style="background:deepskyblue">]]></str>
1391
+ <str name="hl.tag.post"><![CDATA[</b>]]></str>
1392
+ </lst>
1393
+ </fragmentsBuilder>
1394
+ </highlighting>
1395
+ </searchComponent>
1396
+
1397
+ <!-- Update Processors
1398
+
1399
+ Chains of Update Processor Factories for dealing with Update
1400
+ Requests can be declared, and then used by name in Update
1401
+ Request Processors
1402
+
1403
+ http://wiki.apache.org/solr/UpdateRequestProcessor
1404
+
1405
+ -->
1406
+ <!-- Deduplication
1407
+
1408
+ An example dedup update processor that creates the "id" field
1409
+ on the fly based on the hash code of some other fields. This
1410
+ example has overwriteDupes set to false since we are using the
1411
+ id field as the signatureField and Solr will maintain
1412
+ uniqueness based on that anyway.
1413
+
1414
+ -->
1415
+ <!--
1416
+ <updateRequestProcessorChain name="dedupe">
1417
+ <processor class="solr.processor.SignatureUpdateProcessorFactory">
1418
+ <bool name="enabled">true</bool>
1419
+ <str name="signatureField">id</str>
1420
+ <bool name="overwriteDupes">false</bool>
1421
+ <str name="fields">name,features,cat</str>
1422
+ <str name="signatureClass">solr.processor.Lookup3Signature</str>
1423
+ </processor>
1424
+ <processor class="solr.LogUpdateProcessorFactory" />
1425
+ <processor class="solr.RunUpdateProcessorFactory" />
1426
+ </updateRequestProcessorChain>
1427
+ -->
1428
+
1429
+ <!-- Response Writers
1430
+
1431
+ http://wiki.apache.org/solr/QueryResponseWriter
1432
+
1433
+ Request responses will be written using the writer specified by
1434
+ the 'wt' request parameter matching the name of a registered
1435
+ writer.
1436
+
1437
+ The "default" writer is the default and will be used if 'wt' is
1438
+ not specified in the request.
1439
+ -->
1440
+ <!-- The following response writers are implicitly configured unless
1441
+ overridden...
1442
+ -->
1443
+ <!--
1444
+ <queryResponseWriter name="xml"
1445
+ default="true"
1446
+ class="solr.XMLResponseWriter" />
1447
+ <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
1448
+ <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
1449
+ <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
1450
+ <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
1451
+ <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
1452
+ <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter"/>
1453
+ <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
1454
+ -->
1455
+ <!--
1456
+ Custom response writers can be declared as needed...
1457
+ -->
1458
+ <!--
1459
+ <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
1460
+ -->
1461
+
1462
+ <!-- XSLT response writer transforms the XML output by any xslt file found
1463
+ in Solr's conf/xslt directory. Changes to xslt files are checked for
1464
+ every xsltCacheLifetimeSeconds.
1465
+ -->
1466
+ <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
1467
+ <int name="xsltCacheLifetimeSeconds">5</int>
1468
+ </queryResponseWriter>
1469
+
1470
+ <!-- Query Parsers
1471
+
1472
+ http://wiki.apache.org/solr/SolrQuerySyntax
1473
+
1474
+ Multiple QParserPlugins can be registered by name, and then
1475
+ used in either the "defType" param for the QueryComponent (used
1476
+ by SearchHandler) or in LocalParams
1477
+ -->
1478
+ <!-- example of registering a query parser -->
1479
+ <!--
1480
+ <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
1481
+ -->
1482
+
1483
+ <!-- Function Parsers
1484
+
1485
+ http://wiki.apache.org/solr/FunctionQuery
1486
+
1487
+ Multiple ValueSourceParsers can be registered by name, and then
1488
+ used as function names when using the "func" QParser.
1489
+ -->
1490
+ <!-- example of registering a custom function parser -->
1491
+ <!--
1492
+ <valueSourceParser name="myfunc"
1493
+ class="com.mycompany.MyValueSourceParser" />
1494
+ -->
1495
+
1496
+ <!-- Legacy config for the admin interface -->
1497
+ <admin>
1498
+ <defaultQuery>*:*</defaultQuery>
1499
+
1500
+ <!-- configure a healthcheck file for servers behind a
1501
+ loadbalancer
1502
+ -->
1503
+ <!--
1504
+ <healthcheck type="file">server-enabled</healthcheck>
1505
+ -->
1506
+ </admin>
1507
+
1508
+ </config>