Advertisement
allisonc

solrconfig.xml

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