solrconfig.xml 60 KB

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