solrconfig.xml 71 KB

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