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