solrconfig.xml 59 KB

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