solrconfig.xml 61 KB

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