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