source: gs3-extensions/solr/trunk/src/conf/solrconfig.xml.in@ 29135

Last change on this file since 29135 was 29135, checked in by ak19, 10 years ago

Part of port from lucene3.3.0 to lucene4.7.2. Solr related. conf and lib folders for solr4.7.2.

File size: 72.0 KB
Line 
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>4.7</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
61 <!-- A 'dir' option by itself adds any files found in the directory
62 to the classpath, this is useful for including all jars in a
63 directory.
64
65 When a 'regex' is specified in addition to a 'dir', only the
66 files in that directory which completely match the regex
67 (anchored on both ends) will be included.
68
69 If a 'dir' option (with or without a regex) is used and nothing
70 is found that matches, a warning will be logged.
71
72 The examples below can be used to load some solr-contribs along
73 with their external dependencies.
74 -->
75 <lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />
76 <lib dir="../../../dist/" regex="solr-cell-\d.*\.jar" />
77
78 <lib dir="../../../contrib/clustering/lib/" regex=".*\.jar" />
79 <lib dir="../../../dist/" regex="solr-clustering-\d.*\.jar" />
80
81 <lib dir="../../../contrib/langid/lib/" regex=".*\.jar" />
82 <lib dir="../../../dist/" regex="solr-langid-\d.*\.jar" />
83
84 <lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
85 <lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" />
86
87 <!-- an exact 'path' can be used instead of a 'dir' to specify a
88 specific jar file. This will cause a serious error to be logged
89 if it can't be loaded.
90 -->
91 <!--
92 <lib path="../a-jar-that-does-not-exist.jar" />
93 -->
94
95 <!-- Data Directory
96
97 Used to specify an alternate directory to hold all index data
98 other than the default ./data under the Solr home. If
99 replication is in use, this should match the replication
100 configuration.
101 -->
102 <dataDir>${solr.data.dir:}</dataDir>
103
104
105 <!-- The DirectoryFactory to use for indexes.
106
107 solr.StandardDirectoryFactory is filesystem
108 based and tries to pick the best implementation for the current
109 JVM and platform. solr.NRTCachingDirectoryFactory, the default,
110 wraps solr.StandardDirectoryFactory and caches small files in memory
111 for better NRT performance.
112
113 One can force a particular implementation via solr.MMapDirectoryFactory,
114 solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
115
116 solr.RAMDirectoryFactory is memory based, not
117 persistent, and doesn't work with replication.
118 -->
119 <directoryFactory name="DirectoryFactory"
120 class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}">
121
122
123 <!-- These will be used if you are using the solr.HdfsDirectoryFactory,
124 otherwise they will be ignored. If you don't plan on using hdfs,
125 you can safely remove this section. -->
126 <!-- The root directory that collection data should be written to. -->
127 <str name="solr.hdfs.home">${solr.hdfs.home:}</str>
128 <!-- The hadoop configuration files to use for the hdfs client. -->
129 <str name="solr.hdfs.confdir">${solr.hdfs.confdir:}</str>
130 <!-- Enable/Disable the hdfs cache. -->
131 <str name="solr.hdfs.blockcache.enabled">${solr.hdfs.blockcache.enabled:true}</str>
132
133 </directoryFactory>
134
135 <!-- The CodecFactory for defining the format of the inverted index.
136 The default implementation is SchemaCodecFactory, which is the official Lucene
137 index format, but hooks into the schema to provide per-field customization of
138 the postings lists and per-document values in the fieldType element
139 (postingsFormat/docValuesFormat). Note that most of the alternative implementations
140 are experimental, so if you choose to customize the index format, its a good
141 idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
142 before upgrading to a newer version to avoid unnecessary reindexing.
143 -->
144 <codecFactory class="solr.SchemaCodecFactory"/>
145
146 <!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>:
147
148 <schemaFactory class="ManagedIndexSchemaFactory">
149 <bool name="mutable">true</bool>
150 <str name="managedSchemaResourceName">managed-schema</str>
151 </schemaFactory>
152
153 When ManagedIndexSchemaFactory is specified, Solr will load the schema from
154 he resource named in 'managedSchemaResourceName', rather than from schema.xml.
155 Note that the managed schema resource CANNOT be named schema.xml. If the managed
156 schema does not exist, Solr will create it after reading schema.xml, then rename
157 'schema.xml' to 'schema.xml.bak'.
158
159 Do NOT hand edit the managed schema - external modifications will be ignored and
160 overwritten as a result of schema modification REST API calls.
161
162 When ManagedIndexSchemaFactory is specified with mutable = true, schema
163 modification REST API calls will be allowed; otherwise, error responses will be
164 sent back for these requests.
165 -->
166 <schemaFactory class="ClassicIndexSchemaFactory"/>
167
168 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169 Index Config - These settings control low-level behavior of indexing
170 Most example settings here show the default value, but are commented
171 out, to more easily see where customizations have been made.
172
173 Note: This replaces <indexDefaults> and <mainIndex> from older versions
174 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
175 <indexConfig>
176 <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
177 LimitTokenCountFilterFactory in your fieldType definition. E.g.
178 <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
179 -->
180 <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
181 <!-- <writeLockTimeout>1000</writeLockTimeout> -->
182
183 <!-- The maximum number of simultaneous threads that may be
184 indexing documents at once in IndexWriter; if more than this
185 many threads arrive they will wait for others to finish.
186 Default in Solr/Lucene is 8. -->
187 <!-- <maxIndexingThreads>8</maxIndexingThreads> -->
188
189 <!-- Expert: Enabling compound file will use less files for the index,
190 using fewer file descriptors on the expense of performance decrease.
191 Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
192 <!-- <useCompoundFile>false</useCompoundFile> -->
193
194 <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
195 indexing for buffering added documents and deletions before they are
196 flushed to the Directory.
197 maxBufferedDocs sets a limit on the number of documents buffered
198 before flushing.
199 If both ramBufferSizeMB and maxBufferedDocs is set, then
200 Lucene will flush based on whichever limit is hit first.
201 The default is 100 MB. -->
202 <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
203 <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
204
205 <!-- Expert: Merge Policy
206 The Merge Policy in Lucene controls how merging of segments is done.
207 The default since Solr/Lucene 3.3 is TieredMergePolicy.
208 The default since Lucene 2.3 was the LogByteSizeMergePolicy,
209 Even older versions of Lucene used LogDocMergePolicy.
210 -->
211 <!--
212 <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
213 <int name="maxMergeAtOnce">10</int>
214 <int name="segmentsPerTier">10</int>
215 </mergePolicy>
216 -->
217
218 <!-- Merge Factor
219 The merge factor controls how many segments will get merged at a time.
220 For TieredMergePolicy, mergeFactor is a convenience parameter which
221 will set both MaxMergeAtOnce and SegmentsPerTier at once.
222 For LogByteSizeMergePolicy, mergeFactor decides how many new segments
223 will be allowed before they are merged into one.
224 Default is 10 for both merge policies.
225 -->
226 <!--
227 <mergeFactor>10</mergeFactor>
228 -->
229
230 <!-- Expert: Merge Scheduler
231 The Merge Scheduler in Lucene controls how merges are
232 performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
233 can perform merges in the background using separate threads.
234 The SerialMergeScheduler (Lucene 2.2 default) does not.
235 -->
236 <!--
237 <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
238 -->
239
240 <!-- LockFactory
241
242 This option specifies which Lucene LockFactory implementation
243 to use.
244
245 single = SingleInstanceLockFactory - suggested for a
246 read-only index or when there is no possibility of
247 another process trying to modify the index.
248 native = NativeFSLockFactory - uses OS native file locking.
249 Do not use when multiple solr webapps in the same
250 JVM are attempting to share a single index.
251 simple = SimpleFSLockFactory - uses a plain file for locking
252
253 Defaults: 'native' is default for Solr3.6 and later, otherwise
254 'simple' is the default
255
256 More details on the nuances of each LockFactory...
257 http://wiki.apache.org/lucene-java/AvailableLockFactories
258 -->
259 <lockType>${solr.lock.type:native}</lockType>
260
261 <!-- Unlock On Startup
262
263 If true, unlock any held write or commit locks on startup.
264 This defeats the locking mechanism that allows multiple
265 processes to safely access a lucene index, and should be used
266 with care. Default is "false".
267
268 This is not needed if lock type is 'single'
269 -->
270 <!--
271 <unlockOnStartup>false</unlockOnStartup>
272 -->
273
274 <!-- Expert: Controls how often Lucene loads terms into memory
275 Default is 128 and is likely good for most everyone.
276 -->
277 <!-- <termIndexInterval>128</termIndexInterval> -->
278
279 <!-- If true, IndexReaders will be opened/reopened from the IndexWriter
280 instead of from the Directory. Hosts in a master/slave setup
281 should have this set to false while those in a SolrCloud
282 cluster need to be set to true. Default: true
283 -->
284 <!--
285 <nrtMode>true</nrtMode>
286 -->
287
288 <!-- Commit Deletion Policy
289 Custom deletion policies can be specified here. The class must
290 implement org.apache.lucene.index.IndexDeletionPolicy.
291
292 The default Solr IndexDeletionPolicy implementation supports
293 deleting index commit points on number of commits, age of
294 commit point and optimized status.
295
296 The latest commit point should always be preserved regardless
297 of the criteria.
298 -->
299 <!--
300 <deletionPolicy class="solr.SolrDeletionPolicy">
301 -->
302 <!-- The number of commit points to be kept -->
303 <!-- <str name="maxCommitsToKeep">1</str> -->
304 <!-- The number of optimized commit points to be kept -->
305 <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
306 <!--
307 Delete all commit points once they have reached the given age.
308 Supports DateMathParser syntax e.g.
309 -->
310 <!--
311 <str name="maxCommitAge">30MINUTES</str>
312 <str name="maxCommitAge">1DAY</str>
313 -->
314 <!--
315 </deletionPolicy>
316 -->
317
318 <!-- Lucene Infostream
319
320 To aid in advanced debugging, Lucene provides an "InfoStream"
321 of detailed information when indexing.
322
323 Setting the value to true will instruct the underlying Lucene
324 IndexWriter to write its info stream to solr's log. By default,
325 this is enabled here, and controlled through log4j.properties.
326 -->
327 <infoStream>true</infoStream>
328 </indexConfig>
329
330
331 <!-- JMX
332
333 This example enables JMX if and only if an existing MBeanServer
334 is found, use this if you want to configure JMX through JVM
335 parameters. Remove this to disable exposing Solr configuration
336 and statistics to JMX.
337
338 For more details see http://wiki.apache.org/solr/SolrJmx
339 -->
340 <jmx />
341 <!-- If you want to connect to a particular server, specify the
342 agentId
343 -->
344 <!-- <jmx agentId="myAgent" /> -->
345 <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
346 <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
347 -->
348
349 <!-- The default high-performance update handler -->
350 <updateHandler class="solr.DirectUpdateHandler2">
351
352 <!-- Enables a transaction log, used for real-time get, durability, and
353 and solr cloud replica recovery. The log can grow as big as
354 uncommitted changes to the index, so use of a hard autoCommit
355 is recommended (see below).
356 "dir" - the target directory for transaction logs, defaults to the
357 solr data directory. -->
358 <updateLog>
359 <str name="dir">${solr.ulog.dir:}</str>
360 </updateLog>
361
362 <!-- AutoCommit
363
364 Perform a hard commit automatically under certain conditions.
365 Instead of enabling autoCommit, consider using "commitWithin"
366 when adding documents.
367
368 http://wiki.apache.org/solr/UpdateXmlMessages
369
370 maxDocs - Maximum number of documents to add since the last
371 commit before automatically triggering a new commit.
372
373 maxTime - Maximum amount of time in ms that is allowed to pass
374 since a document was added before automatically
375 triggering a new commit.
376 openSearcher - if false, the commit causes recent index changes
377 to be flushed to stable storage, but does not cause a new
378 searcher to be opened to make those changes visible.
379
380 If the updateLog is enabled, then it's highly recommended to
381 have some sort of hard autoCommit to limit the log size.
382 -->
383 <autoCommit>
384 <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
385 <openSearcher>false</openSearcher>
386 </autoCommit>
387
388 <!-- softAutoCommit is like autoCommit except it causes a
389 'soft' commit which only ensures that changes are visible
390 but does not ensure that data is synced to disk. This is
391 faster and more near-realtime friendly than a hard commit.
392 -->
393
394 <autoSoftCommit>
395 <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
396 </autoSoftCommit>
397
398 <!-- Update Related Event Listeners
399
400 Various IndexWriter related events can trigger Listeners to
401 take actions.
402
403 postCommit - fired after every commit or optimize command
404 postOptimize - fired after every optimize command
405 -->
406 <!-- The RunExecutableListener executes an external command from a
407 hook such as postCommit or postOptimize.
408
409 exe - the name of the executable to run
410 dir - dir to use as the current working directory. (default=".")
411 wait - the calling thread waits until the executable returns.
412 (default="true")
413 args - the arguments to pass to the program. (default is none)
414 env - environment variables to set. (default is none)
415 -->
416 <!-- This example shows how RunExecutableListener could be used
417 with the script based replication...
418 http://wiki.apache.org/solr/CollectionDistribution
419 -->
420 <!--
421 <listener event="postCommit" class="solr.RunExecutableListener">
422 <str name="exe">solr/bin/snapshooter</str>
423 <str name="dir">.</str>
424 <bool name="wait">true</bool>
425 <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
426 <arr name="env"> <str>MYVAR=val1</str> </arr>
427 </listener>
428 -->
429
430 </updateHandler>
431
432 <!-- IndexReaderFactory
433
434 Use the following format to specify a custom IndexReaderFactory,
435 which allows for alternate IndexReader implementations.
436
437 ** Experimental Feature **
438
439 Please note - Using a custom IndexReaderFactory may prevent
440 certain other features from working. The API to
441 IndexReaderFactory may change without warning or may even be
442 removed from future releases if the problems cannot be
443 resolved.
444
445
446 ** Features that may not work with custom IndexReaderFactory **
447
448 The ReplicationHandler assumes a disk-resident index. Using a
449 custom IndexReader implementation may cause incompatibility
450 with ReplicationHandler and may cause replication to not work
451 correctly. See SOLR-1366 for details.
452
453 -->
454 <!--
455 <indexReaderFactory name="IndexReaderFactory" class="package.class">
456 <str name="someArg">Some Value</str>
457 </indexReaderFactory >
458 -->
459 <!-- By explicitly declaring the Factory, the termIndexDivisor can
460 be specified.
461 -->
462 <!--
463 <indexReaderFactory name="IndexReaderFactory"
464 class="solr.StandardIndexReaderFactory">
465 <int name="setTermIndexDivisor">12</int>
466 </indexReaderFactory >
467 -->
468
469 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
470 Query section - these settings control query time things like caches
471 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
472 <query>
473 <!-- Max Boolean Clauses
474
475 Maximum number of clauses in each BooleanQuery, an exception
476 is thrown if exceeded.
477
478 ** WARNING **
479
480 This option actually modifies a global Lucene property that
481 will affect all SolrCores. If multiple solrconfig.xml files
482 disagree on this property, the value at any given moment will
483 be based on the last SolrCore to be initialized.
484
485 -->
486 <maxBooleanClauses>1024</maxBooleanClauses>
487
488
489 <!-- Solr Internal Query Caches
490
491 There are two implementations of cache available for Solr,
492 LRUCache, based on a synchronized LinkedHashMap, and
493 FastLRUCache, based on a ConcurrentHashMap.
494
495 FastLRUCache has faster gets and slower puts in single
496 threaded operation and thus is generally faster than LRUCache
497 when the hit ratio of the cache is high (> 75%), and may be
498 faster under other scenarios on multi-cpu systems.
499 -->
500
501 <!-- Filter Cache
502
503 Cache used by SolrIndexSearcher for filters (DocSets),
504 unordered sets of *all* documents that match a query. When a
505 new searcher is opened, its caches may be prepopulated or
506 "autowarmed" using data from caches in the old searcher.
507 autowarmCount is the number of items to prepopulate. For
508 LRUCache, the autowarmed items will be the most recently
509 accessed items.
510
511 Parameters:
512 class - the SolrCache implementation LRUCache or
513 (LRUCache or FastLRUCache)
514 size - the maximum number of entries in the cache
515 initialSize - the initial capacity (number of entries) of
516 the cache. (see java.util.HashMap)
517 autowarmCount - the number of entries to prepopulate from
518 and old cache.
519 -->
520 <filterCache class="solr.FastLRUCache"
521 size="512"
522 initialSize="512"
523 autowarmCount="0"/>
524
525 <!-- Query Result Cache
526
527 Caches results of searches - ordered lists of document ids
528 (DocList) based on a query, a sort, and the range of documents requested.
529 -->
530 <queryResultCache class="solr.LRUCache"
531 size="512"
532 initialSize="512"
533 autowarmCount="0"/>
534
535 <!-- Document Cache
536
537 Caches Lucene Document objects (the stored fields for each
538 document). Since Lucene internal document ids are transient,
539 this cache will not be autowarmed.
540 -->
541 <documentCache class="solr.LRUCache"
542 size="512"
543 initialSize="512"
544 autowarmCount="0"/>
545
546 <!-- custom cache currently used by block join -->
547 <cache name="perSegFilter"
548 class="solr.search.LRUCache"
549 size="10"
550 initialSize="0"
551 autowarmCount="10"
552 regenerator="solr.NoOpRegenerator" />
553
554 <!-- Field Value Cache
555
556 Cache used to hold field values that are quickly accessible
557 by document id. The fieldValueCache is created by default
558 even if not configured here.
559 -->
560 <!--
561 <fieldValueCache class="solr.FastLRUCache"
562 size="512"
563 autowarmCount="128"
564 showItems="32" />
565 -->
566
567 <!-- Custom Cache
568
569 Example of a generic cache. These caches may be accessed by
570 name through SolrIndexSearcher.getCache(),cacheLookup(), and
571 cacheInsert(). The purpose is to enable easy caching of
572 user/application level data. The regenerator argument should
573 be specified as an implementation of solr.CacheRegenerator
574 if autowarming is desired.
575 -->
576 <!--
577 <cache name="myUserCache"
578 class="solr.LRUCache"
579 size="4096"
580 initialSize="1024"
581 autowarmCount="1024"
582 regenerator="com.mycompany.MyRegenerator"
583 />
584 -->
585
586
587 <!-- Lazy Field Loading
588
589 If true, stored fields that are not requested will be loaded
590 lazily. This can result in a significant speed improvement
591 if the usual case is to not load all stored fields,
592 especially if the skipped fields are large compressed text
593 fields.
594 -->
595 <enableLazyFieldLoading>true</enableLazyFieldLoading>
596
597 <!-- Use Filter For Sorted Query
598
599 A possible optimization that attempts to use a filter to
600 satisfy a search. If the requested sort does not include
601 score, then the filterCache will be checked for a filter
602 matching the query. If found, the filter will be used as the
603 source of document ids, and then the sort will be applied to
604 that.
605
606 For most situations, this will not be useful unless you
607 frequently get the same search repeatedly with different sort
608 options, and none of them ever use "score"
609 -->
610 <!--
611 <useFilterForSortedQuery>true</useFilterForSortedQuery>
612 -->
613
614 <!-- Result Window Size
615
616 An optimization for use with the queryResultCache. When a search
617 is requested, a superset of the requested number of document ids
618 are collected. For example, if a search for a particular query
619 requests matching documents 10 through 19, and queryWindowSize is 50,
620 then documents 0 through 49 will be collected and cached. Any further
621 requests in that range can be satisfied via the cache.
622 -->
623 <queryResultWindowSize>20</queryResultWindowSize>
624
625 <!-- Maximum number of documents to cache for any entry in the
626 queryResultCache.
627 -->
628 <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
629
630 <!-- Query Related Event Listeners
631
632 Various IndexSearcher related events can trigger Listeners to
633 take actions.
634
635 newSearcher - fired whenever a new searcher is being prepared
636 and there is a current searcher handling requests (aka
637 registered). It can be used to prime certain caches to
638 prevent long request times for certain requests.
639
640 firstSearcher - fired whenever a new searcher is being
641 prepared but there is no current registered searcher to handle
642 requests or to gain autowarming data from.
643
644
645 -->
646 <!-- QuerySenderListener takes an array of NamedList and executes a
647 local query request for each NamedList in sequence.
648 -->
649 <listener event="newSearcher" class="solr.QuerySenderListener">
650 <arr name="queries">
651 <!--
652 <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
653 <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
654 -->
655 </arr>
656 </listener>
657 <listener event="firstSearcher" class="solr.QuerySenderListener">
658 <arr name="queries">
659 <lst>
660 <str name="q">static firstSearcher warming in solrconfig.xml</str>
661 </lst>
662 </arr>
663 </listener>
664
665 <!-- Use Cold Searcher
666
667 If a search request comes in and there is no current
668 registered searcher, then immediately register the still
669 warming searcher and use it. If "false" then all requests
670 will block until the first searcher is done warming.
671 -->
672 <useColdSearcher>false</useColdSearcher>
673
674 <!-- Max Warming Searchers
675
676 Maximum number of searchers that may be warming in the
677 background concurrently. An error is returned if this limit
678 is exceeded.
679
680 Recommend values of 1-2 for read-only slaves, higher for
681 masters w/o cache warming.
682 -->
683 <maxWarmingSearchers>2</maxWarmingSearchers>
684
685 </query>
686
687
688 <!-- Request Dispatcher
689
690 This section contains instructions for how the SolrDispatchFilter
691 should behave when processing requests for this SolrCore.
692
693 handleSelect is a legacy option that affects the behavior of requests
694 such as /select?qt=XXX
695
696 handleSelect="true" will cause the SolrDispatchFilter to process
697 the request and dispatch the query to a handler specified by the
698 "qt" param, assuming "/select" isn't already registered.
699
700 handleSelect="false" will cause the SolrDispatchFilter to
701 ignore "/select" requests, resulting in a 404 unless a handler
702 is explicitly registered with the name "/select"
703
704 handleSelect="true" is not recommended for new users, but is the default
705 for backwards compatibility
706 -->
707 <requestDispatcher handleSelect="false" >
708 <!-- Request Parsing
709
710 These settings indicate how Solr Requests may be parsed, and
711 what restrictions may be placed on the ContentStreams from
712 those requests
713
714 enableRemoteStreaming - enables use of the stream.file
715 and stream.url parameters for specifying remote streams.
716
717 multipartUploadLimitInKB - specifies the max size (in KiB) of
718 Multipart File Uploads that Solr will allow in a Request.
719
720 formdataUploadLimitInKB - specifies the max size (in KiB) of
721 form data (application/x-www-form-urlencoded) sent via
722 POST. You can use POST to pass request parameters not
723 fitting into the URL.
724
725 addHttpRequestToContext - if set to true, it will instruct
726 the requestParsers to include the original HttpServletRequest
727 object in the context map of the SolrQueryRequest under the
728 key "httpRequest". It will not be used by any of the existing
729 Solr components, but may be useful when developing custom
730 plugins.
731
732 *** WARNING ***
733 The settings below authorize Solr to fetch remote files, You
734 should make sure your system has some authentication before
735 using enableRemoteStreaming="true"
736
737 -->
738 <requestParsers enableRemoteStreaming="true"
739 multipartUploadLimitInKB="2048000"
740 formdataUploadLimitInKB="2048"
741 addHttpRequestToContext="false"/>
742
743 <!-- HTTP Caching
744
745 Set HTTP caching related parameters (for proxy caches and clients).
746
747 The options below instruct Solr not to output any HTTP Caching
748 related headers
749 -->
750 <httpCaching never304="true" />
751 <!-- If you include a <cacheControl> directive, it will be used to
752 generate a Cache-Control header (as well as an Expires header
753 if the value contains "max-age=")
754
755 By default, no Cache-Control header is generated.
756
757 You can use the <cacheControl> option even if you have set
758 never304="true"
759 -->
760 <!--
761 <httpCaching never304="true" >
762 <cacheControl>max-age=30, public</cacheControl>
763 </httpCaching>
764 -->
765 <!-- To enable Solr to respond with automatically generated HTTP
766 Caching headers, and to response to Cache Validation requests
767 correctly, set the value of never304="false"
768
769 This will cause Solr to generate Last-Modified and ETag
770 headers based on the properties of the Index.
771
772 The following options can also be specified to affect the
773 values of these headers...
774
775 lastModFrom - the default value is "openTime" which means the
776 Last-Modified value (and validation against If-Modified-Since
777 requests) will all be relative to when the current Searcher
778 was opened. You can change it to lastModFrom="dirLastMod" if
779 you want the value to exactly correspond to when the physical
780 index was last modified.
781
782 etagSeed="..." is an option you can change to force the ETag
783 header (and validation against If-None-Match requests) to be
784 different even if the index has not changed (ie: when making
785 significant changes to your config file)
786
787 (lastModifiedFrom and etagSeed are both ignored if you use
788 the never304="true" option)
789 -->
790 <!--
791 <httpCaching lastModifiedFrom="openTime"
792 etagSeed="Solr">
793 <cacheControl>max-age=30, public</cacheControl>
794 </httpCaching>
795 -->
796 </requestDispatcher>
797
798 <!-- Request Handlers
799
800 http://wiki.apache.org/solr/SolrRequestHandler
801
802 Incoming queries will be dispatched to a specific handler by name
803 based on the path specified in the request.
804
805 Legacy behavior: If the request path uses "/select" but no Request
806 Handler has that name, and if handleSelect="true" has been specified in
807 the requestDispatcher, then the Request Handler is dispatched based on
808 the qt parameter. Handlers without a leading '/' are accessed this way
809 like so: http://host/app/[core/]select?qt=name If no qt is
810 given, then the requestHandler that declares default="true" will be
811 used or the one named "standard".
812
813 If a Request Handler is declared with startup="lazy", then it will
814 not be initialized until the first request that uses it.
815
816 -->
817 <!-- SearchHandler
818
819 http://wiki.apache.org/solr/SearchHandler
820
821 For processing Search Queries, the primary Request Handler
822 provided with Solr is "SearchHandler" It delegates to a sequent
823 of SearchComponents (see below) and supports distributed
824 queries across multiple shards
825 -->
826 <requestHandler name="/select" class="solr.SearchHandler">
827 <!-- default values for query parameters can be specified, these
828 will be overridden by parameters in the request
829 -->
830 <lst name="defaults">
831 <str name="echoParams">explicit</str>
832 <int name="rows">10</int>
833 <str name="df">text</str>
834 </lst>
835 <!-- In addition to defaults, "appends" params can be specified
836 to identify values which should be appended to the list of
837 multi-val params from the query (or the existing "defaults").
838 -->
839 <!-- In this example, the param "fq=instock:true" would be appended to
840 any query time fq params the user may specify, as a mechanism for
841 partitioning the index, independent of any user selected filtering
842 that may also be desired (perhaps as a result of faceted searching).
843
844 NOTE: there is *absolutely* nothing a client can do to prevent these
845 "appends" values from being used, so don't use this mechanism
846 unless you are sure you always want it.
847 -->
848 <!--
849 <lst name="appends">
850 <str name="fq">inStock:true</str>
851 </lst>
852 -->
853 <!-- "invariants" are a way of letting the Solr maintainer lock down
854 the options available to Solr clients. Any params values
855 specified here are used regardless of what values may be specified
856 in either the query, the "defaults", or the "appends" params.
857
858 In this example, the facet.field and facet.query params would
859 be fixed, limiting the facets clients can use. Faceting is
860 not turned on by default - but if the client does specify
861 facet=true in the request, these are the only facets they
862 will be able to see counts for; regardless of what other
863 facet.field or facet.query params they may specify.
864
865 NOTE: there is *absolutely* nothing a client can do to prevent these
866 "invariants" values from being used, so don't use this mechanism
867 unless you are sure you always want it.
868 -->
869 <!--
870 <lst name="invariants">
871 <str name="facet.field">cat</str>
872 <str name="facet.field">manu_exact</str>
873 <str name="facet.query">price:[* TO 500]</str>
874 <str name="facet.query">price:[500 TO *]</str>
875 </lst>
876 -->
877 <!-- If the default list of SearchComponents is not desired, that
878 list can either be overridden completely, or components can be
879 prepended or appended to the default list. (see below)
880 -->
881 <!--
882 <arr name="components">
883 <str>nameOfCustomComponent1</str>
884 <str>nameOfCustomComponent2</str>
885 </arr>
886 -->
887 </requestHandler>
888
889 <!-- A request handler that returns indented JSON by default -->
890 <requestHandler name="/query" class="solr.SearchHandler">
891 <lst name="defaults">
892 <str name="echoParams">explicit</str>
893 <str name="wt">json</str>
894 <str name="indent">true</str>
895 <str name="df">text</str>
896 </lst>
897 </requestHandler>
898
899
900 <!-- realtime get handler, guaranteed to return the latest stored fields of
901 any document, without the need to commit or open a new searcher. The
902 current implementation relies on the updateLog feature being enabled.
903
904 ** WARNING **
905 Do NOT disable the realtime get handler at /get if you are using
906 SolrCloud otherwise any leader election will cause a full sync in ALL
907 replicas for the shard in question. Similarly, a replica recovery will
908 also always fetch the complete index from the leader because a partial
909 sync will not be possible in the absence of this handler.
910 -->
911 <requestHandler name="/get" class="solr.RealTimeGetHandler">
912 <lst name="defaults">
913 <str name="omitHeader">true</str>
914 <str name="wt">json</str>
915 <str name="indent">true</str>
916 </lst>
917 </requestHandler>
918
919
920 <!-- A Robust Example
921
922 This example SearchHandler declaration shows off usage of the
923 SearchHandler with many defaults declared
924
925 Note that multiple instances of the same Request Handler
926 (SearchHandler) can be registered multiple times with different
927 names (and different init parameters)
928 -->
929 <requestHandler name="/browse" class="solr.SearchHandler">
930 <lst name="defaults">
931 <str name="echoParams">explicit</str>
932
933 <!-- VelocityResponseWriter settings -->
934 <str name="wt">velocity</str>
935 <str name="v.template">browse</str>
936 <str name="v.layout">layout</str>
937 <str name="title">Solritas</str>
938
939 <!-- Query settings -->
940 <str name="defType">edismax</str>
941 <str name="qf">
942 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
943 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
944 </str>
945 <str name="df">text</str>
946 <str name="mm">100%</str>
947 <str name="q.alt">*:*</str>
948 <str name="rows">10</str>
949 <str name="fl">*,score</str>
950
951 <str name="mlt.qf">
952 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
953 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
954 </str>
955 <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
956 <int name="mlt.count">3</int>
957
958 <!-- Faceting defaults -->
959 <str name="facet">on</str>
960 <str name="facet.field">cat</str>
961 <str name="facet.field">manu_exact</str>
962 <str name="facet.field">content_type</str>
963 <str name="facet.field">author_s</str>
964 <str name="facet.query">ipod</str>
965 <str name="facet.query">GB</str>
966 <str name="facet.mincount">1</str>
967 <str name="facet.pivot">cat,inStock</str>
968 <str name="facet.range.other">after</str>
969 <str name="facet.range">price</str>
970 <int name="f.price.facet.range.start">0</int>
971 <int name="f.price.facet.range.end">600</int>
972 <int name="f.price.facet.range.gap">50</int>
973 <str name="facet.range">popularity</str>
974 <int name="f.popularity.facet.range.start">0</int>
975 <int name="f.popularity.facet.range.end">10</int>
976 <int name="f.popularity.facet.range.gap">3</int>
977 <str name="facet.range">manufacturedate_dt</str>
978 <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
979 <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
980 <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
981 <str name="f.manufacturedate_dt.facet.range.other">before</str>
982 <str name="f.manufacturedate_dt.facet.range.other">after</str>
983
984 <!-- Highlighting defaults -->
985 <str name="hl">on</str>
986 <str name="hl.fl">content features title name</str>
987 <str name="hl.encoder">html</str>
988 <str name="hl.simple.pre">&lt;b&gt;</str>
989 <str name="hl.simple.post">&lt;/b&gt;</str>
990 <str name="f.title.hl.fragsize">0</str>
991 <str name="f.title.hl.alternateField">title</str>
992 <str name="f.name.hl.fragsize">0</str>
993 <str name="f.name.hl.alternateField">name</str>
994 <str name="f.content.hl.snippets">3</str>
995 <str name="f.content.hl.fragsize">200</str>
996 <str name="f.content.hl.alternateField">content</str>
997 <str name="f.content.hl.maxAlternateFieldLength">750</str>
998
999 <!-- Spell checking defaults -->
1000 <str name="spellcheck">on</str>
1001 <str name="spellcheck.extendedResults">false</str>
1002 <str name="spellcheck.count">5</str>
1003 <str name="spellcheck.alternativeTermCount">2</str>
1004 <str name="spellcheck.maxResultsForSuggest">5</str>
1005 <str name="spellcheck.collate">true</str>
1006 <str name="spellcheck.collateExtendedResults">true</str>
1007 <str name="spellcheck.maxCollationTries">5</str>
1008 <str name="spellcheck.maxCollations">3</str>
1009 </lst>
1010
1011 <!-- append spellchecking to our list of components -->
1012 <arr name="last-components">
1013 <str>spellcheck</str>
1014 </arr>
1015 </requestHandler>
1016
1017
1018 <!-- Update Request Handler.
1019
1020 http://wiki.apache.org/solr/UpdateXmlMessages
1021
1022 The canonical Request Handler for Modifying the Index through
1023 commands specified using XML, JSON, CSV, or JAVABIN
1024
1025 Note: Since solr1.1 requestHandlers requires a valid content
1026 type header if posted in the body. For example, curl now
1027 requires: -H 'Content-type:text/xml; charset=utf-8'
1028
1029 To override the request content type and force a specific
1030 Content-type, use the request parameter:
1031 ?update.contentType=text/csv
1032
1033 This handler will pick a response format to match the input
1034 if the 'wt' parameter is not explicit
1035 -->
1036 <requestHandler name="/update" class="solr.UpdateRequestHandler">
1037 <!-- See below for information on defining
1038 updateRequestProcessorChains that can be used by name
1039 on each Update Request
1040 -->
1041 <!--
1042 <lst name="defaults">
1043 <str name="update.chain">dedupe</str>
1044 </lst>
1045 -->
1046 </requestHandler>
1047
1048 <!-- for back compat with clients using /update/json and /update/csv -->
1049 <requestHandler name="/update/json" class="solr.UpdateRequestHandler">
1050 <lst name="defaults">
1051 <str name="stream.contentType">application/json</str>
1052 </lst>
1053 </requestHandler>
1054 <requestHandler name="/update/csv" class="solr.UpdateRequestHandler">
1055 <lst name="defaults">
1056 <str name="stream.contentType">application/csv</str>
1057 </lst>
1058 </requestHandler>
1059
1060 <!-- Solr Cell Update Request Handler
1061
1062 http://wiki.apache.org/solr/ExtractingRequestHandler
1063
1064 -->
1065 <requestHandler name="/update/extract"
1066 startup="lazy"
1067 class="solr.extraction.ExtractingRequestHandler" >
1068 <lst name="defaults">
1069 <str name="lowernames">true</str>
1070 <str name="uprefix">ignored_</str>
1071
1072 <!-- capture link hrefs but ignore div attributes -->
1073 <str name="captureAttr">true</str>
1074 <str name="fmap.a">links</str>
1075 <str name="fmap.div">ignored_</str>
1076 </lst>
1077 </requestHandler>
1078
1079
1080 <!-- Field Analysis Request Handler
1081
1082 RequestHandler that provides much the same functionality as
1083 analysis.jsp. Provides the ability to specify multiple field
1084 types and field names in the same request and outputs
1085 index-time and query-time analysis for each of them.
1086
1087 Request parameters are:
1088 analysis.fieldname - field name whose analyzers are to be used
1089
1090 analysis.fieldtype - field type whose analyzers are to be used
1091 analysis.fieldvalue - text for index-time analysis
1092 q (or analysis.q) - text for query time analysis
1093 analysis.showmatch (true|false) - When set to true and when
1094 query analysis is performed, the produced tokens of the
1095 field value analysis will be marked as "matched" for every
1096 token that is produces by the query analysis
1097 -->
1098 <requestHandler name="/analysis/field"
1099 startup="lazy"
1100 class="solr.FieldAnalysisRequestHandler" />
1101
1102
1103 <!-- Document Analysis Handler
1104
1105 http://wiki.apache.org/solr/AnalysisRequestHandler
1106
1107 An analysis handler that provides a breakdown of the analysis
1108 process of provided documents. This handler expects a (single)
1109 content stream with the following format:
1110
1111 <docs>
1112 <doc>
1113 <field name="id">1</field>
1114 <field name="name">The Name</field>
1115 <field name="text">The Text Value</field>
1116 </doc>
1117 <doc>...</doc>
1118 <doc>...</doc>
1119 ...
1120 </docs>
1121
1122 Note: Each document must contain a field which serves as the
1123 unique key. This key is used in the returned response to associate
1124 an analysis breakdown to the analyzed document.
1125
1126 Like the FieldAnalysisRequestHandler, this handler also supports
1127 query analysis by sending either an "analysis.query" or "q"
1128 request parameter that holds the query text to be analyzed. It
1129 also supports the "analysis.showmatch" parameter which when set to
1130 true, all field tokens that match the query tokens will be marked
1131 as a "match".
1132 -->
1133 <requestHandler name="/analysis/document"
1134 class="solr.DocumentAnalysisRequestHandler"
1135 startup="lazy" />
1136
1137 <!-- Admin Handlers
1138
1139 Admin Handlers - This will register all the standard admin
1140 RequestHandlers.
1141 -->
1142 <requestHandler name="/admin/"
1143 class="solr.admin.AdminHandlers" />
1144 <!-- This single handler is equivalent to the following... -->
1145 <!--
1146 <requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
1147 <requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
1148 <requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
1149 <requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
1150 <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
1151 <requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
1152 -->
1153 <!-- If you wish to hide files under ${solr.home}/conf, explicitly
1154 register the ShowFileRequestHandler using the definition below.
1155 NOTE: The glob pattern ('*') is the only pattern supported at present, *.xml will
1156 not exclude all files ending in '.xml'. Use it to exclude _all_ updates
1157 -->
1158 <!--
1159 <requestHandler name="/admin/file"
1160 class="solr.admin.ShowFileRequestHandler" >
1161 <lst name="invariants">
1162 <str name="hidden">synonyms.txt</str>
1163 <str name="hidden">anotherfile.txt</str>
1164 <str name="hidden">*</str>
1165 </lst>
1166 </requestHandler>
1167 -->
1168
1169 <!-- ping/healthcheck -->
1170 <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
1171 <lst name="invariants">
1172 <str name="q">solrpingquery</str>
1173 </lst>
1174 <lst name="defaults">
1175 <str name="echoParams">all</str>
1176 </lst>
1177 <!-- An optional feature of the PingRequestHandler is to configure the
1178 handler with a "healthcheckFile" which can be used to enable/disable
1179 the PingRequestHandler.
1180 relative paths are resolved against the data dir
1181 -->
1182 <!-- <str name="healthcheckFile">server-enabled.txt</str> -->
1183 </requestHandler>
1184
1185 <!-- Echo the request contents back to the client -->
1186 <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
1187 <lst name="defaults">
1188 <str name="echoParams">explicit</str>
1189 <str name="echoHandler">true</str>
1190 </lst>
1191 </requestHandler>
1192
1193 <!-- Solr Replication
1194
1195 The SolrReplicationHandler supports replicating indexes from a
1196 "master" used for indexing and "slaves" used for queries.
1197
1198 http://wiki.apache.org/solr/SolrReplication
1199
1200 It is also necessary for SolrCloud to function (in Cloud mode, the
1201 replication handler is used to bulk transfer segments when nodes
1202 are added or need to recover).
1203
1204 https://wiki.apache.org/solr/SolrCloud/
1205 -->
1206 <requestHandler name="/replication" class="solr.ReplicationHandler" >
1207 <!--
1208 To enable simple master/slave replication, uncomment one of the
1209 sections below, depending on whether this solr instance should be
1210 the "master" or a "slave". If this instance is a "slave" you will
1211 also need to fill in the masterUrl to point to a real machine.
1212 -->
1213 <!--
1214 <lst name="master">
1215 <str name="replicateAfter">commit</str>
1216 <str name="replicateAfter">startup</str>
1217 <str name="confFiles">schema.xml,stopwords.txt</str>
1218 </lst>
1219 -->
1220 <!--
1221 <lst name="slave">
1222 <str name="masterUrl">http://your-master-hostname:8983/solr</str>
1223 <str name="pollInterval">00:00:60</str>
1224 </lst>
1225 -->
1226 </requestHandler>
1227
1228 <!-- Search Components
1229
1230 Search components are registered to SolrCore and used by
1231 instances of SearchHandler (which can access them by name)
1232
1233 By default, the following components are available:
1234
1235 <searchComponent name="query" class="solr.QueryComponent" />
1236 <searchComponent name="facet" class="solr.FacetComponent" />
1237 <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
1238 <searchComponent name="highlight" class="solr.HighlightComponent" />
1239 <searchComponent name="stats" class="solr.StatsComponent" />
1240 <searchComponent name="debug" class="solr.DebugComponent" />
1241
1242 Default configuration in a requestHandler would look like:
1243
1244 <arr name="components">
1245 <str>query</str>
1246 <str>facet</str>
1247 <str>mlt</str>
1248 <str>highlight</str>
1249 <str>stats</str>
1250 <str>debug</str>
1251 </arr>
1252
1253 If you register a searchComponent to one of the standard names,
1254 that will be used instead of the default.
1255
1256 To insert components before or after the 'standard' components, use:
1257
1258 <arr name="first-components">
1259 <str>myFirstComponentName</str>
1260 </arr>
1261
1262 <arr name="last-components">
1263 <str>myLastComponentName</str>
1264 </arr>
1265
1266 NOTE: The component registered with the name "debug" will
1267 always be executed after the "last-components"
1268
1269 -->
1270
1271 <!-- Spell Check
1272
1273 The spell check component can return a list of alternative spelling
1274 suggestions.
1275
1276 http://wiki.apache.org/solr/SpellCheckComponent
1277 -->
1278 <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
1279
1280 <str name="queryAnalyzerFieldType">text_general</str>
1281
1282 <!-- Multiple "Spell Checkers" can be declared and used by this
1283 component
1284 -->
1285
1286 <!-- a spellchecker built from a field of the main index -->
1287 <lst name="spellchecker">
1288 <str name="name">default</str>
1289 <str name="field">text</str>
1290 <str name="classname">solr.DirectSolrSpellChecker</str>
1291 <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
1292 <str name="distanceMeasure">internal</str>
1293 <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
1294 <float name="accuracy">0.5</float>
1295 <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
1296 <int name="maxEdits">2</int>
1297 <!-- the minimum shared prefix when enumerating terms -->
1298 <int name="minPrefix">1</int>
1299 <!-- maximum number of inspections per result. -->
1300 <int name="maxInspections">5</int>
1301 <!-- minimum length of a query term to be considered for correction -->
1302 <int name="minQueryLength">4</int>
1303 <!-- maximum threshold of documents a query term can appear to be considered for correction -->
1304 <float name="maxQueryFrequency">0.01</float>
1305 <!-- uncomment this to require suggestions to occur in 1% of the documents
1306 <float name="thresholdTokenFrequency">.01</float>
1307 -->
1308 </lst>
1309
1310 <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
1311 <lst name="spellchecker">
1312 <str name="name">wordbreak</str>
1313 <str name="classname">solr.WordBreakSolrSpellChecker</str>
1314 <str name="field">name</str>
1315 <str name="combineWords">true</str>
1316 <str name="breakWords">true</str>
1317 <int name="maxChanges">10</int>
1318 </lst>
1319
1320 <!-- a spellchecker that uses a different distance measure -->
1321 <!--
1322 <lst name="spellchecker">
1323 <str name="name">jarowinkler</str>
1324 <str name="field">spell</str>
1325 <str name="classname">solr.DirectSolrSpellChecker</str>
1326 <str name="distanceMeasure">
1327 org.apache.lucene.search.spell.JaroWinklerDistance
1328 </str>
1329 </lst>
1330 -->
1331
1332 <!-- a spellchecker that use an alternate comparator
1333
1334 comparatorClass be one of:
1335 1. score (default)
1336 2. freq (Frequency first, then score)
1337 3. A fully qualified class name
1338 -->
1339 <!--
1340 <lst name="spellchecker">
1341 <str name="name">freq</str>
1342 <str name="field">lowerfilt</str>
1343 <str name="classname">solr.DirectSolrSpellChecker</str>
1344 <str name="comparatorClass">freq</str>
1345 -->
1346
1347 <!-- A spellchecker that reads the list of words from a file -->
1348 <!--
1349 <lst name="spellchecker">
1350 <str name="classname">solr.FileBasedSpellChecker</str>
1351 <str name="name">file</str>
1352 <str name="sourceLocation">spellings.txt</str>
1353 <str name="characterEncoding">UTF-8</str>
1354 <str name="spellcheckIndexDir">spellcheckerFile</str>
1355 </lst>
1356 -->
1357 </searchComponent>
1358
1359 <!-- A request handler for demonstrating the spellcheck component.
1360
1361 NOTE: This is purely as an example. The whole purpose of the
1362 SpellCheckComponent is to hook it into the request handler that
1363 handles your normal user queries so that a separate request is
1364 not needed to get suggestions.
1365
1366 IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
1367 NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
1368
1369 See http://wiki.apache.org/solr/SpellCheckComponent for details
1370 on the request parameters.
1371 -->
1372 <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
1373 <lst name="defaults">
1374 <str name="df">text</str>
1375 <!-- Solr will use suggestions from both the 'default' spellchecker
1376 and from the 'wordbreak' spellchecker and combine them.
1377 collations (re-written queries) can include a combination of
1378 corrections from both spellcheckers -->
1379 <str name="spellcheck.dictionary">default</str>
1380 <str name="spellcheck.dictionary">wordbreak</str>
1381 <str name="spellcheck">on</str>
1382 <str name="spellcheck.extendedResults">true</str>
1383 <str name="spellcheck.count">10</str>
1384 <str name="spellcheck.alternativeTermCount">5</str>
1385 <str name="spellcheck.maxResultsForSuggest">5</str>
1386 <str name="spellcheck.collate">true</str>
1387 <str name="spellcheck.collateExtendedResults">true</str>
1388 <str name="spellcheck.maxCollationTries">10</str>
1389 <str name="spellcheck.maxCollations">5</str>
1390 </lst>
1391 <arr name="last-components">
1392 <str>spellcheck</str>
1393 </arr>
1394 </requestHandler>
1395
1396 <searchComponent name="suggest" class="solr.SuggestComponent">
1397 <lst name="suggester">
1398 <str name="name">mySuggester</str>
1399 <str name="lookupImpl">FuzzyLookupFactory</str> <!-- org.apache.solr.spelling.suggest.fst -->
1400 <str name="dictionaryImpl">DocumentDictionaryFactory</str> <!-- org.apache.solr.spelling.suggest.HighFrequencyDictionaryFactory -->
1401 <str name="field">cat</str>
1402 <str name="weightField">price</str>
1403 <str name="suggestAnalyzerFieldType">string</str>
1404 </lst>
1405 </searchComponent>
1406
1407 <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
1408 <lst name="defaults">
1409 <str name="suggest">true</str>
1410 <str name="suggest.count">10</str>
1411 </lst>
1412 <arr name="components">
1413 <str>suggest</str>
1414 </arr>
1415 </requestHandler>
1416 <!-- Term Vector Component
1417
1418 http://wiki.apache.org/solr/TermVectorComponent
1419 -->
1420 <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
1421
1422 <!-- A request handler for demonstrating the term vector component
1423
1424 This is purely as an example.
1425
1426 In reality you will likely want to add the component to your
1427 already specified request handlers.
1428 -->
1429 <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
1430 <lst name="defaults">
1431 <str name="df">text</str>
1432 <bool name="tv">true</bool>
1433 </lst>
1434 <arr name="last-components">
1435 <str>tvComponent</str>
1436 </arr>
1437 </requestHandler>
1438
1439 <!-- Clustering Component
1440
1441 You'll need to set the solr.clustering.enabled system property
1442 when running solr to run with clustering enabled:
1443
1444 java -Dsolr.clustering.enabled=true -jar start.jar
1445
1446 http://wiki.apache.org/solr/ClusteringComponent
1447 http://carrot2.github.io/solr-integration-strategies/
1448 -->
1449 <searchComponent name="clustering"
1450 enable="${solr.clustering.enabled:false}"
1451 class="solr.clustering.ClusteringComponent" >
1452 <lst name="engine">
1453 <str name="name">lingo</str>
1454
1455 <!-- Class name of a clustering algorithm compatible with the Carrot2 framework.
1456
1457 Currently available open source algorithms are:
1458 * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
1459 * org.carrot2.clustering.stc.STCClusteringAlgorithm
1460 * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
1461
1462 See http://project.carrot2.org/algorithms.html for more information.
1463
1464 A commercial algorithm Lingo3G (needs to be installed separately) is defined as:
1465 * com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm
1466 -->
1467 <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
1468
1469 <!-- Override location of the clustering algorithm's resources
1470 (attribute definitions and lexical resources).
1471
1472 A directory from which to load algorithm-specific stop words,
1473 stop labels and attribute definition XMLs.
1474
1475 For an overview of Carrot2 lexical resources, see:
1476 http://download.carrot2.org/head/manual/#chapter.lexical-resources
1477
1478 For an overview of Lingo3G lexical resources, see:
1479 http://download.carrotsearch.com/lingo3g/manual/#chapter.lexical-resources
1480 -->
1481 <str name="carrot.resourcesDir">clustering/carrot2</str>
1482 </lst>
1483
1484 <!-- An example definition for the STC clustering algorithm. -->
1485 <lst name="engine">
1486 <str name="name">stc</str>
1487 <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
1488 </lst>
1489
1490 <!-- An example definition for the bisecting kmeans clustering algorithm. -->
1491 <lst name="engine">
1492 <str name="name">kmeans</str>
1493 <str name="carrot.algorithm">org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm</str>
1494 </lst>
1495 </searchComponent>
1496
1497 <!-- A request handler for demonstrating the clustering component
1498
1499 This is purely as an example.
1500
1501 In reality you will likely want to add the component to your
1502 already specified request handlers.
1503 -->
1504 <requestHandler name="/clustering"
1505 startup="lazy"
1506 enable="${solr.clustering.enabled:false}"
1507 class="solr.SearchHandler">
1508 <lst name="defaults">
1509 <bool name="clustering">true</bool>
1510 <bool name="clustering.results">true</bool>
1511 <!-- Field name with the logical "title" of a each document (optional) -->
1512 <str name="carrot.title">name</str>
1513 <!-- Field name with the logical "URL" of a each document (optional) -->
1514 <str name="carrot.url">id</str>
1515 <!-- Field name with the logical "content" of a each document (optional) -->
1516 <str name="carrot.snippet">features</str>
1517 <!-- Apply highlighter to the title/ content and use this for clustering. -->
1518 <bool name="carrot.produceSummary">true</bool>
1519 <!-- the maximum number of labels per cluster -->
1520 <!--<int name="carrot.numDescriptions">5</int>-->
1521 <!-- produce sub clusters -->
1522 <bool name="carrot.outputSubClusters">false</bool>
1523
1524 <!-- Configure the remaining request handler parameters. -->
1525 <str name="defType">edismax</str>
1526 <str name="qf">
1527 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
1528 </str>
1529 <str name="q.alt">*:*</str>
1530 <str name="rows">10</str>
1531 <str name="fl">*,score</str>
1532 </lst>
1533 <arr name="last-components">
1534 <str>clustering</str>
1535 </arr>
1536 </requestHandler>
1537
1538 <!-- Terms Component
1539
1540 http://wiki.apache.org/solr/TermsComponent
1541
1542 A component to return terms and document frequency of those
1543 terms
1544 -->
1545 <searchComponent name="terms" class="solr.TermsComponent"/>
1546
1547 <!-- A request handler for demonstrating the terms component -->
1548 <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
1549 <lst name="defaults">
1550 <bool name="terms">true</bool>
1551 <bool name="distrib">false</bool>
1552 </lst>
1553 <arr name="components">
1554 <str>terms</str>
1555 </arr>
1556 </requestHandler>
1557
1558
1559 <!-- Query Elevation Component
1560
1561 http://wiki.apache.org/solr/QueryElevationComponent
1562
1563 a search component that enables you to configure the top
1564 results for a given query regardless of the normal lucene
1565 scoring.
1566 -->
1567 <searchComponent name="elevator" class="solr.QueryElevationComponent" >
1568 <!-- pick a fieldType to analyze queries -->
1569 <str name="queryFieldType">string</str>
1570 <str name="config-file">elevate.xml</str>
1571 </searchComponent>
1572
1573 <!-- A request handler for demonstrating the elevator component -->
1574 <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
1575 <lst name="defaults">
1576 <str name="echoParams">explicit</str>
1577 <str name="df">text</str>
1578 </lst>
1579 <arr name="last-components">
1580 <str>elevator</str>
1581 </arr>
1582 </requestHandler>
1583
1584 <!-- Highlighting Component
1585
1586 http://wiki.apache.org/solr/HighlightingParameters
1587 -->
1588 <searchComponent class="solr.HighlightComponent" name="highlight">
1589 <highlighting>
1590 <!-- Configure the standard fragmenter -->
1591 <!-- This could most likely be commented out in the "default" case -->
1592 <fragmenter name="gap"
1593 default="true"
1594 class="solr.highlight.GapFragmenter">
1595 <lst name="defaults">
1596 <int name="hl.fragsize">100</int>
1597 </lst>
1598 </fragmenter>
1599
1600 <!-- A regular-expression-based fragmenter
1601 (for sentence extraction)
1602 -->
1603 <fragmenter name="regex"
1604 class="solr.highlight.RegexFragmenter">
1605 <lst name="defaults">
1606 <!-- slightly smaller fragsizes work better because of slop -->
1607 <int name="hl.fragsize">70</int>
1608 <!-- allow 50% slop on fragment sizes -->
1609 <float name="hl.regex.slop">0.5</float>
1610 <!-- a basic sentence pattern -->
1611 <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
1612 </lst>
1613 </fragmenter>
1614
1615 <!-- Configure the standard formatter -->
1616 <formatter name="html"
1617 default="true"
1618 class="solr.highlight.HtmlFormatter">
1619 <lst name="defaults">
1620 <str name="hl.simple.pre"><![CDATA[<em>]]></str>
1621 <str name="hl.simple.post"><![CDATA[</em>]]></str>
1622 </lst>
1623 </formatter>
1624
1625 <!-- Configure the standard encoder -->
1626 <encoder name="html"
1627 class="solr.highlight.HtmlEncoder" />
1628
1629 <!-- Configure the standard fragListBuilder -->
1630 <fragListBuilder name="simple"
1631 class="solr.highlight.SimpleFragListBuilder"/>
1632
1633 <!-- Configure the single fragListBuilder -->
1634 <fragListBuilder name="single"
1635 class="solr.highlight.SingleFragListBuilder"/>
1636
1637 <!-- Configure the weighted fragListBuilder -->
1638 <fragListBuilder name="weighted"
1639 default="true"
1640 class="solr.highlight.WeightedFragListBuilder"/>
1641
1642 <!-- default tag FragmentsBuilder -->
1643 <fragmentsBuilder name="default"
1644 default="true"
1645 class="solr.highlight.ScoreOrderFragmentsBuilder">
1646 <!--
1647 <lst name="defaults">
1648 <str name="hl.multiValuedSeparatorChar">/</str>
1649 </lst>
1650 -->
1651 </fragmentsBuilder>
1652
1653 <!-- multi-colored tag FragmentsBuilder -->
1654 <fragmentsBuilder name="colored"
1655 class="solr.highlight.ScoreOrderFragmentsBuilder">
1656 <lst name="defaults">
1657 <str name="hl.tag.pre"><![CDATA[
1658 <b style="background:yellow">,<b style="background:lawgreen">,
1659 <b style="background:aquamarine">,<b style="background:magenta">,
1660 <b style="background:palegreen">,<b style="background:coral">,
1661 <b style="background:wheat">,<b style="background:khaki">,
1662 <b style="background:lime">,<b style="background:deepskyblue">]]></str>
1663 <str name="hl.tag.post"><![CDATA[</b>]]></str>
1664 </lst>
1665 </fragmentsBuilder>
1666
1667 <boundaryScanner name="default"
1668 default="true"
1669 class="solr.highlight.SimpleBoundaryScanner">
1670 <lst name="defaults">
1671 <str name="hl.bs.maxScan">10</str>
1672 <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
1673 </lst>
1674 </boundaryScanner>
1675
1676 <boundaryScanner name="breakIterator"
1677 class="solr.highlight.BreakIteratorBoundaryScanner">
1678 <lst name="defaults">
1679 <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
1680 <str name="hl.bs.type">WORD</str>
1681 <!-- language and country are used when constructing Locale object. -->
1682 <!-- And the Locale object will be used when getting instance of BreakIterator -->
1683 <str name="hl.bs.language">en</str>
1684 <str name="hl.bs.country">US</str>
1685 </lst>
1686 </boundaryScanner>
1687 </highlighting>
1688 </searchComponent>
1689
1690 <!-- Update Processors
1691
1692 Chains of Update Processor Factories for dealing with Update
1693 Requests can be declared, and then used by name in Update
1694 Request Processors
1695
1696 http://wiki.apache.org/solr/UpdateRequestProcessor
1697
1698 -->
1699 <!-- Deduplication
1700
1701 An example dedup update processor that creates the "id" field
1702 on the fly based on the hash code of some other fields. This
1703 example has overwriteDupes set to false since we are using the
1704 id field as the signatureField and Solr will maintain
1705 uniqueness based on that anyway.
1706
1707 -->
1708 <!--
1709 <updateRequestProcessorChain name="dedupe">
1710 <processor class="solr.processor.SignatureUpdateProcessorFactory">
1711 <bool name="enabled">true</bool>
1712 <str name="signatureField">id</str>
1713 <bool name="overwriteDupes">false</bool>
1714 <str name="fields">name,features,cat</str>
1715 <str name="signatureClass">solr.processor.Lookup3Signature</str>
1716 </processor>
1717 <processor class="solr.LogUpdateProcessorFactory" />
1718 <processor class="solr.RunUpdateProcessorFactory" />
1719 </updateRequestProcessorChain>
1720 -->
1721
1722 <!-- Language identification
1723
1724 This example update chain identifies the language of the incoming
1725 documents using the langid contrib. The detected language is
1726 written to field language_s. No field name mapping is done.
1727 The fields used for detection are text, title, subject and description,
1728 making this example suitable for detecting languages form full-text
1729 rich documents injected via ExtractingRequestHandler.
1730 See more about langId at http://wiki.apache.org/solr/LanguageDetection
1731 -->
1732 <!--
1733 <updateRequestProcessorChain name="langid">
1734 <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
1735 <str name="langid.fl">text,title,subject,description</str>
1736 <str name="langid.langField">language_s</str>
1737 <str name="langid.fallback">en</str>
1738 </processor>
1739 <processor class="solr.LogUpdateProcessorFactory" />
1740 <processor class="solr.RunUpdateProcessorFactory" />
1741 </updateRequestProcessorChain>
1742 -->
1743
1744 <!-- Script update processor
1745
1746 This example hooks in an update processor implemented using JavaScript.
1747
1748 See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
1749 -->
1750 <!--
1751 <updateRequestProcessorChain name="script">
1752 <processor class="solr.StatelessScriptUpdateProcessorFactory">
1753 <str name="script">update-script.js</str>
1754 <lst name="params">
1755 <str name="config_param">example config parameter</str>
1756 </lst>
1757 </processor>
1758 <processor class="solr.RunUpdateProcessorFactory" />
1759 </updateRequestProcessorChain>
1760 -->
1761
1762 <!-- Response Writers
1763
1764 http://wiki.apache.org/solr/QueryResponseWriter
1765
1766 Request responses will be written using the writer specified by
1767 the 'wt' request parameter matching the name of a registered
1768 writer.
1769
1770 The "default" writer is the default and will be used if 'wt' is
1771 not specified in the request.
1772 -->
1773 <!-- The following response writers are implicitly configured unless
1774 overridden...
1775 -->
1776 <!--
1777 <queryResponseWriter name="xml"
1778 default="true"
1779 class="solr.XMLResponseWriter" />
1780 <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
1781 <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
1782 <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
1783 <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
1784 <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
1785 <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
1786 <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
1787 -->
1788
1789 <queryResponseWriter name="json" class="solr.JSONResponseWriter">
1790 <!-- For the purposes of the tutorial, JSON responses are written as
1791 plain text so that they are easy to read in *any* browser.
1792 If you expect a MIME type of "application/json" just remove this override.
1793 -->
1794 <str name="content-type">text/plain; charset=UTF-8</str>
1795 </queryResponseWriter>
1796
1797 <!--
1798 Custom response writers can be declared as needed...
1799 -->
1800 <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
1801
1802
1803 <!-- XSLT response writer transforms the XML output by any xslt file found
1804 in Solr's conf/xslt directory. Changes to xslt files are checked for
1805 every xsltCacheLifetimeSeconds.
1806 -->
1807 <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
1808 <int name="xsltCacheLifetimeSeconds">5</int>
1809 </queryResponseWriter>
1810
1811 <!-- Query Parsers
1812
1813 http://wiki.apache.org/solr/SolrQuerySyntax
1814
1815 Multiple QParserPlugins can be registered by name, and then
1816 used in either the "defType" param for the QueryComponent (used
1817 by SearchHandler) or in LocalParams
1818 -->
1819 <!-- example of registering a query parser -->
1820 <!--
1821 <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
1822 -->
1823
1824 <!-- Function Parsers
1825
1826 http://wiki.apache.org/solr/FunctionQuery
1827
1828 Multiple ValueSourceParsers can be registered by name, and then
1829 used as function names when using the "func" QParser.
1830 -->
1831 <!-- example of registering a custom function parser -->
1832 <!--
1833 <valueSourceParser name="myfunc"
1834 class="com.mycompany.MyValueSourceParser" />
1835 -->
1836
1837
1838 <!-- Document Transformers
1839 http://wiki.apache.org/solr/DocTransformers
1840 -->
1841 <!--
1842 Could be something like:
1843 <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
1844 <int name="connection">jdbc://....</int>
1845 </transformer>
1846
1847 To add a constant value to all docs, use:
1848 <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1849 <int name="value">5</int>
1850 </transformer>
1851
1852 If you want the user to still be able to change it with _value:something_ use this:
1853 <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1854 <double name="defaultValue">5</double>
1855 </transformer>
1856
1857 If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The
1858 EditorialMarkerFactory will do exactly that:
1859 <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
1860 -->
1861
1862
1863 <!-- Legacy config for the admin interface -->
1864 <admin>
1865 <defaultQuery>*:*</defaultQuery>
1866 </admin>
1867
1868</config>
Note: See TracBrowser for help on using the repository browser.