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