Advertisement
Guest User

solrconfig.xml

a guest
Apr 25th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 56.44 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>6.5.0</luceneMatchVersion>
  39.  
  40.   <!-- <lib/> directives can be used to instruct Solr to load any Jars
  41.       identified and use them to resolve any "plugins" specified in
  42.       your solrconfig.xml or schema.xml (ie: Analyzers, Request
  43.       Handlers, etc...).
  44.  
  45.       All directories and paths are resolved relative to the
  46.       instanceDir.
  47.  
  48.       Please note that <lib/> directives are processed in the order
  49.       that they appear in your solrconfig.xml file, and are "stacked"
  50.       on top of each other when building a ClassLoader - so if you have
  51.       plugin jars with dependencies on other jars, the "lower level"
  52.       dependency jars should be loaded first.
  53.  
  54.       If a "./lib" directory exists in your instanceDir, all files
  55.       found in it are included as if you had used the following
  56.       syntax...
  57.      
  58.              <lib dir="./lib" />
  59.    -->
  60.  
  61.   <!-- A 'dir' option by itself adds any files found in the directory
  62.       to the classpath, this is useful for including all jars in a
  63.       directory.
  64.  
  65.       When a 'regex' is specified in addition to a 'dir', only the
  66.       files in that directory which completely match the regex
  67.       (anchored on both ends) will be included.
  68.  
  69.       If a 'dir' option (with or without a regex) is used and nothing
  70.       is found that matches, a warning will be logged.
  71.  
  72.       The examples below can be used to load some solr-contribs along
  73.       with their external dependencies.
  74.    -->
  75.   <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
  76.   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
  77.  
  78.   <lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />
  79.   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" />
  80.  
  81.   <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />
  82.   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />
  83.  
  84.   <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
  85.   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
  86.   <lib dir="/opt/solr/dist/" regex="solr-dataimporthandler-.*\.jar" />
  87.   <lib dir="/usr/share/java/" regex="postgresql-jdbc4-9.2.jar" />
  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.   <!-- The CodecFactory for defining the format of the inverted index.
  125.       The default implementation is SchemaCodecFactory, which is the official Lucene
  126.       index format, but hooks into the schema to provide per-field customization of
  127.       the postings lists and per-document values in the fieldType element
  128.       (postingsFormat/docValuesFormat). Note that most of the alternative implementations
  129.       are experimental, so if you choose to customize the index format, it's a good
  130.       idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
  131.       before upgrading to a newer version to avoid unnecessary reindexing.
  132.       A "compressionMode" string element can be added to <codecFactory> to choose
  133.       between the existing compression modes in the default codec: "BEST_SPEED" (default)
  134.       or "BEST_COMPRESSION".
  135.  -->
  136.   <codecFactory class="solr.SchemaCodecFactory"/>
  137.  
  138.   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  139.       Index Config - These settings control low-level behavior of indexing
  140.       Most example settings here show the default value, but are commented
  141.       out, to more easily see where customizations have been made.
  142.      
  143.       Note: This replaces <indexDefaults> and <mainIndex> from older versions
  144.       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  145.   <indexConfig>
  146.     <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
  147.         LimitTokenCountFilterFactory in your fieldType definition. E.g.
  148.     <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
  149.    -->
  150.     <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
  151.     <!-- <writeLockTimeout>1000</writeLockTimeout>  -->
  152.  
  153.     <!-- Expert: Enabling compound file will use less files for the index,
  154.         using fewer file descriptors on the expense of performance decrease.
  155.         Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
  156.     <!-- <useCompoundFile>false</useCompoundFile> -->
  157.  
  158.     <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
  159.         indexing for buffering added documents and deletions before they are
  160.         flushed to the Directory.
  161.         maxBufferedDocs sets a limit on the number of documents buffered
  162.         before flushing.
  163.         If both ramBufferSizeMB and maxBufferedDocs is set, then
  164.         Lucene will flush based on whichever limit is hit first.  -->
  165.     <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
  166.     <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
  167.  
  168.     <!-- Expert: Merge Policy
  169.         The Merge Policy in Lucene controls how merging of segments is done.
  170.         The default since Solr/Lucene 3.3 is TieredMergePolicy.
  171.         The default since Lucene 2.3 was the LogByteSizeMergePolicy,
  172.         Even older versions of Lucene used LogDocMergePolicy.
  173.      -->
  174.     <!--
  175.        <mergePolicyFactory class="org.apache.solr.index.TieredMergePolicyFactory">
  176.          <int name="maxMergeAtOnce">10</int>
  177.          <int name="segmentsPerTier">10</int>
  178.          <double name="noCFSRatio">0.1</double>
  179.        </mergePolicyFactory>
  180.      -->
  181.  
  182.     <!-- Expert: Merge Scheduler
  183.         The Merge Scheduler in Lucene controls how merges are
  184.         performed.  The ConcurrentMergeScheduler (Lucene 2.3 default)
  185.         can perform merges in the background using separate threads.
  186.         The SerialMergeScheduler (Lucene 2.2 default) does not.
  187.     -->
  188.     <!--
  189.       <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
  190.       -->
  191.  
  192.     <!-- LockFactory
  193.  
  194.         This option specifies which Lucene LockFactory implementation
  195.         to use.
  196.      
  197.         single = SingleInstanceLockFactory - suggested for a
  198.                  read-only index or when there is no possibility of
  199.                  another process trying to modify the index.
  200.         native = NativeFSLockFactory - uses OS native file locking.
  201.                  Do not use when multiple solr webapps in the same
  202.                  JVM are attempting to share a single index.
  203.         simple = SimpleFSLockFactory  - uses a plain file for locking
  204.  
  205.         Defaults: 'native' is default for Solr3.6 and later, otherwise
  206.                   'simple' is the default
  207.  
  208.         More details on the nuances of each LockFactory...
  209.         http://wiki.apache.org/lucene-java/AvailableLockFactories
  210.    -->
  211.     <lockType>${solr.lock.type:native}</lockType>
  212.  
  213.     <!-- Commit Deletion Policy
  214.         Custom deletion policies can be specified here. The class must
  215.         implement org.apache.lucene.index.IndexDeletionPolicy.
  216.  
  217.         The default Solr IndexDeletionPolicy implementation supports
  218.         deleting index commit points on number of commits, age of
  219.         commit point and optimized status.
  220.        
  221.         The latest commit point should always be preserved regardless
  222.         of the criteria.
  223.    -->
  224.     <!--
  225.    <deletionPolicy class="solr.SolrDeletionPolicy">
  226.    -->
  227.     <!-- The number of commit points to be kept -->
  228.     <!-- <str name="maxCommitsToKeep">1</str> -->
  229.     <!-- The number of optimized commit points to be kept -->
  230.     <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
  231.     <!--
  232.        Delete all commit points once they have reached the given age.
  233.        Supports DateMathParser syntax e.g.
  234.      -->
  235.     <!--
  236.       <str name="maxCommitAge">30MINUTES</str>
  237.       <str name="maxCommitAge">1DAY</str>
  238.    -->
  239.     <!--
  240.    </deletionPolicy>
  241.    -->
  242.  
  243.     <!-- Lucene Infostream
  244.      
  245.         To aid in advanced debugging, Lucene provides an "InfoStream"
  246.         of detailed information when indexing.
  247.  
  248.         Setting The value to true will instruct the underlying Lucene
  249.         IndexWriter to write its debugging info the specified file
  250.      -->
  251.     <!-- <infoStream file="INFOSTREAM.txt">false</infoStream> -->
  252.   </indexConfig>
  253.  
  254.  
  255.   <!-- JMX
  256.      
  257.       This example enables JMX if and only if an existing MBeanServer
  258.       is found, use this if you want to configure JMX through JVM
  259.       parameters. Remove this to disable exposing Solr configuration
  260.       and statistics to JMX.
  261.  
  262.       For more details see http://wiki.apache.org/solr/SolrJmx
  263.    -->
  264.   <jmx />
  265.   <!-- If you want to connect to a particular server, specify the
  266.       agentId
  267.    -->
  268.   <!-- <jmx agentId="myAgent" /> -->
  269.   <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
  270.   <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
  271.    -->
  272.  
  273.   <!-- The default high-performance update handler -->
  274.   <updateHandler class="solr.DirectUpdateHandler2">
  275.  
  276.     <!-- Enables a transaction log, used for real-time get, durability, and
  277.         and solr cloud replica recovery.  The log can grow as big as
  278.         uncommitted changes to the index, so use of a hard autoCommit
  279.         is recommended (see below).
  280.         "dir" - the target directory for transaction logs, defaults to the
  281.                solr data directory.
  282.         "numVersionBuckets" - sets the number of buckets used to keep
  283.                track of max version values when checking for re-ordered
  284.                updates; increase this value to reduce the cost of
  285.                synchronizing access to version buckets during high-volume
  286.                indexing, this requires 8 bytes (long) * numVersionBuckets
  287.                of heap space per Solr core.
  288.    -->
  289.     <updateLog>
  290.       <str name="dir">${solr.ulog.dir:}</str>
  291.       <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>
  292.     </updateLog>
  293.  
  294.     <!-- AutoCommit
  295.  
  296.         Perform a hard commit automatically under certain conditions.
  297.         Instead of enabling autoCommit, consider using "commitWithin"
  298.         when adding documents.
  299.  
  300.         http://wiki.apache.org/solr/UpdateXmlMessages
  301.  
  302.         maxDocs - Maximum number of documents to add since the last
  303.                   commit before automatically triggering a new commit.
  304.  
  305.         maxTime - Maximum amount of time in ms that is allowed to pass
  306.                   since a document was added before automatically
  307.                   triggering a new commit.
  308.         openSearcher - if false, the commit causes recent index changes
  309.           to be flushed to stable storage, but does not cause a new
  310.           searcher to be opened to make those changes visible.
  311.  
  312.         If the updateLog is enabled, then it's highly recommended to
  313.         have some sort of hard autoCommit to limit the log size.
  314.      -->
  315.     <autoCommit>
  316.       <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
  317.       <openSearcher>false</openSearcher>
  318.     </autoCommit>
  319.  
  320.     <!-- softAutoCommit is like autoCommit except it causes a
  321.         'soft' commit which only ensures that changes are visible
  322.         but does not ensure that data is synced to disk.  This is
  323.         faster and more near-realtime friendly than a hard commit.
  324.      -->
  325.  
  326.     <autoSoftCommit>
  327.       <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
  328.     </autoSoftCommit>
  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.   </updateHandler>
  363.  
  364.   <!-- IndexReaderFactory
  365.  
  366.       Use the following format to specify a custom IndexReaderFactory,
  367.       which allows for alternate IndexReader implementations.
  368.  
  369.       ** Experimental Feature **
  370.  
  371.       Please note - Using a custom IndexReaderFactory may prevent
  372.       certain other features from working. The API to
  373.       IndexReaderFactory may change without warning or may even be
  374.       removed from future releases if the problems cannot be
  375.       resolved.
  376.  
  377.  
  378.       ** Features that may not work with custom IndexReaderFactory **
  379.  
  380.       The ReplicationHandler assumes a disk-resident index. Using a
  381.       custom IndexReader implementation may cause incompatibility
  382.       with ReplicationHandler and may cause replication to not work
  383.       correctly. See SOLR-1366 for details.
  384.  
  385.    -->
  386.   <!--
  387.  <indexReaderFactory name="IndexReaderFactory" class="package.class">
  388.    <str name="someArg">Some Value</str>
  389.  </indexReaderFactory >
  390.  -->
  391.  
  392.   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  393.       Query section - these settings control query time things like caches
  394.       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  395.   <query>
  396.     <!-- Max Boolean Clauses
  397.  
  398.         Maximum number of clauses in each BooleanQuery,  an exception
  399.         is thrown if exceeded.
  400.  
  401.         ** WARNING **
  402.        
  403.         This option actually modifies a global Lucene property that
  404.         will affect all SolrCores.  If multiple solrconfig.xml files
  405.         disagree on this property, the value at any given moment will
  406.         be based on the last SolrCore to be initialized.
  407.        
  408.      -->
  409.     <maxBooleanClauses>1024</maxBooleanClauses>
  410.  
  411.  
  412.     <!-- Solr Internal Query Caches
  413.  
  414.         There are two implementations of cache available for Solr,
  415.         LRUCache, based on a synchronized LinkedHashMap, and
  416.         FastLRUCache, based on a ConcurrentHashMap.  
  417.  
  418.         FastLRUCache has faster gets and slower puts in single
  419.         threaded operation and thus is generally faster than LRUCache
  420.         when the hit ratio of the cache is high (> 75%), and may be
  421.         faster under other scenarios on multi-cpu systems.
  422.    -->
  423.  
  424.     <!-- Filter Cache
  425.  
  426.         Cache used by SolrIndexSearcher for filters (DocSets),
  427.         unordered sets of *all* documents that match a query.  When a
  428.         new searcher is opened, its caches may be prepopulated or
  429.         "autowarmed" using data from caches in the old searcher.
  430.         autowarmCount is the number of items to prepopulate.  For
  431.         LRUCache, the autowarmed items will be the most recently
  432.         accessed items.
  433.  
  434.         Parameters:
  435.           class - the SolrCache implementation LRUCache or
  436.               (LRUCache or FastLRUCache)
  437.           size - the maximum number of entries in the cache
  438.           initialSize - the initial capacity (number of entries) of
  439.               the cache.  (see java.util.HashMap)
  440.           autowarmCount - the number of entries to prepopulate from
  441.               and old cache.
  442.           maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
  443.                      to occupy. Note that when this option is specified, the size
  444.                      and initialSize parameters are ignored.
  445.      -->
  446.     <filterCache class="solr.FastLRUCache"
  447.                 size="512"
  448.                 initialSize="512"
  449.                 autowarmCount="0"/>
  450.  
  451.     <!-- Query Result Cache
  452.        
  453.         Caches results of searches - ordered lists of document ids
  454.         (DocList) based on a query, a sort, and the range of documents requested.
  455.         Additional supported parameter by LRUCache:
  456.            maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
  457.                       to occupy
  458.      -->
  459.     <queryResultCache class="solr.LRUCache"
  460.                      size="512"
  461.                      initialSize="512"
  462.                      autowarmCount="0"/>
  463.  
  464.     <!-- Document Cache
  465.  
  466.         Caches Lucene Document objects (the stored fields for each
  467.         document).  Since Lucene internal document ids are transient,
  468.         this cache will not be autowarmed.
  469.      -->
  470.     <documentCache class="solr.LRUCache"
  471.                   size="512"
  472.                   initialSize="512"
  473.                   autowarmCount="0"/>
  474.  
  475.     <!-- custom cache currently used by block join -->
  476.     <cache name="perSegFilter"
  477.           class="solr.search.LRUCache"
  478.           size="10"
  479.           initialSize="0"
  480.           autowarmCount="10"
  481.           regenerator="solr.NoOpRegenerator" />
  482.  
  483.     <!-- Field Value Cache
  484.        
  485.         Cache used to hold field values that are quickly accessible
  486.         by document id.  The fieldValueCache is created by default
  487.         even if not configured here.
  488.      -->
  489.     <!--
  490.       <fieldValueCache class="solr.FastLRUCache"
  491.                        size="512"
  492.                        autowarmCount="128"
  493.                        showItems="32" />
  494.      -->
  495.  
  496.     <!-- Custom Cache
  497.  
  498.         Example of a generic cache.  These caches may be accessed by
  499.         name through SolrIndexSearcher.getCache(),cacheLookup(), and
  500.         cacheInsert().  The purpose is to enable easy caching of
  501.         user/application level data.  The regenerator argument should
  502.         be specified as an implementation of solr.CacheRegenerator
  503.         if autowarming is desired.  
  504.      -->
  505.     <!--
  506.       <cache name="myUserCache"
  507.              class="solr.LRUCache"
  508.              size="4096"
  509.              initialSize="1024"
  510.              autowarmCount="1024"
  511.              regenerator="com.mycompany.MyRegenerator"
  512.              />
  513.      -->
  514.  
  515.  
  516.     <!-- Lazy Field Loading
  517.  
  518.         If true, stored fields that are not requested will be loaded
  519.         lazily.  This can result in a significant speed improvement
  520.         if the usual case is to not load all stored fields,
  521.         especially if the skipped fields are large compressed text
  522.         fields.
  523.    -->
  524.     <enableLazyFieldLoading>true</enableLazyFieldLoading>
  525.  
  526.     <!-- Use Filter For Sorted Query
  527.  
  528.         A possible optimization that attempts to use a filter to
  529.         satisfy a search.  If the requested sort does not include
  530.         score, then the filterCache will be checked for a filter
  531.         matching the query. If found, the filter will be used as the
  532.         source of document ids, and then the sort will be applied to
  533.         that.
  534.  
  535.         For most situations, this will not be useful unless you
  536.         frequently get the same search repeatedly with different sort
  537.         options, and none of them ever use "score"
  538.      -->
  539.     <!--
  540.       <useFilterForSortedQuery>true</useFilterForSortedQuery>
  541.      -->
  542.  
  543.     <!-- Result Window Size
  544.  
  545.         An optimization for use with the queryResultCache.  When a search
  546.         is requested, a superset of the requested number of document ids
  547.         are collected.  For example, if a search for a particular query
  548.         requests matching documents 10 through 19, and queryWindowSize is 50,
  549.         then documents 0 through 49 will be collected and cached.  Any further
  550.         requests in that range can be satisfied via the cache.  
  551.      -->
  552.     <queryResultWindowSize>20</queryResultWindowSize>
  553.  
  554.     <!-- Maximum number of documents to cache for any entry in the
  555.         queryResultCache.
  556.      -->
  557.     <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
  558.  
  559.     <!-- Query Related Event Listeners
  560.  
  561.         Various IndexSearcher related events can trigger Listeners to
  562.         take actions.
  563.  
  564.         newSearcher - fired whenever a new searcher is being prepared
  565.         and there is a current searcher handling requests (aka
  566.         registered).  It can be used to prime certain caches to
  567.         prevent long request times for certain requests.
  568.  
  569.         firstSearcher - fired whenever a new searcher is being
  570.         prepared but there is no current registered searcher to handle
  571.         requests or to gain autowarming data from.
  572.  
  573.        
  574.      -->
  575.     <!-- QuerySenderListener takes an array of NamedList and executes a
  576.         local query request for each NamedList in sequence.
  577.      -->
  578.     <listener event="newSearcher" class="solr.QuerySenderListener">
  579.       <arr name="queries">
  580.         <!--
  581.           <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
  582.           <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
  583.          -->
  584.       </arr>
  585.     </listener>
  586.     <listener event="firstSearcher" class="solr.QuerySenderListener">
  587.       <arr name="queries">
  588.         <!--
  589.        <lst>
  590.          <str name="q">static firstSearcher warming in solrconfig.xml</str>
  591.        </lst>
  592.        -->
  593.       </arr>
  594.     </listener>
  595.  
  596.     <!-- Use Cold Searcher
  597.  
  598.         If a search request comes in and there is no current
  599.         registered searcher, then immediately register the still
  600.         warming searcher and use it.  If "false" then all requests
  601.         will block until the first searcher is done warming.
  602.      -->
  603.     <useColdSearcher>false</useColdSearcher>
  604.  
  605.   </query>
  606.  
  607.  
  608.   <!-- Request Dispatcher
  609.  
  610.       This section contains instructions for how the SolrDispatchFilter
  611.       should behave when processing requests for this SolrCore.
  612.  
  613.       handleSelect is a legacy option that affects the behavior of requests
  614.       such as /select?qt=XXX
  615.  
  616.       handleSelect="true" will cause the SolrDispatchFilter to process
  617.       the request and dispatch the query to a handler specified by the
  618.       "qt" param, assuming "/select" isn't already registered.
  619.  
  620.       handleSelect="false" will cause the SolrDispatchFilter to
  621.       ignore "/select" requests, resulting in a 404 unless a handler
  622.       is explicitly registered with the name "/select"
  623.  
  624.       handleSelect="true" is not recommended for new users, but is the default
  625.       for backwards compatibility
  626.    -->
  627.   <requestDispatcher handleSelect="false" >
  628.     <!-- Request Parsing
  629.  
  630.         These settings indicate how Solr Requests may be parsed, and
  631.         what restrictions may be placed on the ContentStreams from
  632.         those requests
  633.  
  634.         enableRemoteStreaming - enables use of the stream.file
  635.         and stream.url parameters for specifying remote streams.
  636.  
  637.         multipartUploadLimitInKB - specifies the max size (in KiB) of
  638.         Multipart File Uploads that Solr will allow in a Request.
  639.        
  640.         formdataUploadLimitInKB - specifies the max size (in KiB) of
  641.         form data (application/x-www-form-urlencoded) sent via
  642.         POST. You can use POST to pass request parameters not
  643.         fitting into the URL.
  644.        
  645.         addHttpRequestToContext - if set to true, it will instruct
  646.         the requestParsers to include the original HttpServletRequest
  647.         object in the context map of the SolrQueryRequest under the
  648.         key "httpRequest". It will not be used by any of the existing
  649.         Solr components, but may be useful when developing custom
  650.         plugins.
  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.                    formdataUploadLimitInKB="2048"
  661.                    addHttpRequestToContext="false"/>
  662.  
  663.     <!-- HTTP Caching
  664.  
  665.         Set HTTP caching related parameters (for proxy caches and clients).
  666.  
  667.         The options below instruct Solr not to output any HTTP Caching
  668.         related headers
  669.      -->
  670.     <httpCaching never304="true" />
  671.     <!-- If you include a <cacheControl> directive, it will be used to
  672.         generate a Cache-Control header (as well as an Expires header
  673.         if the value contains "max-age=")
  674.        
  675.         By default, no Cache-Control header is generated.
  676.        
  677.         You can use the <cacheControl> option even if you have set
  678.         never304="true"
  679.      -->
  680.     <!--
  681.       <httpCaching never304="true" >
  682.         <cacheControl>max-age=30, public</cacheControl>
  683.       </httpCaching>
  684.      -->
  685.     <!-- To enable Solr to respond with automatically generated HTTP
  686.         Caching headers, and to response to Cache Validation requests
  687.         correctly, set the value of never304="false"
  688.        
  689.         This will cause Solr to generate Last-Modified and ETag
  690.         headers based on the properties of the Index.
  691.  
  692.         The following options can also be specified to affect the
  693.         values of these headers...
  694.  
  695.         lastModFrom - the default value is "openTime" which means the
  696.         Last-Modified value (and validation against If-Modified-Since
  697.         requests) will all be relative to when the current Searcher
  698.         was opened.  You can change it to lastModFrom="dirLastMod" if
  699.         you want the value to exactly correspond to when the physical
  700.         index was last modified.
  701.  
  702.         etagSeed="..." is an option you can change to force the ETag
  703.         header (and validation against If-None-Match requests) to be
  704.         different even if the index has not changed (ie: when making
  705.         significant changes to your config file)
  706.  
  707.         (lastModifiedFrom and etagSeed are both ignored if you use
  708.         the never304="true" option)
  709.      -->
  710.     <!--
  711.       <httpCaching lastModifiedFrom="openTime"
  712.                    etagSeed="Solr">
  713.         <cacheControl>max-age=30, public</cacheControl>
  714.       </httpCaching>
  715.      -->
  716.   </requestDispatcher>
  717.  
  718.   <!-- Request Handlers
  719.  
  720.       http://wiki.apache.org/solr/SolrRequestHandler
  721.  
  722.       Incoming queries will be dispatched to a specific handler by name
  723.       based on the path specified in the request.
  724.  
  725.       Legacy behavior: If the request path uses "/select" but no Request
  726.       Handler has that name, and if handleSelect="true" has been specified in
  727.       the requestDispatcher, then the Request Handler is dispatched based on
  728.       the qt parameter.  Handlers without a leading '/' are accessed this way
  729.       like so: http://host/app/[core/]select?qt=name  If no qt is
  730.       given, then the requestHandler that declares default="true" will be
  731.       used or the one named "standard".
  732.  
  733.       If a Request Handler is declared with startup="lazy", then it will
  734.       not be initialized until the first request that uses it.
  735.  
  736.    -->
  737.   <!-- SearchHandler
  738.  
  739.       http://wiki.apache.org/solr/SearchHandler
  740.  
  741.       For processing Search Queries, the primary Request Handler
  742.       provided with Solr is "SearchHandler" It delegates to a sequent
  743.       of SearchComponents (see below) and supports distributed
  744.       queries across multiple shards
  745.    -->
  746.   <requestHandler name="/select" class="solr.SearchHandler">
  747.     <!-- default values for query parameters can be specified, these
  748.         will be overridden by parameters in the request
  749.      -->
  750.     <lst name="defaults">
  751.       <str name="echoParams">explicit</str>
  752.       <int name="rows">10</int>
  753.       <!-- <str name="df">text</str> -->
  754.     </lst>
  755.     <!-- In addition to defaults, "appends" params can be specified
  756.         to identify values which should be appended to the list of
  757.         multi-val params from the query (or the existing "defaults").
  758.      -->
  759.     <!-- In this example, the param "fq=instock:true" would be appended to
  760.         any query time fq params the user may specify, as a mechanism for
  761.         partitioning the index, independent of any user selected filtering
  762.         that may also be desired (perhaps as a result of faceted searching).
  763.  
  764.         NOTE: there is *absolutely* nothing a client can do to prevent these
  765.         "appends" values from being used, so don't use this mechanism
  766.         unless you are sure you always want it.
  767.      -->
  768.     <!--
  769.       <lst name="appends">
  770.         <str name="fq">inStock:true</str>
  771.       </lst>
  772.      -->
  773.     <!-- "invariants" are a way of letting the Solr maintainer lock down
  774.         the options available to Solr clients.  Any params values
  775.         specified here are used regardless of what values may be specified
  776.         in either the query, the "defaults", or the "appends" params.
  777.  
  778.         In this example, the facet.field and facet.query params would
  779.         be fixed, limiting the facets clients can use.  Faceting is
  780.         not turned on by default - but if the client does specify
  781.         facet=true in the request, these are the only facets they
  782.         will be able to see counts for; regardless of what other
  783.         facet.field or facet.query params they may specify.
  784.  
  785.         NOTE: there is *absolutely* nothing a client can do to prevent these
  786.         "invariants" values from being used, so don't use this mechanism
  787.         unless you are sure you always want it.
  788.      -->
  789.     <!--
  790.       <lst name="invariants">
  791.         <str name="facet.field">cat</str>
  792.         <str name="facet.field">manu_exact</str>
  793.         <str name="facet.query">price:[* TO 500]</str>
  794.         <str name="facet.query">price:[500 TO *]</str>
  795.       </lst>
  796.      -->
  797.     <!-- If the default list of SearchComponents is not desired, that
  798.         list can either be overridden completely, or components can be
  799.         prepended or appended to the default list.  (see below)
  800.      -->
  801.     <!--
  802.       <arr name="components">
  803.         <str>nameOfCustomComponent1</str>
  804.         <str>nameOfCustomComponent2</str>
  805.       </arr>
  806.      -->
  807.   </requestHandler>
  808.  
  809.   <!-- A request handler that returns indented JSON by default -->
  810.   <requestHandler name="/query" class="solr.SearchHandler">
  811.     <lst name="defaults">
  812.       <str name="echoParams">explicit</str>
  813.       <str name="wt">json</str>
  814.       <str name="indent">true</str>
  815.     </lst>
  816.   </requestHandler>
  817.  
  818.  
  819.   <!-- A Robust Example
  820.      
  821.       This example SearchHandler declaration shows off usage of the
  822.       SearchHandler with many defaults declared
  823.  
  824.       Note that multiple instances of the same Request Handler
  825.       (SearchHandler) can be registered multiple times with different
  826.       names (and different init parameters)
  827.    -->
  828.   <requestHandler name="/browse" class="solr.SearchHandler" useParams="query,facets,velocity,browse">
  829.     <lst name="defaults">
  830.       <str name="echoParams">explicit</str>
  831.     </lst>
  832.   </requestHandler>
  833.  
  834.   <initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell,/browse">
  835.     <lst name="defaults">
  836.       <str name="df">_text_</str>
  837.     </lst>
  838.   </initParams>
  839.  
  840.   <initParams path="/update/**">
  841.     <lst name="defaults">
  842.       <str name="update.chain">add-unknown-fields-to-the-schema</str>
  843.     </lst>
  844.   </initParams>
  845.  
  846.   <!-- Solr Cell Update Request Handler
  847.  
  848.       http://wiki.apache.org/solr/ExtractingRequestHandler
  849.  
  850.    -->
  851.   <requestHandler name="/update/extract"
  852.                  startup="lazy"
  853.                  class="solr.extraction.ExtractingRequestHandler" >
  854.     <lst name="defaults">
  855.       <str name="lowernames">true</str>
  856.       <str name="fmap.meta">ignored_</str>
  857.       <str name="fmap.content">_text_</str>
  858.     </lst>
  859.   </requestHandler>
  860.  
  861.   <!-- Search Components
  862.  
  863.       Search components are registered to SolrCore and used by
  864.       instances of SearchHandler (which can access them by name)
  865.      
  866.       By default, the following components are available:
  867.      
  868.       <searchComponent name="query"     class="solr.QueryComponent" />
  869.       <searchComponent name="facet"     class="solr.FacetComponent" />
  870.       <searchComponent name="mlt"       class="solr.MoreLikeThisComponent" />
  871.       <searchComponent name="highlight" class="solr.HighlightComponent" />
  872.       <searchComponent name="stats"     class="solr.StatsComponent" />
  873.       <searchComponent name="debug"     class="solr.DebugComponent" />
  874.  
  875.       Default configuration in a requestHandler would look like:
  876.  
  877.       <arr name="components">
  878.         <str>query</str>
  879.         <str>facet</str>
  880.         <str>mlt</str>
  881.         <str>highlight</str>
  882.         <str>stats</str>
  883.         <str>debug</str>
  884.       </arr>
  885.  
  886.       If you register a searchComponent to one of the standard names,
  887.       that will be used instead of the default.
  888.  
  889.       To insert components before or after the 'standard' components, use:
  890.    
  891.       <arr name="first-components">
  892.         <str>myFirstComponentName</str>
  893.       </arr>
  894.    
  895.       <arr name="last-components">
  896.         <str>myLastComponentName</str>
  897.       </arr>
  898.  
  899.       NOTE: The component registered with the name "debug" will
  900.       always be executed after the "last-components"
  901.      
  902.     -->
  903.  
  904.   <!-- Spell Check
  905.  
  906.       The spell check component can return a list of alternative spelling
  907.       suggestions.  
  908.  
  909.       http://wiki.apache.org/solr/SpellCheckComponent
  910.    -->
  911.   <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  912.  
  913.     <str name="queryAnalyzerFieldType">text_general</str>
  914.  
  915.     <!-- Multiple "Spell Checkers" can be declared and used by this
  916.         component
  917.      -->
  918.  
  919.     <!-- a spellchecker built from a field of the main index -->
  920.     <lst name="spellchecker">
  921.       <str name="name">default</str>
  922.       <str name="field">_text_</str>
  923.       <str name="classname">solr.DirectSolrSpellChecker</str>
  924.       <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
  925.       <str name="distanceMeasure">internal</str>
  926.       <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
  927.       <float name="accuracy">0.5</float>
  928.       <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
  929.       <int name="maxEdits">2</int>
  930.       <!-- the minimum shared prefix when enumerating terms -->
  931.       <int name="minPrefix">1</int>
  932.       <!-- maximum number of inspections per result. -->
  933.       <int name="maxInspections">5</int>
  934.       <!-- minimum length of a query term to be considered for correction -->
  935.       <int name="minQueryLength">4</int>
  936.       <!-- maximum threshold of documents a query term can appear to be considered for correction -->
  937.       <float name="maxQueryFrequency">0.01</float>
  938.       <!-- uncomment this to require suggestions to occur in 1% of the documents
  939.        <float name="thresholdTokenFrequency">.01</float>
  940.      -->
  941.     </lst>
  942.  
  943.     <!-- a spellchecker that can break or combine words.  See "/spell" handler below for usage -->
  944.     <!--
  945.    <lst name="spellchecker">
  946.      <str name="name">wordbreak</str>
  947.      <str name="classname">solr.WordBreakSolrSpellChecker</str>
  948.      <str name="field">name</str>
  949.      <str name="combineWords">true</str>
  950.      <str name="breakWords">true</str>
  951.      <int name="maxChanges">10</int>
  952.    </lst>
  953.    -->
  954.   </searchComponent>
  955.  
  956.   <!-- A request handler for demonstrating the spellcheck component.  
  957.  
  958.       NOTE: This is purely as an example.  The whole purpose of the
  959.       SpellCheckComponent is to hook it into the request handler that
  960.       handles your normal user queries so that a separate request is
  961.       not needed to get suggestions.
  962.  
  963.       IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
  964.       NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
  965.      
  966.       See http://wiki.apache.org/solr/SpellCheckComponent for details
  967.       on the request parameters.
  968.    -->
  969.   <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
  970.     <lst name="defaults">
  971.       <!-- Solr will use suggestions from both the 'default' spellchecker
  972.           and from the 'wordbreak' spellchecker and combine them.
  973.           collations (re-written queries) can include a combination of
  974.           corrections from both spellcheckers -->
  975.       <str name="spellcheck.dictionary">default</str>
  976.       <str name="spellcheck">on</str>
  977.       <str name="spellcheck.extendedResults">true</str>
  978.       <str name="spellcheck.count">10</str>
  979.       <str name="spellcheck.alternativeTermCount">5</str>
  980.       <str name="spellcheck.maxResultsForSuggest">5</str>
  981.       <str name="spellcheck.collate">true</str>
  982.       <str name="spellcheck.collateExtendedResults">true</str>
  983.       <str name="spellcheck.maxCollationTries">10</str>
  984.       <str name="spellcheck.maxCollations">5</str>
  985.     </lst>
  986.     <arr name="last-components">
  987.       <str>spellcheck</str>
  988.     </arr>
  989.   </requestHandler>
  990.  
  991.   <!-- Term Vector Component
  992.  
  993.       http://wiki.apache.org/solr/TermVectorComponent
  994.    -->
  995.   <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
  996.  
  997.   <!-- A request handler for demonstrating the term vector component
  998.  
  999.       This is purely as an example.
  1000.  
  1001.       In reality you will likely want to add the component to your
  1002.       already specified request handlers.
  1003.    -->
  1004.   <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
  1005.     <lst name="defaults">
  1006.       <bool name="tv">true</bool>
  1007.     </lst>
  1008.     <arr name="last-components">
  1009.       <str>tvComponent</str>
  1010.     </arr>
  1011.   </requestHandler>
  1012.  
  1013.   <!-- Clustering Component. (Omitted here. See the default Solr example for a typical configuration.) -->
  1014.  
  1015.   <!-- Terms Component
  1016.  
  1017.       http://wiki.apache.org/solr/TermsComponent
  1018.  
  1019.       A component to return terms and document frequency of those
  1020.       terms
  1021.    -->
  1022.   <searchComponent name="terms" class="solr.TermsComponent"/>
  1023.  
  1024.   <!-- A request handler for demonstrating the terms component -->
  1025.   <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
  1026.     <lst name="defaults">
  1027.       <bool name="terms">true</bool>
  1028.       <bool name="distrib">false</bool>
  1029.     </lst>
  1030.     <arr name="components">
  1031.       <str>terms</str>
  1032.     </arr>
  1033.   </requestHandler>
  1034.  
  1035.  
  1036.   <!-- Query Elevation Component
  1037.  
  1038.       http://wiki.apache.org/solr/QueryElevationComponent
  1039.  
  1040.       a search component that enables you to configure the top
  1041.       results for a given query regardless of the normal lucene
  1042.       scoring.
  1043.    -->
  1044.   <searchComponent name="elevator" class="solr.QueryElevationComponent" >
  1045.     <!-- pick a fieldType to analyze queries -->
  1046.     <str name="queryFieldType">string</str>
  1047.     <str name="config-file">elevate.xml</str>
  1048.   </searchComponent>
  1049.  
  1050.   <!-- A request handler for demonstrating the elevator component -->
  1051.   <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
  1052.     <lst name="defaults">
  1053.       <str name="echoParams">explicit</str>
  1054.     </lst>
  1055.     <arr name="last-components">
  1056.       <str>elevator</str>
  1057.     </arr>
  1058.   </requestHandler>
  1059.  
  1060.   <!-- Highlighting Component
  1061.  
  1062.       http://wiki.apache.org/solr/HighlightingParameters
  1063.    -->
  1064.   <searchComponent class="solr.HighlightComponent" name="highlight">
  1065.     <highlighting>
  1066.       <!-- Configure the standard fragmenter -->
  1067.       <!-- This could most likely be commented out in the "default" case -->
  1068.       <fragmenter name="gap"
  1069.                  default="true"
  1070.                  class="solr.highlight.GapFragmenter">
  1071.         <lst name="defaults">
  1072.           <int name="hl.fragsize">100</int>
  1073.         </lst>
  1074.       </fragmenter>
  1075.  
  1076.       <!-- A regular-expression-based fragmenter
  1077.           (for sentence extraction)
  1078.        -->
  1079.       <fragmenter name="regex"
  1080.                  class="solr.highlight.RegexFragmenter">
  1081.         <lst name="defaults">
  1082.           <!-- slightly smaller fragsizes work better because of slop -->
  1083.           <int name="hl.fragsize">70</int>
  1084.           <!-- allow 50% slop on fragment sizes -->
  1085.           <float name="hl.regex.slop">0.5</float>
  1086.           <!-- a basic sentence pattern -->
  1087.           <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
  1088.         </lst>
  1089.       </fragmenter>
  1090.  
  1091.       <!-- Configure the standard formatter -->
  1092.       <formatter name="html"
  1093.                 default="true"
  1094.                 class="solr.highlight.HtmlFormatter">
  1095.         <lst name="defaults">
  1096.           <str name="hl.simple.pre"><![CDATA[<em>]]></str>
  1097.           <str name="hl.simple.post"><![CDATA[</em>]]></str>
  1098.         </lst>
  1099.       </formatter>
  1100.  
  1101.       <!-- Configure the standard encoder -->
  1102.       <encoder name="html"
  1103.               class="solr.highlight.HtmlEncoder" />
  1104.  
  1105.       <!-- Configure the standard fragListBuilder -->
  1106.       <fragListBuilder name="simple"
  1107.                       class="solr.highlight.SimpleFragListBuilder"/>
  1108.  
  1109.       <!-- Configure the single fragListBuilder -->
  1110.       <fragListBuilder name="single"
  1111.                       class="solr.highlight.SingleFragListBuilder"/>
  1112.  
  1113.       <!-- Configure the weighted fragListBuilder -->
  1114.       <fragListBuilder name="weighted"
  1115.                       default="true"
  1116.                       class="solr.highlight.WeightedFragListBuilder"/>
  1117.  
  1118.       <!-- default tag FragmentsBuilder -->
  1119.       <fragmentsBuilder name="default"
  1120.                        default="true"
  1121.                        class="solr.highlight.ScoreOrderFragmentsBuilder">
  1122.         <!--
  1123.        <lst name="defaults">
  1124.          <str name="hl.multiValuedSeparatorChar">/</str>
  1125.        </lst>
  1126.        -->
  1127.       </fragmentsBuilder>
  1128.  
  1129.       <!-- multi-colored tag FragmentsBuilder -->
  1130.       <fragmentsBuilder name="colored"
  1131.                        class="solr.highlight.ScoreOrderFragmentsBuilder">
  1132.         <lst name="defaults">
  1133.           <str name="hl.tag.pre"><![CDATA[
  1134.               <b style="background:yellow">,<b style="background:lawgreen">,
  1135.               <b style="background:aquamarine">,<b style="background:magenta">,
  1136.               <b style="background:palegreen">,<b style="background:coral">,
  1137.               <b style="background:wheat">,<b style="background:khaki">,
  1138.               <b style="background:lime">,<b style="background:deepskyblue">]]></str>
  1139.           <str name="hl.tag.post"><![CDATA[</b>]]></str>
  1140.         </lst>
  1141.       </fragmentsBuilder>
  1142.  
  1143.       <boundaryScanner name="default"
  1144.                       default="true"
  1145.                       class="solr.highlight.SimpleBoundaryScanner">
  1146.         <lst name="defaults">
  1147.           <str name="hl.bs.maxScan">10</str>
  1148.           <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
  1149.         </lst>
  1150.       </boundaryScanner>
  1151.  
  1152.       <boundaryScanner name="breakIterator"
  1153.                       class="solr.highlight.BreakIteratorBoundaryScanner">
  1154.         <lst name="defaults">
  1155.           <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
  1156.           <str name="hl.bs.type">WORD</str>
  1157.           <!-- language and country are used when constructing Locale object.  -->
  1158.           <!-- And the Locale object will be used when getting instance of BreakIterator -->
  1159.           <str name="hl.bs.language">en</str>
  1160.           <str name="hl.bs.country">US</str>
  1161.         </lst>
  1162.       </boundaryScanner>
  1163.     </highlighting>
  1164.   </searchComponent>
  1165.  
  1166.   <!-- Update Processors
  1167.  
  1168.       Chains of Update Processor Factories for dealing with Update
  1169.       Requests can be declared, and then used by name in Update
  1170.       Request Processors
  1171.  
  1172.       http://wiki.apache.org/solr/UpdateRequestProcessor
  1173.  
  1174.    -->
  1175.  
  1176.   <!-- Add unknown fields to the schema
  1177.  
  1178.       An example field type guessing update processor that will
  1179.       attempt to parse string-typed field values as Booleans, Longs,
  1180.       Doubles, or Dates, and then add schema fields with the guessed
  1181.       field types.  
  1182.      
  1183.       This requires that the schema is both managed and mutable, by
  1184.       declaring schemaFactory as ManagedIndexSchemaFactory, with
  1185.       mutable specified as true.
  1186.      
  1187.       See http://wiki.apache.org/solr/GuessingFieldTypes
  1188.    -->
  1189.   <updateRequestProcessorChain name="add-unknown-fields-to-the-schema">
  1190.     <!-- UUIDUpdateProcessorFactory will generate an id if none is present in the incoming document -->
  1191.     <processor class="solr.UUIDUpdateProcessorFactory" />
  1192.     <processor class="solr.RemoveBlankFieldUpdateProcessorFactory"/>
  1193.     <processor class="solr.FieldNameMutatingUpdateProcessorFactory">
  1194.       <str name="pattern">[^\w-\.]</str>
  1195.       <str name="replacement">_</str>
  1196.     </processor>
  1197.     <processor class="solr.ParseBooleanFieldUpdateProcessorFactory"/>
  1198.     <processor class="solr.ParseLongFieldUpdateProcessorFactory"/>
  1199.     <processor class="solr.ParseDoubleFieldUpdateProcessorFactory"/>
  1200.     <processor class="solr.ParseDateFieldUpdateProcessorFactory">
  1201.       <arr name="format">
  1202.         <str>yyyy-MM-dd'T'HH:mm:ss.SSSZ</str>
  1203.         <str>yyyy-MM-dd'T'HH:mm:ss,SSSZ</str>
  1204.         <str>yyyy-MM-dd'T'HH:mm:ss.SSS</str>
  1205.         <str>yyyy-MM-dd'T'HH:mm:ss,SSS</str>
  1206.         <str>yyyy-MM-dd'T'HH:mm:ssZ</str>
  1207.         <str>yyyy-MM-dd'T'HH:mm:ss</str>
  1208.         <str>yyyy-MM-dd'T'HH:mmZ</str>
  1209.         <str>yyyy-MM-dd'T'HH:mm</str>
  1210.         <str>yyyy-MM-dd HH:mm:ss.SSSZ</str>
  1211.         <str>yyyy-MM-dd HH:mm:ss,SSSZ</str>
  1212.         <str>yyyy-MM-dd HH:mm:ss.SSS</str>
  1213.         <str>yyyy-MM-dd HH:mm:ss,SSS</str>
  1214.         <str>yyyy-MM-dd HH:mm:ssZ</str>
  1215.         <str>yyyy-MM-dd HH:mm:ss</str>
  1216.         <str>yyyy-MM-dd HH:mmZ</str>
  1217.         <str>yyyy-MM-dd HH:mm</str>
  1218.         <str>yyyy-MM-dd</str>
  1219.       </arr>
  1220.     </processor>
  1221.     <processor class="solr.AddSchemaFieldsUpdateProcessorFactory">
  1222.       <str name="defaultFieldType">strings</str>
  1223.       <lst name="typeMapping">
  1224.         <str name="valueClass">java.lang.Boolean</str>
  1225.         <str name="fieldType">booleans</str>
  1226.       </lst>
  1227.       <lst name="typeMapping">
  1228.         <str name="valueClass">java.util.Date</str>
  1229.         <str name="fieldType">tdates</str>
  1230.       </lst>
  1231.       <lst name="typeMapping">
  1232.         <str name="valueClass">java.lang.Long</str>
  1233.         <str name="valueClass">java.lang.Integer</str>
  1234.         <str name="fieldType">tlongs</str>
  1235.       </lst>
  1236.       <lst name="typeMapping">
  1237.         <str name="valueClass">java.lang.Number</str>
  1238.         <str name="fieldType">tdoubles</str>
  1239.       </lst>
  1240.     </processor>
  1241.     <processor class="solr.LogUpdateProcessorFactory"/>
  1242.     <processor class="solr.DistributedUpdateProcessorFactory"/>
  1243.     <processor class="solr.RunUpdateProcessorFactory"/>
  1244.   </updateRequestProcessorChain>
  1245.  
  1246.   <!-- Deduplication
  1247.  
  1248.       An example dedup update processor that creates the "id" field
  1249.       on the fly based on the hash code of some other fields.  This
  1250.       example has overwriteDupes set to false since we are using the
  1251.       id field as the signatureField and Solr will maintain
  1252.       uniqueness based on that anyway.  
  1253.      
  1254.    -->
  1255.   <!--
  1256.     <updateRequestProcessorChain name="dedupe">
  1257.       <processor class="solr.processor.SignatureUpdateProcessorFactory">
  1258.         <bool name="enabled">true</bool>
  1259.         <str name="signatureField">id</str>
  1260.         <bool name="overwriteDupes">false</bool>
  1261.         <str name="fields">name,features,cat</str>
  1262.         <str name="signatureClass">solr.processor.Lookup3Signature</str>
  1263.       </processor>
  1264.       <processor class="solr.LogUpdateProcessorFactory" />
  1265.       <processor class="solr.RunUpdateProcessorFactory" />
  1266.     </updateRequestProcessorChain>
  1267.    -->
  1268.  
  1269.   <!-- Language identification
  1270.  
  1271.       This example update chain identifies the language of the incoming
  1272.       documents using the langid contrib. The detected language is
  1273.       written to field language_s. No field name mapping is done.
  1274.       The fields used for detection are text, title, subject and description,
  1275.       making this example suitable for detecting languages form full-text
  1276.       rich documents injected via ExtractingRequestHandler.
  1277.       See more about langId at http://wiki.apache.org/solr/LanguageDetection
  1278.    -->
  1279.   <!--
  1280.   <updateRequestProcessorChain name="langid">
  1281.     <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
  1282.       <str name="langid.fl">text,title,subject,description</str>
  1283.       <str name="langid.langField">language_s</str>
  1284.       <str name="langid.fallback">en</str>
  1285.     </processor>
  1286.     <processor class="solr.LogUpdateProcessorFactory" />
  1287.     <processor class="solr.RunUpdateProcessorFactory" />
  1288.   </updateRequestProcessorChain>
  1289.  -->
  1290.  
  1291.   <!-- Script update processor
  1292.  
  1293.    This example hooks in an update processor implemented using JavaScript.
  1294.  
  1295.    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
  1296.  -->
  1297.   <!--
  1298.    <updateRequestProcessorChain name="script">
  1299.      <processor class="solr.StatelessScriptUpdateProcessorFactory">
  1300.        <str name="script">update-script.js</str>
  1301.        <lst name="params">
  1302.          <str name="config_param">example config parameter</str>
  1303.        </lst>
  1304.      </processor>
  1305.      <processor class="solr.RunUpdateProcessorFactory" />
  1306.    </updateRequestProcessorChain>
  1307.  -->
  1308.  
  1309.   <!-- Response Writers
  1310.  
  1311.       http://wiki.apache.org/solr/QueryResponseWriter
  1312.  
  1313.       Request responses will be written using the writer specified by
  1314.       the 'wt' request parameter matching the name of a registered
  1315.       writer.
  1316.  
  1317.       The "default" writer is the default and will be used if 'wt' is
  1318.       not specified in the request.
  1319.    -->
  1320.   <!-- The following response writers are implicitly configured unless
  1321.       overridden...
  1322.    -->
  1323.   <!--
  1324.     <queryResponseWriter name="xml"
  1325.                          default="true"
  1326.                          class="solr.XMLResponseWriter" />
  1327.     <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
  1328.     <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
  1329.     <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
  1330.     <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
  1331.     <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
  1332.     <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
  1333.     <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
  1334.    -->
  1335.  
  1336.   <queryResponseWriter name="json" class="solr.JSONResponseWriter">
  1337.     <!-- For the purposes of the tutorial, JSON responses are written as
  1338.     plain text so that they are easy to read in *any* browser.
  1339.     If you expect a MIME type of "application/json" just remove this override.
  1340.    -->
  1341.     <str name="content-type">text/plain; charset=UTF-8</str>
  1342.   </queryResponseWriter>
  1343.  
  1344.   <!--
  1345.     Custom response writers can be declared as needed...
  1346.    -->
  1347.   <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy">
  1348.     <str name="template.base.dir">${velocity.template.base.dir:}</str>
  1349.     <str name="solr.resource.loader.enabled">${velocity.solr.resource.loader.enabled:true}</str>
  1350.     <str name="params.resource.loader.enabled">${velocity.params.resource.loader.enabled:false}</str>
  1351.   </queryResponseWriter>
  1352.  
  1353.   <!-- XSLT response writer transforms the XML output by any xslt file found
  1354.       in Solr's conf/xslt directory.  Changes to xslt files are checked for
  1355.       every xsltCacheLifetimeSeconds.  
  1356.    -->
  1357.   <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
  1358.     <int name="xsltCacheLifetimeSeconds">5</int>
  1359.   </queryResponseWriter>
  1360.  
  1361.   <!-- Query Parsers
  1362.  
  1363.       https://cwiki.apache.org/confluence/display/solr/Query+Syntax+and+Parsing
  1364.  
  1365.       Multiple QParserPlugins can be registered by name, and then
  1366.       used in either the "defType" param for the QueryComponent (used
  1367.       by SearchHandler) or in LocalParams
  1368.    -->
  1369.   <!-- example of registering a query parser -->
  1370.   <!--
  1371.     <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
  1372.    -->
  1373.  
  1374.   <!-- Function Parsers
  1375.  
  1376.       http://wiki.apache.org/solr/FunctionQuery
  1377.  
  1378.       Multiple ValueSourceParsers can be registered by name, and then
  1379.       used as function names when using the "func" QParser.
  1380.    -->
  1381.   <!-- example of registering a custom function parser  -->
  1382.   <!--
  1383.     <valueSourceParser name="myfunc"
  1384.                        class="com.mycompany.MyValueSourceParser" />
  1385.    -->
  1386.  
  1387.  
  1388.   <!-- Document Transformers
  1389.       http://wiki.apache.org/solr/DocTransformers
  1390.    -->
  1391.   <!--
  1392.     Could be something like:
  1393.     <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
  1394.       <int name="connection">jdbc://....</int>
  1395.     </transformer>
  1396.    
  1397.     To add a constant value to all docs, use:
  1398.     <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
  1399.       <int name="value">5</int>
  1400.     </transformer>
  1401.    
  1402.     If you want the user to still be able to change it with _value:something_ use this:
  1403.     <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
  1404.       <double name="defaultValue">5</double>
  1405.     </transformer>
  1406.  
  1407.      If you are using the QueryElevationComponent, you may wish to mark documents that get boosted.  The
  1408.      EditorialMarkerFactory will do exactly that:
  1409.     <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
  1410.    -->
  1411.   <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
  1412.     <lst name="defaults">
  1413.       <str name="config">db-data-config.xml</str>
  1414.     </lst>
  1415.   </requestHandler>
  1416.  
  1417. </config>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement