Advertisement
Guest User

solrconfig.xml

a guest
Mar 2nd, 2014
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 25.45 KB | None | 0 0
  1. <!--
  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. <!--
  25. In all configuration below, a prefix of "solr." for class names
  26.       is an alias that causes solr to search appropriate packages,
  27.       including org.apache.solr.(search|update|request|core|analysis)
  28.  
  29.       You may also specify a fully qualified Java classname if you
  30.       have your own custom plugins.
  31.    
  32. -->
  33. <!--
  34. Controls what version of Lucene various components of Solr
  35.       adhere to.  Generally, you want to use the latest version to
  36.       get all bug fixes and improvements. It is highly recommended
  37.       that you fully re-index after changing this setting as it can
  38.       affect both how text is indexed and queried.
  39.  
  40. -->
  41. <luceneMatchVersion>LUCENE_41</luceneMatchVersion>
  42. <!--
  43. <lib/> directives can be used to instruct Solr to load an Jars
  44.       identified and use them to resolve any "plugins" specified in
  45.       your solrconfig.xml or schema.xml (ie: Analyzers, Request
  46.       Handlers, etc...).
  47.  
  48.       All directories and paths are resolved relative to the
  49.       instanceDir.
  50.  
  51.       Please note that <lib/> directives are processed in the order
  52.       that they appear in your solrconfig.xml file, and are "stacked"
  53.       on top of each other when building a ClassLoader - so if you have
  54.       plugin jars with dependencies on other jars, the "lower level"
  55.       dependency jars should be loaded first.
  56.  
  57.       If a "./lib" directory exists in your instanceDir, all files
  58.       found in it are included as if you had used the following
  59.       syntax...
  60.      
  61.              <lib dir="./lib" />
  62.    
  63. -->
  64. <dataDir>${solr.data.dir:}</dataDir>
  65. <!--
  66. The DirectoryFactory to use for indexes.
  67.      
  68.       solr.StandardDirectoryFactory is filesystem
  69.       based and tries to pick the best implementation for the current
  70.       JVM and platform.  solr.NRTCachingDirectoryFactory, the default,
  71.       wraps solr.StandardDirectoryFactory and caches small files in memory
  72.       for better NRT performance.
  73.  
  74.       One can force a particular implementation via solr.MMapDirectoryFactory,
  75.       solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
  76.  
  77.       solr.RAMDirectoryFactory is memory based, not
  78.       persistent, and doesn't work with replication.
  79.    
  80. -->
  81. <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
  82. <!--
  83. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  84.       Index Config - These settings control low-level behavior of indexing
  85.       Most example settings here show the default value, but are commented
  86.       out, to more easily see where customizations have been made.
  87.      
  88.       Note: This replaces <indexDefaults> and <mainIndex> from older versions
  89.       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  90. -->
  91. <indexConfig>
  92. <!--
  93. maxFieldLength was removed in 4.0. To get similar behavior, include a
  94.         LimitTokenCountFilterFactory in your fieldType definition. E.g.
  95.     <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
  96.    
  97. -->
  98. <!--
  99. Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000
  100. -->
  101. <!--  <writeLockTimeout>1000</writeLockTimeout>   -->
  102. <!--
  103. The maximum number of simultaneous threads that may be
  104.         indexing documents at once in IndexWriter; if more than this
  105.         many threads arrive they will wait for others to finish.
  106.         Default in Solr/Lucene is 8.
  107. -->
  108. <maxIndexingThreads>2</maxIndexingThreads>
  109. <useCompoundFile>true</useCompoundFile>
  110. <!--
  111. ramBufferSizeMB sets the amount of RAM that may be used by Lucene
  112.         indexing for buffering added documents and deletions before they are
  113.         flushed to the Directory.
  114.         maxBufferedDocs sets a limit on the number of documents buffered
  115.         before flushing.
  116.         If both ramBufferSizeMB and maxBufferedDocs is set, then
  117.         Lucene will flush based on whichever limit is hit first.  
  118. -->
  119. <ramBufferSizeMB>20</ramBufferSizeMB>
  120. -->
  121. <maxBufferedDocs>10000</maxBufferedDocs>
  122. <!--
  123. Expert: Merge Policy
  124.         The Merge Policy in Lucene controls how merging of segments is done.
  125.         The default since Solr/Lucene 3.3 is TieredMergePolicy.
  126.         The default since Lucene 2.3 was the LogByteSizeMergePolicy,
  127.         Even older versions of Lucene used LogDocMergePolicy.
  128.      
  129. -->
  130. <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
  131. <int name="maxMergeAtOnce">4</int>
  132. <int name="segmentsPerTier">4</int>
  133. </mergePolicy>
  134. <unlockOnStartup>true</unlockOnStartup>
  135. </indexConfig>
  136. <updateHandler class="solr.DirectUpdateHandler2">
  137. <!--
  138. Enables a transaction log, used for real-time get, durability, and
  139.         and solr cloud replica recovery.  The log can grow as big as
  140.         uncommitted changes to the index, so use of a hard autoCommit
  141.         is recommended (see below).
  142.         "dir" - the target directory for transaction logs, defaults to the
  143.                solr data directory.  
  144. -->
  145. <updateLog>
  146. <str name="dir">${solr.ulog.dir:}</str>
  147. </updateLog>
  148. <autoCommit>
  149. <maxTime>15000</maxTime>
  150. <openSearcher>false</openSearcher>
  151. </autoCommit>
  152. <autoSoftCommit>
  153. <maxTime>5000</maxTime>
  154. </autoSoftCommit>
  155. </updateHandler>
  156. <query>
  157. <maxBooleanClauses>1024</maxBooleanClauses>
  158. <!--
  159. Solr Internal Query Caches
  160.  
  161.         There are two implementations of cache available for Solr,
  162.         LRUCache, based on a synchronized LinkedHashMap, and
  163.         FastLRUCache, based on a ConcurrentHashMap.  
  164.  
  165.         FastLRUCache has faster gets and slower puts in single
  166.         threaded operation and thus is generally faster than LRUCache
  167.         when the hit ratio of the cache is high (> 75%), and may be
  168.         faster under other scenarios on multi-cpu systems.
  169.    
  170. -->
  171. <!--
  172. Filter Cache
  173.  
  174.         Cache used by SolrIndexSearcher for filters (DocSets),
  175.         unordered sets of *all* documents that match a query.  When a
  176.         new searcher is opened, its caches may be prepopulated or
  177.         "autowarmed" using data from caches in the old searcher.
  178.         autowarmCount is the number of items to prepopulate.  For
  179.         LRUCache, the autowarmed items will be the most recently
  180.         accessed items.
  181.  
  182.         Parameters:
  183.           class - the SolrCache implementation LRUCache or
  184.               (LRUCache or FastLRUCache)
  185.           size - the maximum number of entries in the cache
  186.           initialSize - the initial capacity (number of entries) of
  187.               the cache.  (see java.util.HashMap)
  188.           autowarmCount - the number of entries to prepopulate from
  189.               and old cache.  
  190.      
  191. -->
  192. <filterCache class="solr.FastLRUCache" size="512" initialSize="512" autowarmCount="0"/>
  193. <!--
  194. Query Result Cache
  195.        
  196.         Caches results of searches - ordered lists of document ids
  197.         (DocList) based on a query, a sort, and the range of documents requested.  
  198.      
  199. -->
  200. <queryResultCache class="solr.LRUCache" size="512" initialSize="512" autowarmCount="0"/>
  201. <!--
  202. Document Cache
  203.  
  204.         Caches Lucene Document objects (the stored fields for each
  205.         document).  Since Lucene internal document ids are transient,
  206.         this cache will not be autowarmed.  
  207.      
  208. -->
  209. <documentCache class="solr.LRUCache" size="512" initialSize="512" autowarmCount="0"/>
  210. <!--
  211. Lazy Field Loading
  212.  
  213.         If true, stored fields that are not requested will be loaded
  214.         lazily.  This can result in a significant speed improvement
  215.         if the usual case is to not load all stored fields,
  216.         especially if the skipped fields are large compressed text
  217.         fields.
  218.    
  219. -->
  220. <enableLazyFieldLoading>true</enableLazyFieldLoading>
  221. <!--
  222. Use Filter For Sorted Query
  223.  
  224.        A possible optimization that attempts to use a filter to
  225.        satisfy a search.  If the requested sort does not include
  226.        score, then the filterCache will be checked for a filter
  227.        matching the query. If found, the filter will be used as the
  228.        source of document ids, and then the sort will be applied to
  229.        that.
  230.  
  231.        For most situations, this will not be useful unless you
  232.        frequently get the same search repeatedly with different sort
  233.        options, and none of them ever use "score"
  234.    
  235. -->
  236. <!--
  237.  
  238.      <useFilterForSortedQuery>true</useFilterForSortedQuery>
  239.    
  240. -->
  241. <!--
  242. Result Window Size
  243.  
  244.        An optimization for use with the queryResultCache.  When a search
  245.        is requested, a superset of the requested number of document ids
  246.        are collected.  For example, if a search for a particular query
  247.        requests matching documents 10 through 19, and queryWindowSize is 50,
  248.        then documents 0 through 49 will be collected and cached.  Any further
  249.        requests in that range can be satisfied via the cache.  
  250.    
  251. -->
  252. <queryResultWindowSize>20</queryResultWindowSize>
  253. <!--
  254. Maximum number of documents to cache for any entry in the
  255.        queryResultCache.
  256.    
  257. -->
  258. <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
  259. <!--
  260. Query Related Event Listeners
  261.  
  262.        Various IndexSearcher related events can trigger Listeners to
  263.        take actions.
  264.  
  265.        newSearcher - fired whenever a new searcher is being prepared
  266.        and there is a current searcher handling requests (aka
  267.        registered).  It can be used to prime certain caches to
  268.        prevent long request times for certain requests.
  269.  
  270.        firstSearcher - fired whenever a new searcher is being
  271.        prepared but there is no current registered searcher to handle
  272.        requests or to gain autowarming data from.
  273.  
  274.        
  275.    
  276. -->
  277. <!--
  278. Use Cold Searcher
  279.  
  280.         If a search request comes in and there is no current
  281.         registered searcher, then immediately register the still
  282.         warming searcher and use it.  If "false" then all requests
  283.         will block until the first searcher is done warming.
  284.      
  285. -->
  286. <useColdSearcher>false</useColdSearcher>
  287. <!--
  288. Max Warming Searchers
  289.        
  290.         Maximum number of searchers that may be warming in the
  291.         background concurrently.  An error is returned if this limit
  292.         is exceeded.
  293.  
  294.         Recommend values of 1-2 for read-only slaves, higher for
  295.         masters w/o cache warming.
  296.      
  297. -->
  298. <maxWarmingSearchers>5</maxWarmingSearchers>
  299. </query>
  300. <!--
  301. Request Dispatcher
  302.  
  303.       This section contains instructions for how the SolrDispatchFilter
  304.       should behave when processing requests for this SolrCore.
  305.  
  306.       handleSelect is a legacy option that affects the behavior of requests
  307.       such as /select?qt=XXX
  308.  
  309.       handleSelect="true" will cause the SolrDispatchFilter to process
  310.       the request and dispatch the query to a handler specified by the
  311.       "qt" param, assuming "/select" isn't already registered.
  312.  
  313.       handleSelect="false" will cause the SolrDispatchFilter to
  314.       ignore "/select" requests, resulting in a 404 unless a handler
  315.       is explicitly registered with the name "/select"
  316.  
  317.       handleSelect="true" is not recommended for new users, but is the default
  318.       for backwards compatibility
  319.    
  320. -->
  321. <requestDispatcher handleSelect="false">
  322. <!--
  323. Request Parsing
  324.  
  325.         These settings indicate how Solr Requests may be parsed, and
  326.         what restrictions may be placed on the ContentStreams from
  327.         those requests
  328.  
  329.         enableRemoteStreaming - enables use of the stream.file
  330.         and stream.url parameters for specifying remote streams.
  331.  
  332.         multipartUploadLimitInKB - specifies the max size (in KiB) of
  333.         Multipart File Uploads that Solr will allow in a Request.
  334.        
  335.         formdataUploadLimitInKB - specifies the max size (in KiB) of
  336.         form data (application/x-www-form-urlencoded) sent via
  337.         POST. You can use POST to pass request parameters not
  338.         fitting into the URL.
  339.        
  340.         *** WARNING ***
  341.         The settings below authorize Solr to fetch remote files, You
  342.         should make sure your system has some authentication before
  343.         using enableRemoteStreaming="true"
  344.  
  345.      
  346. -->
  347. <!--
  348. HTTP Caching
  349.  
  350.         Set HTTP caching related parameters (for proxy caches and clients).
  351.  
  352.         The options below instruct Solr not to output any HTTP Caching
  353.         related headers
  354.      
  355. -->
  356. <httpCaching never304="true"/>
  357. <!--
  358. If you include a <cacheControl> directive, it will be used to
  359.         generate a Cache-Control header (as well as an Expires header
  360.         if the value contains "max-age=")
  361.        
  362.         By default, no Cache-Control header is generated.
  363.        
  364.         You can use the <cacheControl> option even if you have set
  365.         never304="true"
  366.      
  367. -->
  368. <!--
  369.  
  370.       <httpCaching never304="true" >
  371.         <cacheControl>max-age=30, public</cacheControl>
  372.       </httpCaching>
  373.      
  374. -->
  375. <!--
  376. To enable Solr to respond with automatically generated HTTP
  377.         Caching headers, and to response to Cache Validation requests
  378.         correctly, set the value of never304="false"
  379.        
  380.         This will cause Solr to generate Last-Modified and ETag
  381.         headers based on the properties of the Index.
  382.  
  383.         The following options can also be specified to affect the
  384.         values of these headers...
  385.  
  386.         lastModFrom - the default value is "openTime" which means the
  387.         Last-Modified value (and validation against If-Modified-Since
  388.         requests) will all be relative to when the current Searcher
  389.         was opened.  You can change it to lastModFrom="dirLastMod" if
  390.         you want the value to exactly correspond to when the physical
  391.         index was last modified.
  392.  
  393.         etagSeed="..." is an option you can change to force the ETag
  394.         header (and validation against If-None-Match requests) to be
  395.         different even if the index has not changed (ie: when making
  396.         significant changes to your config file)
  397.  
  398.         (lastModifiedFrom and etagSeed are both ignored if you use
  399.         the never304="true" option)
  400.      
  401. -->
  402. <!--
  403.  
  404.       <httpCaching lastModifiedFrom="openTime"
  405.                    etagSeed="Solr">
  406.         <cacheControl>max-age=30, public</cacheControl>
  407.       </httpCaching>
  408.      
  409. -->
  410. </requestDispatcher>
  411. <!--
  412. Request Handlers
  413.  
  414.       http://wiki.apache.org/solr/SolrRequestHandler
  415.  
  416.       Incoming queries will be dispatched to a specific handler by name
  417.       based on the path specified in the request.
  418.  
  419.       Legacy behavior: If the request path uses "/select" but no Request
  420.       Handler has that name, and if handleSelect="true" has been specified in
  421.       the requestDispatcher, then the Request Handler is dispatched based on
  422.       the qt parameter.  Handlers without a leading '/' are accessed this way
  423.       like so: http://host/app/[core/]select?qt=name  If no qt is
  424.       given, then the requestHandler that declares default="true" will be
  425.       used or the one named "standard".
  426.  
  427.       If a Request Handler is declared with startup="lazy", then it will
  428.       not be initialized until the first request that uses it.
  429.  
  430.    
  431. -->
  432. <!--
  433. SearchHandler
  434.  
  435.       http://wiki.apache.org/solr/SearchHandler
  436.  
  437.       For processing Search Queries, the primary Request Handler
  438.       provided with Solr is "SearchHandler" It delegates to a sequent
  439.       of SearchComponents (see below) and supports distributed
  440.       queries across multiple shards
  441.    
  442. -->
  443. <requestHandler name="search" class="solr.SearchHandler" default="true">
  444. <!--
  445. default values for query parameters can be specified, these
  446.         will be overridden by parameters in the request
  447.      
  448. -->
  449. <lst name="defaults">
  450. <str name="defType">dismax</str>
  451. <str name="echoParams">explicit</str>
  452. <int name="rows">10</int>
  453. <str name="q.alt">*:*</str>
  454. <str name="mm">2<-1 5<-2 6<90%</str>
  455. <str name="fl">
  456. id, score, author_display, author_vern_display, format, isbn_t, language_facet, lc_callnum_display, material_type_display, published_display, published_vern_display, pub_date, title_display, title_vern_display, subject_topic_facet, subject_geo_facet, subject_era_facet, subtitle_display, subtitle_vern_display, url_fulltext_display, url_suppl_display, material,
  457. </str>
  458. <str name="material_qf">
  459. material_unstem_search^200 material_addl_unstem_search^50 material_t^20 material_addl_t
  460. </str>
  461. <str name="material_pf">
  462. material_unstem_search^2000 material_addl_unstem_search^500 material_t^200 material_addl_t^10
  463. </str>
  464. <str name="facet">true</str>
  465. <str name="facet.mincount">1</str>
  466. <str name="facet.limit">10</str>
  467. <str name="facet.field">format</str>
  468. <str name="facet.field">pub_date</str>
  469. <str name="facet.field">material</str>
  470. </lst>
  471. </requestHandler>
  472. <requestHandler name="/select" class="solr.SearchHandler">
  473. <arr name="last-components">
  474. <str>spellcheck</str>
  475. </arr>
  476. </requestHandler>
  477. <!--
  478. A request handler that returns indented JSON by default
  479. -->
  480. <requestHandler name="/query" class="solr.SearchHandler">
  481. <lst name="defaults">
  482. <str name="echoParams">explicit</str>
  483. <str name="wt">json</str>
  484. <str name="indent">true</str>
  485. <str name="df">text</str>
  486. </lst>
  487. <arr name="last-components">
  488. <str>spellcheck</str>
  489. </arr>
  490. </requestHandler>
  491. <!--
  492. realtime get handler, guaranteed to return the latest stored fields of
  493.       any document, without the need to commit or open a new searcher.  The
  494.       current implementation relies on the updateLog feature being enabled.
  495. -->
  496. <requestHandler name="/get" class="solr.RealTimeGetHandler">
  497. <lst name="defaults">
  498. <str name="omitHeader">true</str>
  499. <str name="wt">json</str>
  500. <str name="indent">true</str>
  501. </lst>
  502. </requestHandler>
  503. <requestHandler name="/update" class="solr.UpdateRequestHandler"></requestHandler>
  504. <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler">
  505. <lst name="defaults">
  506. <str name="stream.contentType">application/json</str>
  507. </lst>
  508. </requestHandler>
  509. <requestHandler name="/update/csv" class="solr.CSVRequestHandler">
  510. <lst name="defaults">
  511. <str name="stream.contentType">application/csv</str>
  512. </lst>
  513. </requestHandler>
  514. <requestHandler name="/update/extract" startup="lazy" class="solr.extraction.ExtractingRequestHandler">
  515. <lst name="defaults">
  516. <str name="lowernames">true</str>
  517. <str name="uprefix">ignored_</str>
  518. <!--  capture link hrefs but ignore div attributes  -->
  519. <str name="captureAttr">true</str>
  520. <str name="fmap.a">links</str>
  521. <str name="fmap.div">ignored_</str>
  522. </lst>
  523. </requestHandler>
  524. <requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler"/>
  525. <requestHandler name="/analysis/document" class="solr.DocumentAnalysisRequestHandler" startup="lazy"/>
  526. <!--  ping/healthcheck  -->
  527. <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
  528. <lst name="invariants">
  529. <str name="q">solrpingquery</str>
  530. </lst>
  531. <lst name="defaults">
  532. <str name="echoParams">all</str>
  533. </lst>
  534. </requestHandler>
  535. <requestHandler name="/debug/dump" class="solr.DumpRequestHandler">
  536. <lst name="defaults">
  537. <str name="echoParams">explicit</str>
  538. <str name="echoHandler">true</str>
  539. </lst>
  540. </requestHandler>
  541. <requestHandler name="/replication" class="solr.ReplicationHandler"></requestHandler>
  542. <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  543. <str name="queryAnalyzerFieldType">textSpell</str>
  544. <!--
  545. Multiple "Spell Checkers" can be declared and used by this
  546.         component
  547.      
  548. -->
  549. <!--
  550. a spellchecker built from a field of the main index
  551. -->
  552. <lst name="spellchecker">
  553. <str name="name">default</str>
  554. <str name="field">name</str>
  555. <str name="classname">solr.DirectSolrSpellChecker</str>
  556. <!--
  557. the spellcheck distance measure used, the default is the internal levenshtein
  558. -->
  559. <str name="distanceMeasure">internal</str>
  560. <!--
  561. minimum accuracy needed to be considered a valid spellcheck suggestion
  562. -->
  563. <float name="accuracy">0.5</float>
  564. <!--
  565. the maximum #edits we consider when enumerating terms: can be 1 or 2
  566. -->
  567. <int name="maxEdits">2</int>
  568. <!--  the minimum shared prefix when enumerating terms  -->
  569. <int name="minPrefix">1</int>
  570. <!--  maximum number of inspections per result.  -->
  571. <int name="maxInspections">5</int>
  572. <!--
  573. minimum length of a query term to be considered for correction
  574. -->
  575. <int name="minQueryLength">4</int>
  576. <!--
  577. maximum threshold of documents a query term can appear to be considered for correction
  578. -->
  579. <float name="maxQueryFrequency">0.01</float>
  580. <!--
  581. uncomment this to require suggestions to occur in 1% of the documents
  582.         <float name="thresholdTokenFrequency">.01</float>
  583.      
  584. -->
  585. </lst>
  586. <!--
  587. a spellchecker that can break or combine words.  See "/spell" handler below for usage
  588. -->
  589. <lst name="spellchecker">
  590. <str name="name">wordbreak</str>
  591. <str name="classname">solr.WordBreakSolrSpellChecker</str>
  592. <str name="field">name</str>
  593. <str name="combineWords">true</str>
  594. <str name="breakWords">true</str>
  595. <int name="maxChanges">10</int>
  596. </lst>
  597. </searchComponent>
  598. <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
  599. <searchComponent name="terms" class="solr.TermsComponent"/>
  600. <searchComponent class="solr.HighlightComponent" name="highlight">
  601. <highlighting>
  602. <!--  Configure the standard fragmenter  -->
  603. <!--
  604. This could most likely be commented out in the "default" case
  605. -->
  606. <fragmenter name="gap" default="true" class="solr.highlight.GapFragmenter">
  607. <lst name="defaults">
  608. <int name="hl.fragsize">100</int>
  609. </lst>
  610. </fragmenter>
  611. <!--
  612. A regular-expression-based fragmenter
  613.           (for sentence extraction)
  614.        
  615. -->
  616. <fragmenter name="regex" class="solr.highlight.RegexFragmenter">
  617. <lst name="defaults">
  618. <!--
  619. slightly smaller fragsizes work better because of slop
  620. -->
  621. <int name="hl.fragsize">70</int>
  622. <!--  allow 50% slop on fragment sizes  -->
  623. <float name="hl.regex.slop">0.5</float>
  624. <!--  a basic sentence pattern  -->
  625. <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
  626. </lst>
  627. </fragmenter>
  628. <!--  Configure the standard formatter  -->
  629. <formatter name="html" default="true" class="solr.highlight.HtmlFormatter">
  630. <lst name="defaults">
  631. <str name="hl.simple.pre">
  632. <![CDATA[ <em> ]]>
  633. </str>
  634. <str name="hl.simple.post">
  635. <![CDATA[ </em> ]]>
  636. </str>
  637. </lst>
  638. </formatter>
  639. <!--  Configure the standard encoder  -->
  640. <encoder name="html" class="solr.highlight.HtmlEncoder"/>
  641. <!--  Configure the standard fragListBuilder  -->
  642. <fragListBuilder name="simple" class="solr.highlight.SimpleFragListBuilder"/>
  643. <!--  Configure the single fragListBuilder  -->
  644. <fragListBuilder name="single" class="solr.highlight.SingleFragListBuilder"/>
  645. <!--  Configure the weighted fragListBuilder  -->
  646. <fragListBuilder name="weighted" default="true" class="solr.highlight.WeightedFragListBuilder"/>
  647. <!--  default tag FragmentsBuilder  -->
  648. <fragmentsBuilder name="default" default="true" class="solr.highlight.ScoreOrderFragmentsBuilder">
  649. <!--
  650.  
  651.        <lst name="defaults">
  652.          <str name="hl.multiValuedSeparatorChar">/</str>
  653.        </lst>
  654.        
  655. -->
  656. </fragmentsBuilder>
  657. <!--  multi-colored tag FragmentsBuilder  -->
  658. <fragmentsBuilder name="colored" class="solr.highlight.ScoreOrderFragmentsBuilder">
  659. <lst name="defaults">
  660. <str name="hl.tag.pre">
  661. <![CDATA[
  662. <b style="background:yellow">,<b style="background:lawgreen">, <b style="background:aquamarine">,<b style="background:magenta">, <b style="background:palegreen">,<b style="background:coral">, <b style="background:wheat">,<b style="background:khaki">, <b style="background:lime">,<b style="background:deepskyblue">
  663. ]]>
  664. </str>
  665. <str name="hl.tag.post">
  666. <![CDATA[ </b> ]]>
  667. </str>
  668. </lst>
  669. </fragmentsBuilder>
  670. <boundaryScanner name="default" default="true" class="solr.highlight.SimpleBoundaryScanner">
  671. <lst name="defaults">
  672. <str name="hl.bs.maxScan">10</str>
  673. <str name="hl.bs.chars">.,!?</str>
  674. </lst>
  675. </boundaryScanner>
  676. <boundaryScanner name="breakIterator" class="solr.highlight.BreakIteratorBoundaryScanner">
  677. <lst name="defaults">
  678. <!--
  679. type should be one of CHARACTER, WORD(default), LINE and SENTENCE
  680. -->
  681. <str name="hl.bs.type">WORD</str>
  682. <!--
  683. language and country are used when constructing Locale object.  
  684. -->
  685. <!--
  686. And the Locale object will be used when getting instance of BreakIterator
  687. -->
  688. <str name="hl.bs.language">en</str>
  689. <str name="hl.bs.country">US</str>
  690. </lst>
  691. </boundaryScanner>
  692. </highlighting>
  693. </searchComponent>
  694. <requestHandler class="solr.MoreLikeThisHandler" name="/mlt">
  695. <lst name="defaults">
  696. <str name="mlt.mintf">1</str>
  697. <str name="mlt.mindf">2</str>
  698. </lst>
  699. </requestHandler>
  700. <!--
  701. Admin Handlers - This will register all the standard admin RequestHandlers.
  702. -->
  703. <requestHandler name="/admin/" class="solr.admin.AdminHandlers"/>
  704. </config>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement