solrconfig.xml 59 KB

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