Aucune description
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

etc_solr_conf_solrconfig.xml 59KB

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