solrconfig.xml 70 KB

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