Advertisement
Guest User

Untitled

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