Advertisement
Guest User

Untitled

a guest
May 13th, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 58.26 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>LUCENE_40</luceneMatchVersion>
  39.  
  40. <!-- lib directives can be used to instruct Solr to load an 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. If a "./lib" directory exists in your instanceDir, all files
  49. found in it are included as if you had used the following
  50. syntax...
  51.  
  52. <lib dir="./lib" />
  53. -->
  54. <!-- A dir option by itself adds any files found in the directory to
  55. the classpath, this is useful for including all jars in a
  56. directory.
  57. -->
  58. <lib dir="../../contrib/extraction/lib" />
  59. <!-- When a regex is specified in addition to a directory, only the
  60. files in that directory which completely match the regex
  61. (anchored on both ends) will be included.
  62. -->
  63. <lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar" />
  64. <lib dir="../../dist/" regex="apache-solr-clustering-\d.*\.jar" />
  65. <lib dir="../../dist/" regex="apache-solr-langid-\d.*\.jar" />
  66. <!-- If a dir option (with or without a regex) is used and nothing
  67. is found that matches, it will be ignored
  68. -->
  69. <lib dir="../../contrib/clustering/lib/" />
  70. <lib dir="/total/crap/dir/ignored" />
  71. <!-- an exact path can be used to specify a specific file. This
  72. will cause a serious error to be logged if it can't be loaded.
  73. -->
  74. <!--
  75. <lib path="../a-jar-that-does-not-exist.jar" />
  76. -->
  77.  
  78. <!-- Data Directory
  79.  
  80. Used to specify an alternate directory to hold all index data
  81. other than the default ./data under the Solr home. If
  82. replication is in use, this should match the replication
  83. configuration.
  84. -->
  85. <dataDir>${solr.data.dir:}</dataDir>
  86.  
  87.  
  88. <!-- The DirectoryFactory to use for indexes.
  89.  
  90. solr.StandardDirectoryFactory, the default, is filesystem
  91. based and tries to pick the best implementation for the current
  92. JVM and platform. One can force a particular implementation
  93. via solr.MMapDirectoryFactory, solr.NIOFSDirectoryFactory, or
  94. solr.SimpleFSDirectoryFactory.
  95.  
  96. solr.RAMDirectoryFactory is memory based, not
  97. persistent, and doesn't work with replication.
  98. -->
  99. <directoryFactory name="DirectoryFactory"
  100. class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
  101. <!-- Main Index
  102.  
  103. Values here override the values in the <indexDefaults> section
  104. for the main on disk index.
  105. -->
  106. <indexConfig>
  107.  
  108. <useCompoundFile>false</useCompoundFile>
  109. <ramBufferSizeMB>32</ramBufferSizeMB>
  110. <mergeFactor>10</mergeFactor>
  111.  
  112. <!-- Unlock On Startup
  113.  
  114. If true, unlock any held write or commit locks on startup.
  115. This defeats the locking mechanism that allows multiple
  116. processes to safely access a lucene index, and should be used
  117. with care.
  118.  
  119. This is not needed if lock type is 'none' or 'single'
  120. -->
  121. <unlockOnStartup>false</unlockOnStartup>
  122.  
  123. <!-- If true, IndexReaders will be reopened (often more efficient)
  124. instead of closed and then opened.
  125. -->
  126. <reopenReaders>true</reopenReaders>
  127.  
  128. <!-- Commit Deletion Policy
  129.  
  130. Custom deletion policies can specified here. The class must
  131. implement org.apache.lucene.index.IndexDeletionPolicy.
  132.  
  133. http://lucene.apache.org/java/2_9_1/api/all/org/apache/lucene/index/IndexDeletionPolicy.html
  134.  
  135. The standard Solr IndexDeletionPolicy implementation supports
  136. deleting index commit points on number of commits, age of
  137. commit point and optimized status.
  138.  
  139. The latest commit point should always be preserved regardless
  140. of the criteria.
  141. -->
  142. <deletionPolicy class="solr.SolrDeletionPolicy">
  143. <!-- The number of commit points to be kept -->
  144. <str name="maxCommitsToKeep">1</str>
  145. <!-- The number of optimized commit points to be kept -->
  146. <str name="maxOptimizedCommitsToKeep">0</str>
  147. <!--
  148. Delete all commit points once they have reached the given age.
  149. Supports DateMathParser syntax e.g.
  150. -->
  151. <!--
  152. <str name="maxCommitAge">30MINUTES</str>
  153. <str name="maxCommitAge">1DAY</str>
  154. -->
  155. </deletionPolicy>
  156.  
  157. <!-- Lucene Infostream
  158.  
  159. To aid in advanced debugging, Lucene provides an "InfoStream"
  160. of detailed information when indexing.
  161.  
  162. Setting The value to true will instruct the underlying Lucene
  163. IndexWriter to write its debugging info the specified file
  164. -->
  165. <infoStream file="INFOSTREAM.txt">false</infoStream>
  166.  
  167. </indexConfig>
  168.  
  169. <!-- JMX
  170.  
  171. This example enables JMX if and only if an existing MBeanServer
  172. is found, use this if you want to configure JMX through JVM
  173. parameters. Remove this to disable exposing Solr configuration
  174. and statistics to JMX.
  175.  
  176. For more details see http://wiki.apache.org/solr/SolrJmx
  177. -->
  178. <jmx />
  179. <!-- If you want to connect to a particular server, specify the
  180. agentId
  181. -->
  182. <!-- <jmx agentId="myAgent" /> -->
  183. <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
  184. <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
  185. -->
  186.  
  187. <!-- The default high-performance update handler -->
  188. <updateHandler class="solr.DirectUpdateHandler2">
  189.  
  190. <!-- SoftAutoCommit
  191.  
  192. Perform a 'soft' commit automatically under certain conditions.
  193. This commit avoids ensuring that data is synched to disk.
  194.  
  195. maxDocs - Maximum number of documents to add since the last
  196. soft commit before automaticly triggering a new soft commit.
  197.  
  198. maxTime - Maximum amount of time in ms that is allowed to pass
  199. since a document was added before automaticly
  200. triggering a new soft commit.
  201. -->
  202.  
  203. <autoSoftCommit>
  204. <maxTime>10000</maxTime>
  205. </autoSoftCommit>
  206.  
  207. <!-- Update Related Event Listeners
  208.  
  209. Various IndexWriter related events can trigger Listeners to
  210. take actions.
  211.  
  212. postCommit - fired after every commit or optimize command
  213. postOptimize - fired after every optimize command
  214. -->
  215. <!-- The RunExecutableListener executes an external command from a
  216. hook such as postCommit or postOptimize.
  217.  
  218. exe - the name of the executable to run
  219. dir - dir to use as the current working directory. (default=".")
  220. wait - the calling thread waits until the executable returns.
  221. (default="true")
  222. args - the arguments to pass to the program. (default is none)
  223. env - environment variables to set. (default is none)
  224. -->
  225. <!-- This example shows how RunExecutableListener could be used
  226. with the script based replication...
  227. http://wiki.apache.org/solr/CollectionDistribution
  228. -->
  229. <!--
  230. <listener event="postCommit" class="solr.RunExecutableListener">
  231. <str name="exe">solr/bin/snapshooter</str>
  232. <str name="dir">.</str>
  233. <bool name="wait">true</bool>
  234. <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
  235. <arr name="env"> <str>MYVAR=val1</str> </arr>
  236. </listener>
  237. -->
  238.  
  239. <!-- Enables a transaction log, currently used for real-time get.
  240. "dir" - the target directory for transaction logs, defaults to the
  241. solr data directory. -->
  242. <!--
  243. <updateLog class="solr.FSUpdateLog">
  244. <str name="dir">${solr.data.dir:}</str>
  245. </updateLog>
  246. -->
  247.  
  248.  
  249. </updateHandler>
  250.  
  251. <!-- IndexReaderFactory
  252.  
  253. Use the following format to specify a custom IndexReaderFactory,
  254. which allows for alternate IndexReader implementations.
  255.  
  256. ** Experimental Feature **
  257.  
  258. Please note - Using a custom IndexReaderFactory may prevent
  259. certain other features from working. The API to
  260. IndexReaderFactory may change without warning or may even be
  261. removed from future releases if the problems cannot be
  262. resolved.
  263.  
  264.  
  265. ** Features that may not work with custom IndexReaderFactory **
  266.  
  267. The ReplicationHandler assumes a disk-resident index. Using a
  268. custom IndexReader implementation may cause incompatibility
  269. with ReplicationHandler and may cause replication to not work
  270. correctly. See SOLR-1366 for details.
  271.  
  272. -->
  273. <!--
  274. <indexReaderFactory name="IndexReaderFactory" class="package.class">
  275. <str name="someArg">Some Value</str>
  276. </indexReaderFactory >
  277. -->
  278. <!-- By explicitly declaring the Factory, the termIndexDivisor can
  279. be specified.
  280. -->
  281. <!--
  282. <indexReaderFactory name="IndexReaderFactory"
  283. class="solr.StandardIndexReaderFactory">
  284. <int name="setTermIndexDivisor">12</int>
  285. </indexReaderFactory >
  286. -->
  287.  
  288.  
  289. <query>
  290. <!-- Max Boolean Clauses
  291.  
  292. Maximum number of clauses in each BooleanQuery, an exception
  293. is thrown if exceeded.
  294.  
  295. ** WARNING **
  296.  
  297. This option actually modifies a global Lucene property that
  298. will affect all SolrCores. If multiple solrconfig.xml files
  299. disagree on this property, the value at any given moment will
  300. be based on the last SolrCore to be initialized.
  301.  
  302. -->
  303. <maxBooleanClauses>1024</maxBooleanClauses>
  304.  
  305.  
  306. <!-- Solr Internal Query Caches
  307.  
  308. There are two implementations of cache available for Solr,
  309. LRUCache, based on a synchronized LinkedHashMap, and
  310. FastLRUCache, based on a ConcurrentHashMap.
  311.  
  312. FastLRUCache has faster gets and slower puts in single
  313. threaded operation and thus is generally faster than LRUCache
  314. when the hit ratio of the cache is high (> 75%), and may be
  315. faster under other scenarios on multi-cpu systems.
  316. -->
  317.  
  318. <!-- Filter Cache
  319.  
  320. Cache used by SolrIndexSearcher for filters (DocSets),
  321. unordered sets of *all* documents that match a query. When a
  322. new searcher is opened, its caches may be prepopulated or
  323. "autowarmed" using data from caches in the old searcher.
  324. autowarmCount is the number of items to prepopulate. For
  325. LRUCache, the autowarmed items will be the most recently
  326. accessed items.
  327.  
  328. Parameters:
  329. class - the SolrCache implementation LRUCache or
  330. (LRUCache or FastLRUCache)
  331. size - the maximum number of entries in the cache
  332. initialSize - the initial capacity (number of entries) of
  333. the cache. (see java.util.HashMap)
  334. autowarmCount - the number of entries to prepopulate from
  335. and old cache.
  336. -->
  337. <filterCache class="solr.FastLRUCache"
  338. size="512"
  339. initialSize="512"
  340. autowarmCount="0"/>
  341.  
  342. <!-- Query Result Cache
  343.  
  344. Caches results of searches - ordered lists of document ids
  345. (DocList) based on a query, a sort, and the range of documents requested.
  346. -->
  347. <queryResultCache class="solr.LRUCache"
  348. size="512"
  349. initialSize="512"
  350. autowarmCount="0"/>
  351.  
  352. <!-- Document Cache
  353.  
  354. Caches Lucene Document objects (the stored fields for each
  355. document). Since Lucene internal document ids are transient,
  356. this cache will not be autowarmed.
  357. -->
  358. <documentCache class="solr.LRUCache"
  359. size="512"
  360. initialSize="512"
  361. autowarmCount="0"/>
  362.  
  363. <!-- Field Value Cache
  364.  
  365. Cache used to hold field values that are quickly accessible
  366. by document id. The fieldValueCache is created by default
  367. even if not configured here.
  368. -->
  369. <!--
  370. <fieldValueCache class="solr.FastLRUCache"
  371. size="512"
  372. autowarmCount="128"
  373. showItems="32" />
  374. -->
  375.  
  376. <!-- Custom Cache
  377.  
  378. Example of a generic cache. These caches may be accessed by
  379. name through SolrIndexSearcher.getCache(),cacheLookup(), and
  380. cacheInsert(). The purpose is to enable easy caching of
  381. user/application level data. The regenerator argument should
  382. be specified as an implementation of solr.CacheRegenerator
  383. if autowarming is desired.
  384. -->
  385. <!--
  386. <cache name="myUserCache"
  387. class="solr.LRUCache"
  388. size="4096"
  389. initialSize="1024"
  390. autowarmCount="1024"
  391. regenerator="com.mycompany.MyRegenerator"
  392. />
  393. -->
  394.  
  395.  
  396. <!-- Lazy Field Loading
  397.  
  398. If true, stored fields that are not requested will be loaded
  399. lazily. This can result in a significant speed improvement
  400. if the usual case is to not load all stored fields,
  401. especially if the skipped fields are large compressed text
  402. fields.
  403. -->
  404. <enableLazyFieldLoading>true</enableLazyFieldLoading>
  405.  
  406. <!-- Use Filter For Sorted Query
  407.  
  408. A possible optimization that attempts to use a filter to
  409. satisfy a search. If the requested sort does not include
  410. score, then the filterCache will be checked for a filter
  411. matching the query. If found, the filter will be used as the
  412. source of document ids, and then the sort will be applied to
  413. that.
  414.  
  415. For most situations, this will not be useful unless you
  416. frequently get the same search repeatedly with different sort
  417. options, and none of them ever use "score"
  418. -->
  419. <!--
  420. <useFilterForSortedQuery>true</useFilterForSortedQuery>
  421. -->
  422.  
  423. <!-- Result Window Size
  424.  
  425. An optimization for use with the queryResultCache. When a search
  426. is requested, a superset of the requested number of document ids
  427. are collected. For example, if a search for a particular query
  428. requests matching documents 10 through 19, and queryWindowSize is 50,
  429. then documents 0 through 49 will be collected and cached. Any further
  430. requests in that range can be satisfied via the cache.
  431. -->
  432. <queryResultWindowSize>20</queryResultWindowSize>
  433.  
  434. <!-- Maximum number of documents to cache for any entry in the
  435. queryResultCache.
  436. -->
  437. <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
  438.  
  439. <!-- Query Related Event Listeners
  440.  
  441. Various IndexSearcher related events can trigger Listeners to
  442. take actions.
  443.  
  444. newSearcher - fired whenever a new searcher is being prepared
  445. and there is a current searcher handling requests (aka
  446. registered). It can be used to prime certain caches to
  447. prevent long request times for certain requests.
  448.  
  449. firstSearcher - fired whenever a new searcher is being
  450. prepared but there is no current registered searcher to handle
  451. requests or to gain autowarming data from.
  452.  
  453.  
  454. -->
  455. <!-- QuerySenderListener takes an array of NamedList and executes a
  456. local query request for each NamedList in sequence.
  457. -->
  458. <listener event="newSearcher" class="solr.QuerySenderListener">
  459. <arr name="queries">
  460. <!--
  461. <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
  462. <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
  463. -->
  464. </arr>
  465. </listener>
  466. <listener event="firstSearcher" class="solr.QuerySenderListener">
  467. <arr name="queries">
  468. <lst>
  469. <str name="q">static firstSearcher warming in solrconfig.xml</str>
  470. </lst>
  471. </arr>
  472. </listener>
  473.  
  474. <!-- Use Cold Searcher
  475.  
  476. If a search request comes in and there is no current
  477. registered searcher, then immediately register the still
  478. warming searcher and use it. If "false" then all requests
  479. will block until the first searcher is done warming.
  480. -->
  481. <useColdSearcher>false</useColdSearcher>
  482.  
  483. <!-- Max Warming Searchers
  484.  
  485. Maximum number of searchers that may be warming in the
  486. background concurrently. An error is returned if this limit
  487. is exceeded.
  488.  
  489. Recommend values of 1-2 for read-only slaves, higher for
  490. masters w/o cache warming.
  491. -->
  492. <maxWarmingSearchers>2</maxWarmingSearchers>
  493.  
  494. </query>
  495.  
  496.  
  497. <!-- Request Dispatcher
  498.  
  499. This section contains instructions for how the SolrDispatchFilter
  500. should behave when processing requests for this SolrCore.
  501.  
  502. handleSelect affects the behavior of requests such as /select?qt=XXX
  503.  
  504. handleSelect="true" will cause the SolrDispatchFilter to process
  505. the request and will result in consistent error handling and
  506. formatting for all types of requests.
  507.  
  508. handleSelect="false" will cause the SolrDispatchFilter to
  509. ignore "/select" requests and fallback to using the legacy
  510. SolrServlet and it's Solr 1.1 style error formatting
  511. -->
  512. <requestDispatcher handleSelect="true" >
  513. <!-- Request Parsing
  514.  
  515. These settings indicate how Solr Requests may be parsed, and
  516. what restrictions may be placed on the ContentStreams from
  517. those requests
  518.  
  519. enableRemoteStreaming - enables use of the stream.file
  520. and stream.url parameters for specifying remote streams.
  521.  
  522. multipartUploadLimitInKB - specifies the max size of
  523. Multipart File Uploads that Solr will allow in a Request.
  524.  
  525. *** WARNING ***
  526. The settings below authorize Solr to fetch remote files, You
  527. should make sure your system has some authentication before
  528. using enableRemoteStreaming="true"
  529.  
  530. -->
  531. <requestParsers enableRemoteStreaming="true"
  532. multipartUploadLimitInKB="2048000" />
  533.  
  534. <!-- HTTP Caching
  535.  
  536. Set HTTP caching related parameters (for proxy caches and clients).
  537.  
  538. The options below instruct Solr not to output any HTTP Caching
  539. related headers
  540. -->
  541. <httpCaching never304="true" />
  542. <!-- If you include a <cacheControl> directive, it will be used to
  543. generate a Cache-Control header (as well as an Expires header
  544. if the value contains "max-age=")
  545.  
  546. By default, no Cache-Control header is generated.
  547.  
  548. You can use the <cacheControl> option even if you have set
  549. never304="true"
  550. -->
  551. <!--
  552. <httpCaching never304="true" >
  553. <cacheControl>max-age=30, public</cacheControl>
  554. </httpCaching>
  555. -->
  556. <!-- To enable Solr to respond with automatically generated HTTP
  557. Caching headers, and to response to Cache Validation requests
  558. correctly, set the value of never304="false"
  559.  
  560. This will cause Solr to generate Last-Modified and ETag
  561. headers based on the properties of the Index.
  562.  
  563. The following options can also be specified to affect the
  564. values of these headers...
  565.  
  566. lastModFrom - the default value is "openTime" which means the
  567. Last-Modified value (and validation against If-Modified-Since
  568. requests) will all be relative to when the current Searcher
  569. was opened. You can change it to lastModFrom="dirLastMod" if
  570. you want the value to exactly correspond to when the physical
  571. index was last modified.
  572.  
  573. etagSeed="..." is an option you can change to force the ETag
  574. header (and validation against If-None-Match requests) to be
  575. different even if the index has not changed (ie: when making
  576. significant changes to your config file)
  577.  
  578. (lastModifiedFrom and etagSeed are both ignored if you use
  579. the never304="true" option)
  580. -->
  581. <!--
  582. <httpCaching lastModifiedFrom="openTime"
  583. etagSeed="Solr">
  584. <cacheControl>max-age=30, public</cacheControl>
  585. </httpCaching>
  586. -->
  587. </requestDispatcher>
  588.  
  589. <!-- Request Handlers
  590.  
  591. http://wiki.apache.org/solr/SolrRequestHandler
  592.  
  593. incoming queries will be dispatched to the correct handler
  594. based on the path or the qt (query type) param.
  595.  
  596. Names starting with a '/' are accessed with the a path equal to
  597. the registered name. Names without a leading '/' are accessed
  598. with: http://host/app/[core/]select?qt=name
  599.  
  600. If a /select request is processed with out a qt param
  601. specified, the requestHandler that declares default="true" will
  602. be used.
  603.  
  604. If a Request Handler is declared with startup="lazy", then it will
  605. not be initialized until the first request that uses it.
  606.  
  607. -->
  608. <!-- SearchHandler
  609.  
  610. http://wiki.apache.org/solr/SearchHandler
  611.  
  612. For processing Search Queries, the primary Request Handler
  613. provided with Solr is "SearchHandler" It delegates to a sequent
  614. of SearchComponents (see below) and supports distributed
  615. queries across multiple shards
  616. -->
  617. <requestHandler name="search" class="solr.SearchHandler" default="true">
  618. <!-- default values for query parameters can be specified, these
  619. will be overridden by parameters in the request
  620. -->
  621. <lst name="defaults">
  622. <str name="echoParams">explicit</str>
  623. <int name="rows">10</int>
  624. </lst>
  625. <!-- In addition to defaults, "appends" params can be specified
  626. to identify values which should be appended to the list of
  627. multi-val params from the query (or the existing "defaults").
  628. -->
  629. <!-- In this example, the param "fq=instock:true" would be appended to
  630. any query time fq params the user may specify, as a mechanism for
  631. partitioning the index, independent of any user selected filtering
  632. that may also be desired (perhaps as a result of faceted searching).
  633.  
  634. NOTE: there is *absolutely* nothing a client can do to prevent these
  635. "appends" values from being used, so don't use this mechanism
  636. unless you are sure you always want it.
  637. -->
  638. <!--
  639. <lst name="appends">
  640. <str name="fq">inStock:true</str>
  641. </lst>
  642. -->
  643. <!-- "invariants" are a way of letting the Solr maintainer lock down
  644. the options available to Solr clients. Any params values
  645. specified here are used regardless of what values may be specified
  646. in either the query, the "defaults", or the "appends" params.
  647.  
  648. In this example, the facet.field and facet.query params would
  649. be fixed, limiting the facets clients can use. Faceting is
  650. not turned on by default - but if the client does specify
  651. facet=true in the request, these are the only facets they
  652. will be able to see counts for; regardless of what other
  653. facet.field or facet.query params they may specify.
  654.  
  655. NOTE: there is *absolutely* nothing a client can do to prevent these
  656. "invariants" values from being used, so don't use this mechanism
  657. unless you are sure you always want it.
  658. -->
  659. <!--
  660. <lst name="invariants">
  661. <str name="facet.field">cat</str>
  662. <str name="facet.field">manu_exact</str>
  663. <str name="facet.query">price:[* TO 500]</str>
  664. <str name="facet.query">price:[500 TO *]</str>
  665. </lst>
  666. -->
  667. <!-- If the default list of SearchComponents is not desired, that
  668. list can either be overridden completely, or components can be
  669. prepended or appended to the default list. (see below)
  670. -->
  671. <!--
  672. <arr name="components">
  673. <str>nameOfCustomComponent1</str>
  674. <str>nameOfCustomComponent2</str>
  675. </arr>
  676. -->
  677. </requestHandler>
  678.  
  679.  
  680. <!-- realtime get handler, guaranteed to return the latest stored fields of
  681. any document, without the need to commit or open a new searcher. The
  682. current implementation relies on the updateLog feature being enabled. -->
  683. <requestHandler name="/get" class="solr.RealTimeGetHandler">
  684. <lst name="defaults">
  685. <str name="omitHeader">true</str>
  686. </lst>
  687. </requestHandler>
  688.  
  689.  
  690. <!-- A Robust Example
  691.  
  692. This example SearchHandler declaration shows off usage of the
  693. SearchHandler with many defaults declared
  694.  
  695. Note that multiple instances of the same Request Handler
  696. (SearchHandler) can be registered multiple times with different
  697. names (and different init parameters)
  698. -->
  699. <requestHandler name="/browse" class="solr.SearchHandler">
  700. <lst name="defaults">
  701. <str name="echoParams">explicit</str>
  702.  
  703. <!-- VelocityResponseWriter settings -->
  704. <str name="wt">velocity</str>
  705. <str name="v.template">browse</str>
  706. <str name="v.layout">layout</str>
  707. <str name="title">Solritas</str>
  708.  
  709. <!-- Query settings -->
  710. <str name="defType">edismax</str>
  711. <str name="qf">
  712. text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
  713. </str>
  714. <str name="q.alt">*:*</str>
  715. <str name="rows">10</str>
  716. <str name="fl">*,score</str>
  717.  
  718. <str name="mlt.qf">
  719. text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
  720. </str>
  721. <str name="mlt.fl">text,features,name,sku,id,manu,cat</str>
  722. <int name="mlt.count">3</int>
  723.  
  724. <!-- Faceting defaults -->
  725. <str name="facet">on</str>
  726. <str name="facet.field">cat</str>
  727. <str name="facet.field">manu_exact</str>
  728. <str name="facet.query">ipod</str>
  729. <str name="facet.query">GB</str>
  730. <str name="facet.mincount">1</str>
  731. <str name="facet.pivot">cat,inStock</str>
  732. <str name="facet.range.other">after</str>
  733. <str name="facet.range">price</str>
  734. <int name="f.price.facet.range.start">0</int>
  735. <int name="f.price.facet.range.end">600</int>
  736. <int name="f.price.facet.range.gap">50</int>
  737. <str name="facet.range">popularity</str>
  738. <int name="f.popularity.facet.range.start">0</int>
  739. <int name="f.popularity.facet.range.end">10</int>
  740. <int name="f.popularity.facet.range.gap">3</int>
  741. <str name="facet.range">manufacturedate_dt</str>
  742. <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
  743. <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
  744. <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
  745. <str name="f.manufacturedate_dt.facet.range.other">before</str>
  746. <str name="f.manufacturedate_dt.facet.range.other">after</str>
  747.  
  748. <!-- Highlighting defaults -->
  749. <str name="hl">on</str>
  750. <str name="hl.fl">text features name</str>
  751. <str name="f.name.hl.fragsize">0</str>
  752. <str name="f.name.hl.alternateField">name</str>
  753.  
  754. <!-- Spell checking defaults -->
  755. <str name="spellcheck">on</str>
  756. <str name="spellcheck.collate">true</str>
  757. <str name="spellcheck.onlyMorePopular">false</str>
  758. <str name="spellcheck.extendedResults">false</str>
  759. <str name="spellcheck.count">3</str>
  760. </lst>
  761.  
  762. <!-- append spellchecking to our list of components -->
  763. <arr name="last-components">
  764. <str>spellcheck</str>
  765. </arr>
  766. </requestHandler>
  767.  
  768.  
  769. <!-- XML Update Request Handler.
  770.  
  771. http://wiki.apache.org/solr/UpdateXmlMessages
  772.  
  773. The canonical Request Handler for Modifying the Index through
  774. commands specified using XML.
  775.  
  776. Note: Since solr1.1 requestHandlers requires a valid content
  777. type header if posted in the body. For example, curl now
  778. requires: -H 'Content-type:text/xml; charset=utf-8'
  779. -->
  780. <requestHandler name="/update"
  781. class="solr.XmlUpdateRequestHandler">
  782. <!-- See below for information on defining
  783. updateRequestProcessorChains that can be used by name
  784. on each Update Request
  785. -->
  786. <!--
  787. <lst name="defaults">
  788. <str name="update.chain">dedupe</str>
  789. </lst>
  790. -->
  791. </requestHandler>
  792. <!-- Binary Update Request Handler
  793. http://wiki.apache.org/solr/javabin
  794. -->
  795. <requestHandler name="/update/javabin"
  796. class="solr.BinaryUpdateRequestHandler" />
  797.  
  798. <!-- CSV Update Request Handler
  799. http://wiki.apache.org/solr/UpdateCSV
  800. -->
  801. <requestHandler name="/update/csv"
  802. class="solr.CSVRequestHandler"
  803. startup="lazy" />
  804.  
  805. <!-- JSON Update Request Handler
  806. http://wiki.apache.org/solr/UpdateJSON
  807. -->
  808. <requestHandler name="/update/json"
  809. class="solr.JsonUpdateRequestHandler"
  810. startup="lazy" />
  811.  
  812. <!-- Solr Cell Update Request Handler
  813.  
  814. http://wiki.apache.org/solr/ExtractingRequestHandler
  815.  
  816. -->
  817. <requestHandler name="/update/extract"
  818. startup="lazy"
  819. class="solr.extraction.ExtractingRequestHandler" >
  820. <lst name="defaults">
  821. <!-- All the main content goes into "text"... if you need to return
  822. the extracted text or do highlighting, use a stored field. -->
  823. <str name="fmap.content">text</str>
  824. <str name="lowernames">true</str>
  825. <str name="uprefix">ignored_</str>
  826.  
  827. <!-- capture link hrefs but ignore div attributes -->
  828. <str name="captureAttr">true</str>
  829. <str name="fmap.a">links</str>
  830. <str name="fmap.div">ignored_</str>
  831. </lst>
  832. </requestHandler>
  833.  
  834. <!-- XSLT Update Request Handler
  835. Transforms incoming XML with stylesheet identified by tr=
  836. -->
  837. <requestHandler name="/update/xslt"
  838. startup="lazy"
  839. class="solr.XsltUpdateRequestHandler"/>
  840.  
  841. <!-- Field Analysis Request Handler
  842.  
  843. RequestHandler that provides much the same functionality as
  844. analysis.jsp. Provides the ability to specify multiple field
  845. types and field names in the same request and outputs
  846. index-time and query-time analysis for each of them.
  847.  
  848. Request parameters are:
  849. analysis.fieldname - field name whose analyzers are to be used
  850.  
  851. analysis.fieldtype - field type whose analyzers are to be used
  852. analysis.fieldvalue - text for index-time analysis
  853. q (or analysis.q) - text for query time analysis
  854. analysis.showmatch (true|false) - When set to true and when
  855. query analysis is performed, the produced tokens of the
  856. field value analysis will be marked as "matched" for every
  857. token that is produces by the query analysis
  858. -->
  859. <requestHandler name="/analysis/field"
  860. startup="lazy"
  861. class="solr.FieldAnalysisRequestHandler" />
  862.  
  863.  
  864. <!-- Document Analysis Handler
  865.  
  866. http://wiki.apache.org/solr/AnalysisRequestHandler
  867.  
  868. An analysis handler that provides a breakdown of the analysis
  869. process of provided docuemnts. This handler expects a (single)
  870. content stream with the following format:
  871.  
  872. <docs>
  873. <doc>
  874. <field name="id">1</field>
  875. <field name="name">The Name</field>
  876. <field name="text">The Text Value</field>
  877. </doc>
  878. <doc>...</doc>
  879. <doc>...</doc>
  880. ...
  881. </docs>
  882.  
  883. Note: Each document must contain a field which serves as the
  884. unique key. This key is used in the returned response to associate
  885. an analysis breakdown to the analyzed document.
  886.  
  887. Like the FieldAnalysisRequestHandler, this handler also supports
  888. query analysis by sending either an "analysis.query" or "q"
  889. request parameter that holds the query text to be analyzed. It
  890. also supports the "analysis.showmatch" parameter which when set to
  891. true, all field tokens that match the query tokens will be marked
  892. as a "match".
  893. -->
  894. <requestHandler name="/analysis/document"
  895. class="solr.DocumentAnalysisRequestHandler"
  896. startup="lazy" />
  897.  
  898. <!-- Admin Handlers
  899.  
  900. Admin Handlers - This will register all the standard admin
  901. RequestHandlers.
  902. -->
  903. <requestHandler name="/admin/"
  904. class="solr.admin.AdminHandlers" />
  905. <!-- This single handler is equivalent to the following... -->
  906. <!--
  907. <requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
  908. <requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
  909. <requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
  910. <requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
  911. <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
  912. <requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
  913. -->
  914. <!-- If you wish to hide files under ${solr.home}/conf, explicitly
  915. register the ShowFileRequestHandler using:
  916. -->
  917. <!--
  918. <requestHandler name="/admin/file"
  919. class="solr.admin.ShowFileRequestHandler" >
  920. <lst name="invariants">
  921. <str name="hidden">synonyms.txt</str>
  922. <str name="hidden">anotherfile.txt</str>
  923. </lst>
  924. </requestHandler>
  925. -->
  926.  
  927. <!-- ping/healthcheck -->
  928. <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
  929. <lst name="invariants">
  930. <str name="qt">search</str>
  931. <str name="q">solrpingquery</str>
  932. </lst>
  933. <lst name="defaults">
  934. <str name="echoParams">all</str>
  935. </lst>
  936. </requestHandler>
  937.  
  938. <!-- Echo the request contents back to the client -->
  939. <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
  940. <lst name="defaults">
  941. <str name="echoParams">explicit</str>
  942. <str name="echoHandler">true</str>
  943. </lst>
  944. </requestHandler>
  945.  
  946. <!-- Solr Replication
  947.  
  948. The SolrReplicationHandler supports replicating indexes from a
  949. "master" used for indexing and "salves" used for queries.
  950.  
  951. http://wiki.apache.org/solr/SolrReplication
  952.  
  953. In the example below, remove the <lst name="master"> section if
  954. this is just a slave and remove the <lst name="slave"> section
  955. if this is just a master.
  956. -->
  957. <!--
  958. <requestHandler name="/replication" class="solr.ReplicationHandler" >
  959. <lst name="master">
  960. <str name="replicateAfter">commit</str>
  961. <str name="replicateAfter">startup</str>
  962. <str name="confFiles">schema.xml,stopwords.txt</str>
  963. </lst>
  964. <lst name="slave">
  965. <str name="masterUrl">http://localhost:8983/solr/replication</str>
  966. <str name="pollInterval">00:00:60</str>
  967. </lst>
  968. </requestHandler>
  969. -->
  970.  
  971. <!-- Search Components
  972.  
  973. Search components are registered to SolrCore and used by
  974. instances of SearchHandler (which can access them by name)
  975.  
  976. By default, the following components are available:
  977.  
  978. <searchComponent name="query" class="solr.QueryComponent" />
  979. <searchComponent name="facet" class="solr.FacetComponent" />
  980. <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
  981. <searchComponent name="highlight" class="solr.HighlightComponent" />
  982. <searchComponent name="stats" class="solr.StatsComponent" />
  983. <searchComponent name="debug" class="solr.DebugComponent" />
  984.  
  985. Default configuration in a requestHandler would look like:
  986.  
  987. <arr name="components">
  988. <str>query</str>
  989. <str>facet</str>
  990. <str>mlt</str>
  991. <str>highlight</str>
  992. <str>stats</str>
  993. <str>debug</str>
  994. </arr>
  995.  
  996. If you register a searchComponent to one of the standard names,
  997. that will be used instead of the default.
  998.  
  999. To insert components before or after the 'standard' components, use:
  1000.  
  1001. <arr name="first-components">
  1002. <str>myFirstComponentName</str>
  1003. </arr>
  1004.  
  1005. <arr name="last-components">
  1006. <str>myLastComponentName</str>
  1007. </arr>
  1008.  
  1009. NOTE: The component registered with the name "debug" will
  1010. always be executed after the "last-components"
  1011.  
  1012. -->
  1013.  
  1014. <!-- Spell Check
  1015.  
  1016. The spell check component can return a list of alternative spelling
  1017. suggestions.
  1018.  
  1019. http://wiki.apache.org/solr/SpellCheckComponent
  1020. -->
  1021. <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  1022.  
  1023. <str name="queryAnalyzerFieldType">textSpell</str>
  1024.  
  1025. <!-- Multiple "Spell Checkers" can be declared and used by this
  1026. component
  1027. -->
  1028.  
  1029. <!-- a spellchecker built from a field of the main index -->
  1030. <lst name="spellchecker">
  1031. <str name="name">default</str>
  1032. <str name="field">name</str>
  1033. <str name="classname">solr.DirectSolrSpellChecker</str>
  1034. <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
  1035. <str name="distanceMeasure">internal</str>
  1036. <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
  1037. <float name="accuracy">0.5</float>
  1038. <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
  1039. <int name="maxEdits">2</int>
  1040. <!-- the minimum shared prefix when enumerating terms -->
  1041. <int name="minPrefix">1</int>
  1042. <!-- maximum number of inspections per result. -->
  1043. <int name="maxInspections">5</int>
  1044. <!-- minimum length of a query term to be considered for correction -->
  1045. <int name="minQueryLength">4</int>
  1046. <!-- maximum threshold of documents a query term can appear to be considered for correction -->
  1047. <float name="maxQueryFrequency">0.01</float>
  1048. <!-- uncomment this to require suggestions to occur in 1% of the documents
  1049. <float name="thresholdTokenFrequency">.01</float>
  1050. -->
  1051. </lst>
  1052.  
  1053. <!-- a spellchecker that uses a different distance measure -->
  1054. <!--
  1055. <lst name="spellchecker">
  1056. <str name="name">jarowinkler</str>
  1057. <str name="field">spell</str>
  1058. <str name="classname">solr.DirectSolrSpellChecker</str>
  1059. <str name="distanceMeasure">
  1060. org.apache.lucene.search.spell.JaroWinklerDistance
  1061. </str>
  1062. </lst>
  1063. -->
  1064.  
  1065. <!-- a spellchecker that use an alternate comparator
  1066.  
  1067. comparatorClass be one of:
  1068. 1. score (default)
  1069. 2. freq (Frequency first, then score)
  1070. 3. A fully qualified class name
  1071. -->
  1072. <!--
  1073. <lst name="spellchecker">
  1074. <str name="name">freq</str>
  1075. <str name="field">lowerfilt</str>
  1076. <str name="classname">solr.DirectSolrSpellChecker</str>
  1077. <str name="comparatorClass">freq</str>
  1078. -->
  1079.  
  1080. <!-- A spellchecker that reads the list of words from a file -->
  1081. <!--
  1082. <lst name="spellchecker">
  1083. <str name="classname">solr.FileBasedSpellChecker</str>
  1084. <str name="name">file</str>
  1085. <str name="sourceLocation">spellings.txt</str>
  1086. <str name="characterEncoding">UTF-8</str>
  1087. <str name="spellcheckIndexDir">spellcheckerFile</str>
  1088. </lst>
  1089. -->
  1090. </searchComponent>
  1091.  
  1092. <!-- A request handler for demonstrating the spellcheck component.
  1093.  
  1094. NOTE: This is purely as an example. The whole purpose of the
  1095. SpellCheckComponent is to hook it into the request handler that
  1096. handles your normal user queries so that a separate request is
  1097. not needed to get suggestions.
  1098.  
  1099. IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
  1100. NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
  1101.  
  1102. See http://wiki.apache.org/solr/SpellCheckComponent for details
  1103. on the request parameters.
  1104. -->
  1105. <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
  1106. <lst name="defaults">
  1107. <str name="spellcheck.onlyMorePopular">false</str>
  1108. <str name="spellcheck.extendedResults">false</str>
  1109. <str name="spellcheck.count">1</str>
  1110. </lst>
  1111. <arr name="last-components">
  1112. <str>spellcheck</str>
  1113. </arr>
  1114. </requestHandler>
  1115.  
  1116. <!-- Term Vector Component
  1117.  
  1118. http://wiki.apache.org/solr/TermVectorComponent
  1119. -->
  1120. <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
  1121.  
  1122. <!-- A request handler for demonstrating the term vector component
  1123.  
  1124. This is purely as an example.
  1125.  
  1126. In reality you will likely want to add the component to your
  1127. already specified request handlers.
  1128. -->
  1129. <requestHandler name="tvrh" class="solr.SearchHandler" startup="lazy">
  1130. <lst name="defaults">
  1131. <bool name="tv">true</bool>
  1132. </lst>
  1133. <arr name="last-components">
  1134. <str>tvComponent</str>
  1135. </arr>
  1136. </requestHandler>
  1137.  
  1138. <!-- Clustering Component
  1139.  
  1140. http://wiki.apache.org/solr/ClusteringComponent
  1141.  
  1142. You'll need to set the solr.cluster.enabled system property
  1143. when running solr to run with clustering enabled:
  1144.  
  1145. java -Dsolr.clustering.enabled=true -jar start.jar
  1146. -->
  1147. <searchComponent name="clustering"
  1148. enable="${solr.clustering.enabled:false}"
  1149. class="solr.clustering.ClusteringComponent" >
  1150. <!-- Declare an engine -->
  1151. <lst name="engine">
  1152. <!-- The name, only one can be named "default" -->
  1153. <str name="name">default</str>
  1154.  
  1155. <!-- Class name of Carrot2 clustering algorithm.
  1156.  
  1157. Currently available algorithms are:
  1158.  
  1159. * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
  1160. * org.carrot2.clustering.stc.STCClusteringAlgorithm
  1161. * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
  1162.  
  1163. See http://project.carrot2.org/algorithms.html for the
  1164. algorithm's characteristics.
  1165. -->
  1166. <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
  1167.  
  1168. <!-- Overriding values for Carrot2 default algorithm attributes.
  1169.  
  1170. For a description of all available attributes, see:
  1171. http://download.carrot2.org/stable/manual/#chapter.components.
  1172. Use attribute key as name attribute of str elements
  1173. below. These can be further overridden for individual
  1174. requests by specifying attribute key as request parameter
  1175. name and attribute value as parameter value.
  1176. -->
  1177. <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
  1178.  
  1179. <!-- Location of Carrot2 lexical resources.
  1180.  
  1181. A directory from which to load Carrot2-specific stop words
  1182. and stop labels. Absolute or relative to Solr config directory.
  1183. If a specific resource (e.g. stopwords.en) is present in the
  1184. specified dir, it will completely override the corresponding
  1185. default one that ships with Carrot2.
  1186.  
  1187. For an overview of Carrot2 lexical resources, see:
  1188. http://download.carrot2.org/head/manual/#chapter.lexical-resources
  1189. -->
  1190. <str name="carrot.lexicalResourcesDir">clustering/carrot2</str>
  1191.  
  1192. <!-- The language to assume for the documents.
  1193.  
  1194. For a list of allowed values, see:
  1195. http://download.carrot2.org/stable/manual/#section.attribute.lingo.MultilingualClustering.defaultLanguage
  1196. -->
  1197. <str name="MultilingualClustering.defaultLanguage">ENGLISH</str>
  1198. </lst>
  1199. <lst name="engine">
  1200. <str name="name">stc</str>
  1201. <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
  1202. </lst>
  1203. </searchComponent>
  1204.  
  1205. <!-- A request handler for demonstrating the clustering component
  1206.  
  1207. This is purely as an example.
  1208.  
  1209. In reality you will likely want to add the component to your
  1210. already specified request handlers.
  1211. -->
  1212. <requestHandler name="/clustering"
  1213. startup="lazy"
  1214. enable="${solr.clustering.enabled:false}"
  1215. class="solr.SearchHandler">
  1216. <lst name="defaults">
  1217. <bool name="clustering">true</bool>
  1218. <str name="clustering.engine">default</str>
  1219. <bool name="clustering.results">true</bool>
  1220. <!-- The title field -->
  1221. <str name="carrot.title">name</str>
  1222. <str name="carrot.url">id</str>
  1223. <!-- The field to cluster on -->
  1224. <str name="carrot.snippet">features</str>
  1225. <!-- produce summaries -->
  1226. <bool name="carrot.produceSummary">true</bool>
  1227. <!-- the maximum number of labels per cluster -->
  1228. <!--<int name="carrot.numDescriptions">5</int>-->
  1229. <!-- produce sub clusters -->
  1230. <bool name="carrot.outputSubClusters">false</bool>
  1231.  
  1232. <str name="defType">edismax</str>
  1233. <str name="qf">
  1234. text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
  1235. </str>
  1236. <str name="q.alt">*:*</str>
  1237. <str name="rows">10</str>
  1238. <str name="fl">*,score</str>
  1239. </lst>
  1240. <arr name="last-components">
  1241. <str>clustering</str>
  1242. </arr>
  1243. </requestHandler>
  1244.  
  1245. <!-- Terms Component
  1246.  
  1247. http://wiki.apache.org/solr/TermsComponent
  1248.  
  1249. A component to return terms and document frequency of those
  1250. terms
  1251. -->
  1252. <searchComponent name="terms" class="solr.TermsComponent"/>
  1253.  
  1254. <!-- A request handler for demonstrating the terms component -->
  1255. <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
  1256. <lst name="defaults">
  1257. <bool name="terms">true</bool>
  1258. </lst>
  1259. <arr name="components">
  1260. <str>terms</str>
  1261. </arr>
  1262. </requestHandler>
  1263.  
  1264.  
  1265. <!-- Query Elevation Component
  1266.  
  1267. http://wiki.apache.org/solr/QueryElevationComponent
  1268.  
  1269. a search component that enables you to configure the top
  1270. results for a given query regardless of the normal lucene
  1271. scoring.
  1272. -->
  1273. <!-- <searchComponent name="elevator" class="solr.QueryElevationComponent" >
  1274. <str name="queryFieldType">string</str>
  1275. <str name="config-file">elevate.xml</str>
  1276. </searchComponent> -->
  1277.  
  1278. <!-- A request handler for demonstrating the elevator component -->
  1279. <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
  1280. <lst name="defaults">
  1281. <str name="echoParams">explicit</str>
  1282. </lst>
  1283. <arr name="last-components">
  1284. <str>elevator</str>
  1285. </arr>
  1286. </requestHandler>
  1287.  
  1288. <!-- Highlighting Component
  1289.  
  1290. http://wiki.apache.org/solr/HighlightingParameters
  1291. -->
  1292. <searchComponent class="solr.HighlightComponent" name="highlight">
  1293. <highlighting>
  1294. <!-- Configure the standard fragmenter -->
  1295. <!-- This could most likely be commented out in the "default" case -->
  1296. <fragmenter name="gap"
  1297. default="true"
  1298. class="solr.highlight.GapFragmenter">
  1299. <lst name="defaults">
  1300. <int name="hl.fragsize">100</int>
  1301. </lst>
  1302. </fragmenter>
  1303.  
  1304. <!-- A regular-expression-based fragmenter
  1305. (for sentence extraction)
  1306. -->
  1307. <fragmenter name="regex"
  1308. class="solr.highlight.RegexFragmenter">
  1309. <lst name="defaults">
  1310. <!-- slightly smaller fragsizes work better because of slop -->
  1311. <int name="hl.fragsize">70</int>
  1312. <!-- allow 50% slop on fragment sizes -->
  1313. <float name="hl.regex.slop">0.5</float>
  1314. <!-- a basic sentence pattern -->
  1315. <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
  1316. </lst>
  1317. </fragmenter>
  1318.  
  1319. <!-- Configure the standard formatter -->
  1320. <formatter name="html"
  1321. default="true"
  1322. class="solr.highlight.HtmlFormatter">
  1323. <lst name="defaults">
  1324. <str name="hl.simple.pre"><![CDATA[<em>]]></str>
  1325. <str name="hl.simple.post"><![CDATA[</em>]]></str>
  1326. </lst>
  1327. </formatter>
  1328.  
  1329. <!-- Configure the standard encoder -->
  1330. <encoder name="html"
  1331. class="solr.highlight.HtmlEncoder" />
  1332.  
  1333. <!-- Configure the standard fragListBuilder -->
  1334. <fragListBuilder name="simple"
  1335. default="true"
  1336. class="solr.highlight.SimpleFragListBuilder"/>
  1337.  
  1338. <!-- Configure the single fragListBuilder -->
  1339. <fragListBuilder name="single"
  1340. class="solr.highlight.SingleFragListBuilder"/>
  1341.  
  1342. <!-- default tag FragmentsBuilder -->
  1343. <fragmentsBuilder name="default"
  1344. default="true"
  1345. class="solr.highlight.ScoreOrderFragmentsBuilder">
  1346. <!--
  1347. <lst name="defaults">
  1348. <str name="hl.multiValuedSeparatorChar">/</str>
  1349. </lst>
  1350. -->
  1351. </fragmentsBuilder>
  1352.  
  1353. <!-- multi-colored tag FragmentsBuilder -->
  1354. <fragmentsBuilder name="colored"
  1355. class="solr.highlight.ScoreOrderFragmentsBuilder">
  1356. <lst name="defaults">
  1357. <str name="hl.tag.pre"><![CDATA[
  1358. <b style="background:yellow">,<b style="background:lawgreen">,
  1359. <b style="background:aquamarine">,<b style="background:magenta">,
  1360. <b style="background:palegreen">,<b style="background:coral">,
  1361. <b style="background:wheat">,<b style="background:khaki">,
  1362. <b style="background:lime">,<b style="background:deepskyblue">]]></str>
  1363. <str name="hl.tag.post"><![CDATA[</b>]]></str>
  1364. </lst>
  1365. </fragmentsBuilder>
  1366.  
  1367. <boundaryScanner name="default"
  1368. default="true"
  1369. class="solr.highlight.SimpleBoundaryScanner">
  1370. <lst name="defaults">
  1371. <str name="hl.bs.maxScan">10</str>
  1372. <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
  1373. </lst>
  1374. </boundaryScanner>
  1375.  
  1376. <boundaryScanner name="breakIterator"
  1377. class="solr.highlight.BreakIteratorBoundaryScanner">
  1378. <lst name="defaults">
  1379. <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
  1380. <str name="hl.bs.type">WORD</str>
  1381. <!-- language and country are used when constructing Locale object. -->
  1382. <!-- And the Locale object will be used when getting instance of BreakIterator -->
  1383. <str name="hl.bs.language">en</str>
  1384. <str name="hl.bs.country">US</str>
  1385. </lst>
  1386. </boundaryScanner>
  1387. </highlighting>
  1388. </searchComponent>
  1389.  
  1390. <fieldInputTransformer name="dse" class="com.datastax.bdp.cassandra.index.solr.CopyFieldInputTransformer">
  1391. <str name="source">textvalue,textvalue2,stringvalue</str>
  1392. <str name="destination">copytext</str>
  1393. </fieldInputTransformer>
  1394.  
  1395. <!-- <fieldOutputTransformer name="dse" class="com.datastax.bdp.cassandra.index.solr.functional.BinaryFieldOutputTransformer">
  1396. </fieldOutputTransformer> -->
  1397.  
  1398. <!-- Update Processors
  1399.  
  1400. Chains of Update Processor Factories for dealing with Update
  1401. Requests can be declared, and then used by name in Update
  1402. Request Processors
  1403.  
  1404. http://wiki.apache.org/solr/UpdateRequestProcessor
  1405.  
  1406. -->
  1407. <!-- Deduplication
  1408.  
  1409. An example dedup update processor that creates the "id" field
  1410. on the fly based on the hash code of some other fields. This
  1411. example has overwriteDupes set to false since we are using the
  1412. id field as the signatureField and Solr will maintain
  1413. uniqueness based on that anyway.
  1414.  
  1415. -->
  1416. <!--
  1417. <updateRequestProcessorChain name="dedupe">
  1418. <processor class="solr.processor.SignatureUpdateProcessorFactory">
  1419. <bool name="enabled">true</bool>
  1420. <str name="signatureField">id</str>
  1421. <bool name="overwriteDupes">false</bool>
  1422. <str name="fields">name,features,cat</str>
  1423. <str name="signatureClass">solr.processor.Lookup3Signature</str>
  1424. </processor>
  1425. <processor class="solr.LogUpdateProcessorFactory" />
  1426. <processor class="solr.RunUpdateProcessorFactory" />
  1427. </updateRequestProcessorChain>
  1428. -->
  1429.  
  1430. <!-- Language identification
  1431.  
  1432. This example update chain identifies the language of the incoming
  1433. documents using the langid contrib. The detected language is
  1434. written to field language_s. No field name mapping is done.
  1435. The fields used for detection are text, title, subject and description,
  1436. making this example suitable for detecting languages form full-text
  1437. rich documents injected via ExtractingRequestHandler.
  1438. See more about langId at http://wiki.apache.org/solr/LanguageDetection
  1439. -->
  1440. <!--
  1441. <updateRequestProcessorChain name="langid">
  1442. <processor class="org.apache.solr.update.processor.LanguageIdentifierUpdateProcessorFactory">
  1443. <str name="langid.fl">text,title,subject,description</str>
  1444. <str name="langid.langField">language_s</str>
  1445. <str name="langid.fallback">en</str>
  1446. </processor>
  1447. <processor class="solr.LogUpdateProcessorFactory" />
  1448. <processor class="solr.RunUpdateProcessorFactory" />
  1449. </updateRequestProcessorChain>
  1450. -->
  1451.  
  1452. <!-- Response Writers
  1453.  
  1454. http://wiki.apache.org/solr/QueryResponseWriter
  1455.  
  1456. Request responses will be written using the writer specified by
  1457. the 'wt' request parameter matching the name of a registered
  1458. writer.
  1459.  
  1460. The "default" writer is the default and will be used if 'wt' is
  1461. not specified in the request.
  1462. -->
  1463. <!-- The following response writers are implicitly configured unless
  1464. overridden...
  1465. -->
  1466. <!--
  1467. <queryResponseWriter name="xml"
  1468. default="true"
  1469. class="solr.XMLResponseWriter" />
  1470. <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
  1471. <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
  1472. <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
  1473. <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
  1474. <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
  1475. <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter"/>
  1476. <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
  1477. -->
  1478. <!--
  1479. Custom response writers can be declared as needed...
  1480. -->
  1481. <!--
  1482. <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
  1483. -->
  1484.  
  1485. <!-- XSLT response writer transforms the XML output by any xslt file found
  1486. in Solr's conf/xslt directory. Changes to xslt files are checked for
  1487. every xsltCacheLifetimeSeconds.
  1488. -->
  1489. <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
  1490. <int name="xsltCacheLifetimeSeconds">5</int>
  1491. </queryResponseWriter>
  1492.  
  1493. <!-- Query Parsers
  1494.  
  1495. http://wiki.apache.org/solr/SolrQuerySyntax
  1496.  
  1497. Multiple QParserPlugins can be registered by name, and then
  1498. used in either the "defType" param for the QueryComponent (used
  1499. by SearchHandler) or in LocalParams
  1500. -->
  1501. <!-- example of registering a query parser -->
  1502. <!--
  1503. <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
  1504. -->
  1505.  
  1506. <!-- Function Parsers
  1507.  
  1508. http://wiki.apache.org/solr/FunctionQuery
  1509.  
  1510. Multiple ValueSourceParsers can be registered by name, and then
  1511. used as function names when using the "func" QParser.
  1512. -->
  1513. <!-- example of registering a custom function parser -->
  1514. <!--
  1515. <valueSourceParser name="myfunc"
  1516. class="com.mycompany.MyValueSourceParser" />
  1517. -->
  1518.  
  1519.  
  1520. <!-- Document Transformers
  1521. http://wiki.apache.org/solr/DocTransformers
  1522. -->
  1523. <!--
  1524. Could be something like:
  1525. <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
  1526. <int name="connection">jdbc://....</int>
  1527. </transformer>
  1528.  
  1529. To add a constant value to all docs, use:
  1530. <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
  1531. <int name="value">5</int>
  1532. </transformer>
  1533.  
  1534. If you want the user to still be able to change it with _value:something_ use this:
  1535. <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
  1536. <double name="defaultValue">5</double>
  1537. </transformer>
  1538. -->
  1539.  
  1540.  
  1541. <!-- Legacy config for the admin interface -->
  1542. <admin>
  1543. <defaultQuery>*:*</defaultQuery>
  1544.  
  1545. <!-- configure a healthcheck file for servers behind a
  1546. loadbalancer
  1547. -->
  1548. <!--
  1549. <healthcheck type="file">server-enabled</healthcheck>
  1550. -->
  1551. </admin>
  1552.  
  1553. </config>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement