solrconfig.xml 60 KB

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