Advertisement
Guest User

solrconfigxml

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