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