Advertisement
Guest User

Untitled

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