Guest User

Solr config

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