Advertisement
Guest User

solrconfig.xml for atomic update issue

a guest
May 21st, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 9.66 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2.  
  3. <config>
  4.   <luceneMatchVersion>7.3.1</luceneMatchVersion>
  5.  
  6.   <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
  7.   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
  8.   <lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />
  9.   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" />
  10.   <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />
  11.   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />
  12.   <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
  13.   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
  14.   <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" regex=".*\.jar" />
  15.   <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" regex=".*\.jar" />
  16.   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-analysis-extras-\d.*\.jar" />
  17.    
  18.   <dataDir>${solr.data.dir:}</dataDir>
  19.    
  20.   <directoryFactory name="DirectoryFactory"
  21.                    class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
  22.  
  23.   <codecFactory class="solr.SchemaCodecFactory"/>
  24.  
  25.   <indexConfig>
  26.     <!-- <writeLockTimeout>1000</writeLockTimeout>  -->
  27.     <!-- <useCompoundFile>false</useCompoundFile> -->
  28.     <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
  29.     <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
  30.     <!--
  31.        <mergePolicyFactory class="org.apache.solr.index.TieredMergePolicyFactory">
  32.          <int name="maxMergeAtOnce">10</int>
  33.          <int name="segmentsPerTier">10</int>
  34.          <double name="noCFSRatio">0.1</double>
  35.        </mergePolicyFactory>
  36.      -->
  37.     <!--
  38.       <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
  39.       -->
  40.  
  41.     <lockType>${solr.lock.type:native}</lockType>
  42.  
  43.     <!--
  44.    <deletionPolicy class="solr.SolrDeletionPolicy">
  45.    -->
  46.     <!-- <str name="maxCommitsToKeep">1</str> -->
  47.     <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
  48.     <!--
  49.       <str name="maxCommitAge">30MINUTES</str>
  50.       <str name="maxCommitAge">1DAY</str>
  51.    -->
  52.     <!--
  53.    </deletionPolicy>
  54.    -->
  55.  
  56.     <!-- <infoStream file="INFOSTREAM.txt">false</infoStream> -->
  57.   </indexConfig>
  58.  
  59.  
  60.   <!-- JMX
  61.  
  62.       This example enables JMX if and only if an existing MBeanServer
  63.       is found, use this if you want to configure JMX through JVM
  64.       parameters. Remove this to disable exposing Solr configuration
  65.       and statistics to JMX.
  66.  
  67.       For more details see http://wiki.apache.org/solr/SolrJmx
  68.    -->
  69.   <jmx />
  70.   <!-- If you want to connect to a particular server, specify the
  71.       agentId
  72.    -->
  73.   <!-- <jmx agentId="myAgent" /> -->
  74.   <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
  75.   <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
  76.    -->
  77.  
  78.   <!-- The default high-performance update handler -->
  79.   <updateHandler class="solr.DirectUpdateHandler2">
  80.  
  81.     <updateLog>
  82.       <str name="dir">${solr.ulog.dir:}</str>
  83.       <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>
  84.     </updateLog>
  85.  
  86.     <autoCommit>
  87.       <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
  88.       <openSearcher>false</openSearcher>
  89.     </autoCommit>
  90.  
  91.     <autoSoftCommit>
  92.       <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
  93.     </autoSoftCommit>
  94.  
  95.   </updateHandler>
  96.    
  97.   <query>
  98.  
  99.     <maxBooleanClauses>1024</maxBooleanClauses>
  100.  
  101.     <!-- Filter Cache
  102.  
  103.         Cache used by SolrIndexSearcher for filters (DocSets),
  104.         unordered sets of *all* documents that match a query.  When a
  105.         new searcher is opened, its caches may be prepopulated or
  106.         "autowarmed" using data from caches in the old searcher.
  107.         autowarmCount is the number of items to prepopulate.  For
  108.         LRUCache, the autowarmed items will be the most recently
  109.         accessed items.
  110.  
  111.         Parameters:
  112.           class - the SolrCache implementation LRUCache or
  113.               (LRUCache or FastLRUCache)
  114.           size - the maximum number of entries in the cache
  115.           initialSize - the initial capacity (number of entries) of
  116.               the cache.  (see java.util.HashMap)
  117.           autowarmCount - the number of entries to prepopulate from
  118.               and old cache.
  119.           maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
  120.                      to occupy. Note that when this option is specified, the size
  121.                      and initialSize parameters are ignored.
  122.      -->
  123.     <filterCache class="solr.FastLRUCache"
  124.                 size="512"
  125.                 initialSize="512"
  126.                 autowarmCount="0"/>
  127.  
  128.     <!-- Query Result Cache
  129.  
  130.         Caches results of searches - ordered lists of document ids
  131.         (DocList) based on a query, a sort, and the range of documents requested.
  132.         Additional supported parameter by LRUCache:
  133.            maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
  134.                       to occupy
  135.      -->
  136.     <queryResultCache class="solr.LRUCache"
  137.                      size="512"
  138.                      initialSize="512"
  139.                      autowarmCount="0"/>
  140.  
  141.     <!-- Document Cache
  142.  
  143.         Caches Lucene Document objects (the stored fields for each
  144.         document).  Since Lucene internal document ids are transient,
  145.         this cache will not be autowarmed.
  146.      -->
  147.     <documentCache class="solr.LRUCache"
  148.                   size="512"
  149.                   initialSize="512"
  150.                   autowarmCount="0"/>
  151.  
  152.     <!-- custom cache currently used by block join -->
  153.     <cache name="perSegFilter"
  154.           class="solr.search.LRUCache"
  155.           size="10"
  156.           initialSize="0"
  157.           autowarmCount="10"
  158.           regenerator="solr.NoOpRegenerator" />
  159.  
  160.     <!-- Field Value Cache
  161.  
  162.         Cache used to hold field values that are quickly accessible
  163.         by document id.  The fieldValueCache is created by default
  164.         even if not configured here.
  165.      -->
  166.     <!--
  167.       <fieldValueCache class="solr.FastLRUCache"
  168.                        size="512"
  169.                        autowarmCount="128"
  170.                        showItems="32" />
  171.      -->
  172.  
  173.       <!-- since we have very few and only small stored fields do not lazy load anything -->
  174.     <enableLazyFieldLoading>false</enableLazyFieldLoading>
  175.  
  176.     <!-- Use Filter For Sorted Query
  177.  
  178.         A possible optimization that attempts to use a filter to
  179.         satisfy a search.  If the requested sort does not include
  180.         score, then the filterCache will be checked for a filter
  181.         matching the query. If found, the filter will be used as the
  182.         source of document ids, and then the sort will be applied to
  183.         that.
  184.  
  185.         For most situations, this will not be useful unless you
  186.         frequently get the same search repeatedly with different sort
  187.         options, and none of them ever use "score"
  188.      -->
  189.     <!--
  190.       <useFilterForSortedQuery>true</useFilterForSortedQuery>
  191.      -->
  192.  
  193.     <!-- Result Window Size
  194.  
  195.         An optimization for use with the queryResultCache.  When a search
  196.         is requested, a superset of the requested number of document ids
  197.         are collected.  For example, if a search for a particular query
  198.         requests matching documents 10 through 19, and queryWindowSize is 50,
  199.         then documents 0 through 49 will be collected and cached.  Any further
  200.         requests in that range can be satisfied via the cache.
  201.      -->
  202.     <queryResultWindowSize>20</queryResultWindowSize>
  203.  
  204.     <!-- Maximum number of documents to cache for any entry in the
  205.         queryResultCache.
  206.      -->
  207.     <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
  208.  
  209.     <useColdSearcher>false</useColdSearcher>
  210.  
  211.   </query>
  212.  
  213.  
  214.   <requestDispatcher>
  215.  
  216.     <!-- HTTP Caching
  217.  
  218.         Set HTTP caching related parameters (for proxy caches and clients).
  219.      -->
  220.     <httpCaching never304="true" />
  221.    <!--<httpCaching never304="false" lastModifiedFrom="openTime" etagSeed="tca7">-->
  222.      <!--<cacheControl>max-age=30, public</cacheControl>-->
  223.    <!--</httpCaching>-->
  224.   </requestDispatcher>
  225.    
  226.    
  227.   <requestHandler name="/query" class="solr.SearchHandler">
  228.      
  229.     <lst name="defaults">
  230.         <!--<str name="df">text</str> -->
  231.       <str name="echoParams">explicit</str>
  232.       <str name="wt">json</str>
  233.       <str name="indent">true</str>
  234.       <!--<int name="rows">10</int>-->
  235.     </lst>
  236.      
  237.        <arr name="components">
  238.          <str>query</str>
  239.          <!--<str>facet</str>-->
  240.          <!--<str>mlt</str>-->
  241.          <!--<str>highlight</str>-->
  242.          <str>stats</str>
  243.          <str>debug</str>
  244.        </arr>
  245.   </requestHandler>
  246.  
  247.   <!--<initParams path="/update/**,/query">-->
  248.     <!--<lst name="defaults">-->
  249.       <!--<str name="df">_text_</str>-->
  250.     <!--</lst>-->
  251.   <!--</initParams>-->
  252.  
  253.  
  254.   <!-- The update.autoCreateFields property can be turned to false to disable schemaless mode -->
  255.   <updateRequestProcessorChain name="default-chain" default="${update.autoCreateFields:true}">
  256.     <processor class="solr.LogUpdateProcessorFactory"/>
  257.     <processor class="solr.DistributedUpdateProcessorFactory"/>
  258.     <processor class="solr.RunUpdateProcessorFactory"/>
  259.   </updateRequestProcessorChain>
  260.  
  261.  
  262.   <queryResponseWriter name="json" class="solr.JSONResponseWriter" default="true">
  263.     <!--<str name="content-type">text/plain; charset=UTF-8</str>-->
  264.   </queryResponseWriter>
  265.  
  266. </config>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement