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