solrconfig.xml 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!--
  17. For more details about configurations options that may appear in
  18. this file, see http://wiki.apache.org/solr/SolrConfigXml.
  19. -->
  20. <config>
  21. <!-- In all configuration below, a prefix of "solr." for class names
  22. is an alias that causes solr to search appropriate packages,
  23. including org.apache.solr.(search|update|request|core|analysis)
  24. You may also specify a fully qualified Java classname if you
  25. have your own custom plugins.
  26. -->
  27. <!-- Controls what version of Lucene various components of Solr
  28. adhere to. Generally, you want to use the latest version to
  29. get all bug fixes and improvements. It is highly recommended
  30. that you fully re-index after changing this setting as it can
  31. affect both how text is indexed and queried.
  32. -->
  33. <luceneMatchVersion>5.5.2</luceneMatchVersion>
  34. <!-- <lib/> directives can be used to instruct Solr to load any Jars
  35. identified and use them to resolve any "plugins" specified in
  36. your solrconfig.xml or schema.xml (ie: Analyzers, Request
  37. Handlers, etc...).
  38. All directories and paths are resolved relative to the
  39. instanceDir.
  40. Please note that <lib/> directives are processed in the order
  41. that they appear in your solrconfig.xml file, and are "stacked"
  42. on top of each other when building a ClassLoader - so if you have
  43. plugin jars with dependencies on other jars, the "lower level"
  44. dependency jars should be loaded first.
  45. If a "./lib" directory exists in your instanceDir, all files
  46. found in it are included as if you had used the following
  47. syntax...
  48. <lib dir="./lib" />
  49. -->
  50. <!-- A 'dir' option by itself adds any files found in the directory
  51. to the classpath, this is useful for including all jars in a
  52. directory.
  53. When a 'regex' is specified in addition to a 'dir', only the
  54. files in that directory which completely match the regex
  55. (anchored on both ends) will be included.
  56. If a 'dir' option (with or without a regex) is used and nothing
  57. is found that matches, a warning will be logged.
  58. The examples below can be used to load some solr-contribs along
  59. with their external dependencies.
  60. -->
  61. <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
  62. <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
  63. <lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />
  64. <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" />
  65. <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />
  66. <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />
  67. <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
  68. <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
  69. <!-- an exact 'path' can be used instead of a 'dir' to specify a
  70. specific jar file. This will cause a serious error to be logged
  71. if it can't be loaded.
  72. -->
  73. <!--
  74. <lib path="../a-jar-that-does-not-exist.jar" />
  75. -->
  76. <!-- Data Directory
  77. Used to specify an alternate directory to hold all index data
  78. other than the default ./data under the Solr home. If
  79. replication is in use, this should match the replication
  80. configuration.
  81. -->
  82. <dataDir>${solr.data.dir:}</dataDir>
  83. <!-- The DirectoryFactory to use for indexes.
  84. solr.StandardDirectoryFactory is filesystem
  85. based and tries to pick the best implementation for the current
  86. JVM and platform. solr.NRTCachingDirectoryFactory, the default,
  87. wraps solr.StandardDirectoryFactory and caches small files in memory
  88. for better NRT performance.
  89. One can force a particular implementation via solr.MMapDirectoryFactory,
  90. solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
  91. solr.RAMDirectoryFactory is memory based, not
  92. persistent, and doesn't work with replication.
  93. -->
  94. <directoryFactory name="DirectoryFactory"
  95. class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
  96. <!-- The CodecFactory for defining the format of the inverted index.
  97. The default implementation is SchemaCodecFactory, which is the official Lucene
  98. index format, but hooks into the schema to provide per-field customization of
  99. the postings lists and per-document values in the fieldType element
  100. (postingsFormat/docValuesFormat). Note that most of the alternative implementations
  101. are experimental, so if you choose to customize the index format, it's a good
  102. idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
  103. before upgrading to a newer version to avoid unnecessary reindexing.
  104. A "compressionMode" string element can be added to <codecFactory> to choose
  105. between the existing compression modes in the default codec: "BEST_SPEED" (default)
  106. or "BEST_COMPRESSION".
  107. -->
  108. <codecFactory class="solr.SchemaCodecFactory"/>
  109. <!-- To disable dynamic schema REST APIs, use the following for <schemaFactory>:
  110. <schemaFactory class="ClassicIndexSchemaFactory"/>
  111. When ManagedIndexSchemaFactory is specified instead, Solr will load the schema from
  112. the resource named in 'managedSchemaResourceName', rather than from schema.xml.
  113. Note that the managed schema resource CANNOT be named schema.xml. If the managed
  114. schema does not exist, Solr will create it after reading schema.xml, then rename
  115. 'schema.xml' to 'schema.xml.bak'.
  116. Do NOT hand edit the managed schema - external modifications will be ignored and
  117. overwritten as a result of schema modification REST API calls.
  118. When ManagedIndexSchemaFactory is specified with mutable = true, schema
  119. modification REST API calls will be allowed; otherwise, error responses will be
  120. sent back for these requests.
  121. -->
  122. <schemaFactory class="ManagedIndexSchemaFactory">
  123. <bool name="mutable">true</bool>
  124. <str name="managedSchemaResourceName">managed-schema</str>
  125. </schemaFactory>
  126. <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  127. Index Config - These settings control low-level behavior of indexing
  128. Most example settings here show the default value, but are commented
  129. out, to more easily see where customizations have been made.
  130. Note: This replaces <indexDefaults> and <mainIndex> from older versions
  131. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  132. <indexConfig>
  133. <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
  134. LimitTokenCountFilterFactory in your fieldType definition. E.g.
  135. <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
  136. -->
  137. <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
  138. <!-- <writeLockTimeout>1000</writeLockTimeout> -->
  139. <!-- Expert: Enabling compound file will use less files for the index,
  140. using fewer file descriptors on the expense of performance decrease.
  141. Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
  142. <!-- <useCompoundFile>false</useCompoundFile> -->
  143. <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
  144. indexing for buffering added documents and deletions before they are
  145. flushed to the Directory.
  146. maxBufferedDocs sets a limit on the number of documents buffered
  147. before flushing.
  148. If both ramBufferSizeMB and maxBufferedDocs is set, then
  149. Lucene will flush based on whichever limit is hit first. -->
  150. <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
  151. <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
  152. <!-- Expert: Merge Policy
  153. The Merge Policy in Lucene controls how merging of segments is done.
  154. The default since Solr/Lucene 3.3 is TieredMergePolicy.
  155. The default since Lucene 2.3 was the LogByteSizeMergePolicy,
  156. Even older versions of Lucene used LogDocMergePolicy.
  157. -->
  158. <!--
  159. <mergePolicyFactory class="org.apache.solr.index.TieredMergePolicyFactory">
  160. <int name="maxMergeAtOnce">10</int>
  161. <int name="segmentsPerTier">10</int>
  162. <double name="noCFSRatio">0.1</double>
  163. </mergePolicyFactory>
  164. -->
  165. <!-- Expert: Merge Scheduler
  166. The Merge Scheduler in Lucene controls how merges are
  167. performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
  168. can perform merges in the background using separate threads.
  169. The SerialMergeScheduler (Lucene 2.2 default) does not.
  170. -->
  171. <!--
  172. <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
  173. -->
  174. <!-- LockFactory
  175. This option specifies which Lucene LockFactory implementation
  176. to use.
  177. single = SingleInstanceLockFactory - suggested for a
  178. read-only index or when there is no possibility of
  179. another process trying to modify the index.
  180. native = NativeFSLockFactory - uses OS native file locking.
  181. Do not use when multiple solr webapps in the same
  182. JVM are attempting to share a single index.
  183. simple = SimpleFSLockFactory - uses a plain file for locking
  184. Defaults: 'native' is default for Solr3.6 and later, otherwise
  185. 'simple' is the default
  186. More details on the nuances of each LockFactory...
  187. http://wiki.apache.org/lucene-java/AvailableLockFactories
  188. -->
  189. <lockType>${solr.lock.type:native}</lockType>
  190. <!-- Commit Deletion Policy
  191. Custom deletion policies can be specified here. The class must
  192. implement org.apache.lucene.index.IndexDeletionPolicy.
  193. The default Solr IndexDeletionPolicy implementation supports
  194. deleting index commit points on number of commits, age of
  195. commit point and optimized status.
  196. The latest commit point should always be preserved regardless
  197. of the criteria.
  198. -->
  199. <!--
  200. <deletionPolicy class="solr.SolrDeletionPolicy">
  201. -->
  202. <!-- The number of commit points to be kept -->
  203. <!-- <str name="maxCommitsToKeep">1</str> -->
  204. <!-- The number of optimized commit points to be kept -->
  205. <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
  206. <!--
  207. Delete all commit points once they have reached the given age.
  208. Supports DateMathParser syntax e.g.
  209. -->
  210. <!--
  211. <str name="maxCommitAge">30MINUTES</str>
  212. <str name="maxCommitAge">1DAY</str>
  213. -->
  214. <!--
  215. </deletionPolicy>
  216. -->
  217. <!-- Lucene Infostream
  218. To aid in advanced debugging, Lucene provides an "InfoStream"
  219. of detailed information when indexing.
  220. Setting The value to true will instruct the underlying Lucene
  221. IndexWriter to write its debugging info the specified file
  222. -->
  223. <!-- <infoStream file="INFOSTREAM.txt">false</infoStream> -->
  224. </indexConfig>
  225. <!-- JMX
  226. This example enables JMX if and only if an existing MBeanServer
  227. is found, use this if you want to configure JMX through JVM
  228. parameters. Remove this to disable exposing Solr configuration
  229. and statistics to JMX.
  230. For more details see http://wiki.apache.org/solr/SolrJmx
  231. -->
  232. <jmx />
  233. <!-- If you want to connect to a particular server, specify the
  234. agentId
  235. -->
  236. <!-- <jmx agentId="myAgent" /> -->
  237. <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
  238. <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
  239. -->
  240. <!-- The default high-performance update handler -->
  241. <updateHandler class="solr.DirectUpdateHandler2">
  242. <!-- Enables a transaction log, used for real-time get, durability, and
  243. and solr cloud replica recovery. The log can grow as big as
  244. uncommitted changes to the index, so use of a hard autoCommit
  245. is recommended (see below).
  246. "dir" - the target directory for transaction logs, defaults to the
  247. solr data directory.
  248. "numVersionBuckets" - sets the number of buckets used to keep
  249. track of max version values when checking for re-ordered
  250. updates; increase this value to reduce the cost of
  251. synchronizing access to version buckets during high-volume
  252. indexing, this requires 8 bytes (long) * numVersionBuckets
  253. of heap space per Solr core.
  254. -->
  255. <updateLog>
  256. <str name="dir">${solr.ulog.dir:}</str>
  257. <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>
  258. </updateLog>
  259. <!-- AutoCommit
  260. Perform a hard commit automatically under certain conditions.
  261. Instead of enabling autoCommit, consider using "commitWithin"
  262. when adding documents.
  263. http://wiki.apache.org/solr/UpdateXmlMessages
  264. maxDocs - Maximum number of documents to add since the last
  265. commit before automatically triggering a new commit.
  266. maxTime - Maximum amount of time in ms that is allowed to pass
  267. since a document was added before automatically
  268. triggering a new commit.
  269. openSearcher - if false, the commit causes recent index changes
  270. to be flushed to stable storage, but does not cause a new
  271. searcher to be opened to make those changes visible.
  272. If the updateLog is enabled, then it's highly recommended to
  273. have some sort of hard autoCommit to limit the log size.
  274. -->
  275. <autoCommit>
  276. <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
  277. <openSearcher>false</openSearcher>
  278. </autoCommit>
  279. <!-- softAutoCommit is like autoCommit except it causes a
  280. 'soft' commit which only ensures that changes are visible
  281. but does not ensure that data is synced to disk. This is
  282. faster and more near-realtime friendly than a hard commit.
  283. -->
  284. <autoSoftCommit>
  285. <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
  286. </autoSoftCommit>
  287. <!-- Update Related Event Listeners
  288. Various IndexWriter related events can trigger Listeners to
  289. take actions.
  290. postCommit - fired after every commit or optimize command
  291. postOptimize - fired after every optimize command
  292. -->
  293. <!-- The RunExecutableListener executes an external command from a
  294. hook such as postCommit or postOptimize.
  295. exe - the name of the executable to run
  296. dir - dir to use as the current working directory. (default=".")
  297. wait - the calling thread waits until the executable returns.
  298. (default="true")
  299. args - the arguments to pass to the program. (default is none)
  300. env - environment variables to set. (default is none)
  301. -->
  302. <!-- This example shows how RunExecutableListener could be used
  303. with the script based replication...
  304. http://wiki.apache.org/solr/CollectionDistribution
  305. -->
  306. <!--
  307. <listener event="postCommit" class="solr.RunExecutableListener">
  308. <str name="exe">solr/bin/snapshooter</str>
  309. <str name="dir">.</str>
  310. <bool name="wait">true</bool>
  311. <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
  312. <arr name="env"> <str>MYVAR=val1</str> </arr>
  313. </listener>
  314. -->
  315. </updateHandler>
  316. <!-- IndexReaderFactory
  317. Use the following format to specify a custom IndexReaderFactory,
  318. which allows for alternate IndexReader implementations.
  319. ** Experimental Feature **
  320. Please note - Using a custom IndexReaderFactory may prevent
  321. certain other features from working. The API to
  322. IndexReaderFactory may change without warning or may even be
  323. removed from future releases if the problems cannot be
  324. resolved.
  325. ** Features that may not work with custom IndexReaderFactory **
  326. The ReplicationHandler assumes a disk-resident index. Using a
  327. custom IndexReader implementation may cause incompatibility
  328. with ReplicationHandler and may cause replication to not work
  329. correctly. See SOLR-1366 for details.
  330. -->
  331. <!--
  332. <indexReaderFactory name="IndexReaderFactory" class="package.class">
  333. <str name="someArg">Some Value</str>
  334. </indexReaderFactory >
  335. -->
  336. <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  337. Query section - these settings control query time things like caches
  338. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  339. <query>
  340. <!-- Max Boolean Clauses
  341. Maximum number of clauses in each BooleanQuery, an exception
  342. is thrown if exceeded.
  343. ** WARNING **
  344. This option actually modifies a global Lucene property that
  345. will affect all SolrCores. If multiple solrconfig.xml files
  346. disagree on this property, the value at any given moment will
  347. be based on the last SolrCore to be initialized.
  348. -->
  349. <maxBooleanClauses>1024</maxBooleanClauses>
  350. <!-- Solr Internal Query Caches
  351. There are two implementations of cache available for Solr,
  352. LRUCache, based on a synchronized LinkedHashMap, and
  353. FastLRUCache, based on a ConcurrentHashMap.
  354. FastLRUCache has faster gets and slower puts in single
  355. threaded operation and thus is generally faster than LRUCache
  356. when the hit ratio of the cache is high (> 75%), and may be
  357. faster under other scenarios on multi-cpu systems.
  358. -->
  359. <!-- Filter Cache
  360. Cache used by SolrIndexSearcher for filters (DocSets),
  361. unordered sets of *all* documents that match a query. When a
  362. new searcher is opened, its caches may be prepopulated or
  363. "autowarmed" using data from caches in the old searcher.
  364. autowarmCount is the number of items to prepopulate. For
  365. LRUCache, the autowarmed items will be the most recently
  366. accessed items.
  367. Parameters:
  368. class - the SolrCache implementation LRUCache or
  369. (LRUCache or FastLRUCache)
  370. size - the maximum number of entries in the cache
  371. initialSize - the initial capacity (number of entries) of
  372. the cache. (see java.util.HashMap)
  373. autowarmCount - the number of entries to prepopulate from
  374. and old cache.
  375. -->
  376. <filterCache class="solr.FastLRUCache"
  377. size="512"
  378. initialSize="512"
  379. autowarmCount="0"/>
  380. <!-- Query Result Cache
  381. Caches results of searches - ordered lists of document ids
  382. (DocList) based on a query, a sort, and the range of documents requested.
  383. Additional supported parameter by LRUCache:
  384. maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
  385. to occupy
  386. -->
  387. <queryResultCache class="solr.LRUCache"
  388. size="512"
  389. initialSize="512"
  390. autowarmCount="0"/>
  391. <!-- Document Cache
  392. Caches Lucene Document objects (the stored fields for each
  393. document). Since Lucene internal document ids are transient,
  394. this cache will not be autowarmed.
  395. -->
  396. <documentCache class="solr.LRUCache"
  397. size="512"
  398. initialSize="512"
  399. autowarmCount="0"/>
  400. <!-- custom cache currently used by block join -->
  401. <cache name="perSegFilter"
  402. class="solr.search.LRUCache"
  403. size="10"
  404. initialSize="0"
  405. autowarmCount="10"
  406. regenerator="solr.NoOpRegenerator" />
  407. <!-- Field Value Cache
  408. Cache used to hold field values that are quickly accessible
  409. by document id. The fieldValueCache is created by default
  410. even if not configured here.
  411. -->
  412. <!--
  413. <fieldValueCache class="solr.FastLRUCache"
  414. size="512"
  415. autowarmCount="128"
  416. showItems="32" />
  417. -->
  418. <!-- Custom Cache
  419. Example of a generic cache. These caches may be accessed by
  420. name through SolrIndexSearcher.getCache(),cacheLookup(), and
  421. cacheInsert(). The purpose is to enable easy caching of
  422. user/application level data. The regenerator argument should
  423. be specified as an implementation of solr.CacheRegenerator
  424. if autowarming is desired.
  425. -->
  426. <!--
  427. <cache name="myUserCache"
  428. class="solr.LRUCache"
  429. size="4096"
  430. initialSize="1024"
  431. autowarmCount="1024"
  432. regenerator="com.mycompany.MyRegenerator"
  433. />
  434. -->
  435. <!-- Lazy Field Loading
  436. If true, stored fields that are not requested will be loaded
  437. lazily. This can result in a significant speed improvement
  438. if the usual case is to not load all stored fields,
  439. especially if the skipped fields are large compressed text
  440. fields.
  441. -->
  442. <enableLazyFieldLoading>true</enableLazyFieldLoading>
  443. <!-- Use Filter For Sorted Query
  444. A possible optimization that attempts to use a filter to
  445. satisfy a search. If the requested sort does not include
  446. score, then the filterCache will be checked for a filter
  447. matching the query. If found, the filter will be used as the
  448. source of document ids, and then the sort will be applied to
  449. that.
  450. For most situations, this will not be useful unless you
  451. frequently get the same search repeatedly with different sort
  452. options, and none of them ever use "score"
  453. -->
  454. <!--
  455. <useFilterForSortedQuery>true</useFilterForSortedQuery>
  456. -->
  457. <!-- Result Window Size
  458. An optimization for use with the queryResultCache. When a search
  459. is requested, a superset of the requested number of document ids
  460. are collected. For example, if a search for a particular query
  461. requests matching documents 10 through 19, and queryWindowSize is 50,
  462. then documents 0 through 49 will be collected and cached. Any further
  463. requests in that range can be satisfied via the cache.
  464. -->
  465. <queryResultWindowSize>20</queryResultWindowSize>
  466. <!-- Maximum number of documents to cache for any entry in the
  467. queryResultCache.
  468. -->
  469. <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
  470. <!-- Query Related Event Listeners
  471. Various IndexSearcher related events can trigger Listeners to
  472. take actions.
  473. newSearcher - fired whenever a new searcher is being prepared
  474. and there is a current searcher handling requests (aka
  475. registered). It can be used to prime certain caches to
  476. prevent long request times for certain requests.
  477. firstSearcher - fired whenever a new searcher is being
  478. prepared but there is no current registered searcher to handle
  479. requests or to gain autowarming data from.
  480. -->
  481. <!-- QuerySenderListener takes an array of NamedList and executes a
  482. local query request for each NamedList in sequence.
  483. -->
  484. <listener event="newSearcher" class="solr.QuerySenderListener">
  485. <arr name="queries">
  486. <!--
  487. <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
  488. <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
  489. -->
  490. </arr>
  491. </listener>
  492. <listener event="firstSearcher" class="solr.QuerySenderListener">
  493. <arr name="queries">
  494. <!--
  495. <lst>
  496. <str name="q">static firstSearcher warming in solrconfig.xml</str>
  497. </lst>
  498. -->
  499. </arr>
  500. </listener>
  501. <!-- Use Cold Searcher
  502. If a search request comes in and there is no current
  503. registered searcher, then immediately register the still
  504. warming searcher and use it. If "false" then all requests
  505. will block until the first searcher is done warming.
  506. -->
  507. <useColdSearcher>false</useColdSearcher>
  508. <!-- Max Warming Searchers
  509. Maximum number of searchers that may be warming in the
  510. background concurrently. An error is returned if this limit
  511. is exceeded.
  512. Recommend values of 1-2 for read-only slaves, higher for
  513. masters w/o cache warming.
  514. -->
  515. <maxWarmingSearchers>2</maxWarmingSearchers>
  516. </query>
  517. <!-- Request Dispatcher
  518. This section contains instructions for how the SolrDispatchFilter
  519. should behave when processing requests for this SolrCore.
  520. handleSelect is a legacy option that affects the behavior of requests
  521. such as /select?qt=XXX
  522. handleSelect="true" will cause the SolrDispatchFilter to process
  523. the request and dispatch the query to a handler specified by the
  524. "qt" param, assuming "/select" isn't already registered.
  525. handleSelect="false" will cause the SolrDispatchFilter to
  526. ignore "/select" requests, resulting in a 404 unless a handler
  527. is explicitly registered with the name "/select"
  528. handleSelect="true" is not recommended for new users, but is the default
  529. for backwards compatibility
  530. -->
  531. <requestDispatcher handleSelect="false" >
  532. <!-- Request Parsing
  533. These settings indicate how Solr Requests may be parsed, and
  534. what restrictions may be placed on the ContentStreams from
  535. those requests
  536. enableRemoteStreaming - enables use of the stream.file
  537. and stream.url parameters for specifying remote streams.
  538. multipartUploadLimitInKB - specifies the max size (in KiB) of
  539. Multipart File Uploads that Solr will allow in a Request.
  540. formdataUploadLimitInKB - specifies the max size (in KiB) of
  541. form data (application/x-www-form-urlencoded) sent via
  542. POST. You can use POST to pass request parameters not
  543. fitting into the URL.
  544. addHttpRequestToContext - if set to true, it will instruct
  545. the requestParsers to include the original HttpServletRequest
  546. object in the context map of the SolrQueryRequest under the
  547. key "httpRequest". It will not be used by any of the existing
  548. Solr components, but may be useful when developing custom
  549. plugins.
  550. *** WARNING ***
  551. The settings below authorize Solr to fetch remote files, You
  552. should make sure your system has some authentication before
  553. using enableRemoteStreaming="true"
  554. -->
  555. <requestParsers enableRemoteStreaming="true"
  556. multipartUploadLimitInKB="2048000"
  557. formdataUploadLimitInKB="2048"
  558. addHttpRequestToContext="false"/>
  559. <!-- HTTP Caching
  560. Set HTTP caching related parameters (for proxy caches and clients).
  561. The options below instruct Solr not to output any HTTP Caching
  562. related headers
  563. -->
  564. <httpCaching never304="true" />
  565. <!-- If you include a <cacheControl> directive, it will be used to
  566. generate a Cache-Control header (as well as an Expires header
  567. if the value contains "max-age=")
  568. By default, no Cache-Control header is generated.
  569. You can use the <cacheControl> option even if you have set
  570. never304="true"
  571. -->
  572. <!--
  573. <httpCaching never304="true" >
  574. <cacheControl>max-age=30, public</cacheControl>
  575. </httpCaching>
  576. -->
  577. <!-- To enable Solr to respond with automatically generated HTTP
  578. Caching headers, and to response to Cache Validation requests
  579. correctly, set the value of never304="false"
  580. This will cause Solr to generate Last-Modified and ETag
  581. headers based on the properties of the Index.
  582. The following options can also be specified to affect the
  583. values of these headers...
  584. lastModFrom - the default value is "openTime" which means the
  585. Last-Modified value (and validation against If-Modified-Since
  586. requests) will all be relative to when the current Searcher
  587. was opened. You can change it to lastModFrom="dirLastMod" if
  588. you want the value to exactly correspond to when the physical
  589. index was last modified.
  590. etagSeed="..." is an option you can change to force the ETag
  591. header (and validation against If-None-Match requests) to be
  592. different even if the index has not changed (ie: when making
  593. significant changes to your config file)
  594. (lastModifiedFrom and etagSeed are both ignored if you use
  595. the never304="true" option)
  596. -->
  597. <!--
  598. <httpCaching lastModifiedFrom="openTime"
  599. etagSeed="Solr">
  600. <cacheControl>max-age=30, public</cacheControl>
  601. </httpCaching>
  602. -->
  603. </requestDispatcher>
  604. <!-- Request Handlers
  605. http://wiki.apache.org/solr/SolrRequestHandler
  606. Incoming queries will be dispatched to a specific handler by name
  607. based on the path specified in the request.
  608. Legacy behavior: If the request path uses "/select" but no Request
  609. Handler has that name, and if handleSelect="true" has been specified in
  610. the requestDispatcher, then the Request Handler is dispatched based on
  611. the qt parameter. Handlers without a leading '/' are accessed this way
  612. like so: http://host/app/[core/]select?qt=name If no qt is
  613. given, then the requestHandler that declares default="true" will be
  614. used or the one named "standard".
  615. If a Request Handler is declared with startup="lazy", then it will
  616. not be initialized until the first request that uses it.
  617. -->
  618. <!-- SearchHandler
  619. http://wiki.apache.org/solr/SearchHandler
  620. For processing Search Queries, the primary Request Handler
  621. provided with Solr is "SearchHandler" It delegates to a sequent
  622. of SearchComponents (see below) and supports distributed
  623. queries across multiple shards
  624. -->
  625. <requestHandler name="/select" class="solr.SearchHandler">
  626. <!-- default values for query parameters can be specified, these
  627. will be overridden by parameters in the request
  628. -->
  629. <lst name="defaults">
  630. <str name="echoParams">explicit</str>
  631. <int name="rows">10</int>
  632. <!-- <str name="df">text</str> -->
  633. </lst>
  634. <!-- In addition to defaults, "appends" params can be specified
  635. to identify values which should be appended to the list of
  636. multi-val params from the query (or the existing "defaults").
  637. -->
  638. <!-- In this example, the param "fq=instock:true" would be appended to
  639. any query time fq params the user may specify, as a mechanism for
  640. partitioning the index, independent of any user selected filtering
  641. that may also be desired (perhaps as a result of faceted searching).
  642. NOTE: there is *absolutely* nothing a client can do to prevent these
  643. "appends" values from being used, so don't use this mechanism
  644. unless you are sure you always want it.
  645. -->
  646. <!--
  647. <lst name="appends">
  648. <str name="fq">inStock:true</str>
  649. </lst>
  650. -->
  651. <!-- "invariants" are a way of letting the Solr maintainer lock down
  652. the options available to Solr clients. Any params values
  653. specified here are used regardless of what values may be specified
  654. in either the query, the "defaults", or the "appends" params.
  655. In this example, the facet.field and facet.query params would
  656. be fixed, limiting the facets clients can use. Faceting is
  657. not turned on by default - but if the client does specify
  658. facet=true in the request, these are the only facets they
  659. will be able to see counts for; regardless of what other
  660. facet.field or facet.query params they may specify.
  661. NOTE: there is *absolutely* nothing a client can do to prevent these
  662. "invariants" values from being used, so don't use this mechanism
  663. unless you are sure you always want it.
  664. -->
  665. <!--
  666. <lst name="invariants">
  667. <str name="facet.field">cat</str>
  668. <str name="facet.field">manu_exact</str>
  669. <str name="facet.query">price:[* TO 500]</str>
  670. <str name="facet.query">price:[500 TO *]</str>
  671. </lst>
  672. -->
  673. <!-- If the default list of SearchComponents is not desired, that
  674. list can either be overridden completely, or components can be
  675. prepended or appended to the default list. (see below)
  676. -->
  677. <!--
  678. <arr name="components">
  679. <str>nameOfCustomComponent1</str>
  680. <str>nameOfCustomComponent2</str>
  681. </arr>
  682. -->
  683. </requestHandler>
  684. <!-- A request handler that returns indented JSON by default -->
  685. <requestHandler name="/query" class="solr.SearchHandler">
  686. <lst name="defaults">
  687. <str name="echoParams">explicit</str>
  688. <str name="wt">json</str>
  689. <str name="indent">true</str>
  690. </lst>
  691. </requestHandler>
  692. <requestHandler name="/browse" class="solr.SearchHandler" useParams="query,facets,velocity,browse">
  693. <lst name="defaults">
  694. <str name="echoParams">explicit</str>
  695. </lst>
  696. </requestHandler>
  697. <initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell,/browse">
  698. <lst name="defaults">
  699. <str name="df">_text_</str>
  700. </lst>
  701. </initParams>
  702. <initParams path="/update/**">
  703. <lst name="defaults">
  704. <str name="update.chain">add-unknown-fields-to-the-schema</str>
  705. </lst>
  706. </initParams>
  707. <!-- Solr Cell Update Request Handler
  708. http://wiki.apache.org/solr/ExtractingRequestHandler
  709. -->
  710. <requestHandler name="/update/extract"
  711. startup="lazy"
  712. class="solr.extraction.ExtractingRequestHandler" >
  713. <lst name="defaults">
  714. <str name="lowernames">true</str>
  715. <str name="fmap.meta">ignored_</str>
  716. <str name="fmap.content">_text_</str>
  717. </lst>
  718. </requestHandler>
  719. <!--
  720. The export request handler is used to export full sorted result sets.
  721. Do not change these defaults.
  722. -->
  723. <requestHandler name="/export" class="solr.SearchHandler">
  724. <lst name="invariants">
  725. <str name="rq">{!xport}</str>
  726. <str name="wt">xsort</str>
  727. <str name="distrib">false</str>
  728. </lst>
  729. <arr name="components">
  730. <str>query</str>
  731. </arr>
  732. </requestHandler>
  733. <!--
  734. Uncomment for distributed Stream processing.
  735. SECURTIY WARNING: This feature uses Java Serialization for RPC (Remote Procedure Calls) to send executable
  736. Java Objects to Worker nodes.
  737. Solr also currently has apache commons-collections in it's classpath.
  738. This makes Solr vulnerable to this security exploit:
  739. https://issues.apache.org/jira/browse/COLLECTIONS-580.
  740. <requestHandler name="/stream" class="solr.StreamHandler">
  741. <lst name="invariants">
  742. <str name="wt">json</str>
  743. <str name="distrib">false</str>
  744. </lst>
  745. </requestHandler>
  746. -->
  747. <!-- Field Analysis Request Handler
  748. RequestHandler that provides much the same functionality as
  749. analysis.jsp. Provides the ability to specify multiple field
  750. types and field names in the same request and outputs
  751. index-time and query-time analysis for each of them.
  752. Request parameters are:
  753. analysis.fieldname - field name whose analyzers are to be used
  754. analysis.fieldtype - field type whose analyzers are to be used
  755. analysis.fieldvalue - text for index-time analysis
  756. q (or analysis.q) - text for query time analysis
  757. analysis.showmatch (true|false) - When set to true and when
  758. query analysis is performed, the produced tokens of the
  759. field value analysis will be marked as "matched" for every
  760. token that is produces by the query analysis
  761. -->
  762. <requestHandler name="/analysis/field"
  763. startup="lazy"
  764. class="solr.FieldAnalysisRequestHandler" />
  765. <!-- Document Analysis Handler
  766. http://wiki.apache.org/solr/AnalysisRequestHandler
  767. An analysis handler that provides a breakdown of the analysis
  768. process of provided documents. This handler expects a (single)
  769. content stream with the following format:
  770. <docs>
  771. <doc>
  772. <field name="id">1</field>
  773. <field name="name">The Name</field>
  774. <field name="text">The Text Value</field>
  775. </doc>
  776. <doc>...</doc>
  777. <doc>...</doc>
  778. ...
  779. </docs>
  780. Note: Each document must contain a field which serves as the
  781. unique key. This key is used in the returned response to associate
  782. an analysis breakdown to the analyzed document.
  783. Like the FieldAnalysisRequestHandler, this handler also supports
  784. query analysis by sending either an "analysis.query" or "q"
  785. request parameter that holds the query text to be analyzed. It
  786. also supports the "analysis.showmatch" parameter which when set to
  787. true, all field tokens that match the query tokens will be marked
  788. as a "match".
  789. -->
  790. <requestHandler name="/analysis/document"
  791. class="solr.DocumentAnalysisRequestHandler"
  792. startup="lazy" />
  793. <!-- Echo the request contents back to the client -->
  794. <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
  795. <lst name="defaults">
  796. <str name="echoParams">explicit</str>
  797. <str name="echoHandler">true</str>
  798. </lst>
  799. </requestHandler>
  800. <!-- Search Components
  801. Search components are registered to SolrCore and used by
  802. instances of SearchHandler (which can access them by name)
  803. By default, the following components are available:
  804. <searchComponent name="query" class="solr.QueryComponent" />
  805. <searchComponent name="facet" class="solr.FacetComponent" />
  806. <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
  807. <searchComponent name="highlight" class="solr.HighlightComponent" />
  808. <searchComponent name="stats" class="solr.StatsComponent" />
  809. <searchComponent name="debug" class="solr.DebugComponent" />
  810. Default configuration in a requestHandler would look like:
  811. <arr name="components">
  812. <str>query</str>
  813. <str>facet</str>
  814. <str>mlt</str>
  815. <str>highlight</str>
  816. <str>stats</str>
  817. <str>debug</str>
  818. </arr>
  819. If you register a searchComponent to one of the standard names,
  820. that will be used instead of the default.
  821. To insert components before or after the 'standard' components, use:
  822. <arr name="first-components">
  823. <str>myFirstComponentName</str>
  824. </arr>
  825. <arr name="last-components">
  826. <str>myLastComponentName</str>
  827. </arr>
  828. NOTE: The component registered with the name "debug" will
  829. always be executed after the "last-components"
  830. -->
  831. <!-- Spell Check
  832. The spell check component can return a list of alternative spelling
  833. suggestions.
  834. http://wiki.apache.org/solr/SpellCheckComponent
  835. -->
  836. <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
  837. <str name="queryAnalyzerFieldType">text_general</str>
  838. <!-- Multiple "Spell Checkers" can be declared and used by this
  839. component
  840. -->
  841. <!-- a spellchecker built from a field of the main index -->
  842. <lst name="spellchecker">
  843. <str name="name">default</str>
  844. <str name="field">_text_</str>
  845. <str name="classname">solr.DirectSolrSpellChecker</str>
  846. <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
  847. <str name="distanceMeasure">internal</str>
  848. <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
  849. <float name="accuracy">0.5</float>
  850. <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
  851. <int name="maxEdits">2</int>
  852. <!-- the minimum shared prefix when enumerating terms -->
  853. <int name="minPrefix">1</int>
  854. <!-- maximum number of inspections per result. -->
  855. <int name="maxInspections">5</int>
  856. <!-- minimum length of a query term to be considered for correction -->
  857. <int name="minQueryLength">4</int>
  858. <!-- maximum threshold of documents a query term can appear to be considered for correction -->
  859. <float name="maxQueryFrequency">0.01</float>
  860. <!-- uncomment this to require suggestions to occur in 1% of the documents
  861. <float name="thresholdTokenFrequency">.01</float>
  862. -->
  863. </lst>
  864. <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
  865. <!--
  866. <lst name="spellchecker">
  867. <str name="name">wordbreak</str>
  868. <str name="classname">solr.WordBreakSolrSpellChecker</str>
  869. <str name="field">name</str>
  870. <str name="combineWords">true</str>
  871. <str name="breakWords">true</str>
  872. <int name="maxChanges">10</int>
  873. </lst>
  874. -->
  875. </searchComponent>
  876. <!-- A request handler for demonstrating the spellcheck component.
  877. NOTE: This is purely as an example. The whole purpose of the
  878. SpellCheckComponent is to hook it into the request handler that
  879. handles your normal user queries so that a separate request is
  880. not needed to get suggestions.
  881. IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
  882. NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
  883. See http://wiki.apache.org/solr/SpellCheckComponent for details
  884. on the request parameters.
  885. -->
  886. <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
  887. <lst name="defaults">
  888. <!-- Solr will use suggestions from both the 'default' spellchecker
  889. and from the 'wordbreak' spellchecker and combine them.
  890. collations (re-written queries) can include a combination of
  891. corrections from both spellcheckers -->
  892. <str name="spellcheck.dictionary">default</str>
  893. <str name="spellcheck">on</str>
  894. <str name="spellcheck.extendedResults">true</str>
  895. <str name="spellcheck.count">10</str>
  896. <str name="spellcheck.alternativeTermCount">5</str>
  897. <str name="spellcheck.maxResultsForSuggest">5</str>
  898. <str name="spellcheck.collate">true</str>
  899. <str name="spellcheck.collateExtendedResults">true</str>
  900. <str name="spellcheck.maxCollationTries">10</str>
  901. <str name="spellcheck.maxCollations">5</str>
  902. </lst>
  903. <arr name="last-components">
  904. <str>spellcheck</str>
  905. </arr>
  906. </requestHandler>
  907. <!-- Term Vector Component
  908. http://wiki.apache.org/solr/TermVectorComponent
  909. -->
  910. <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
  911. <!-- A request handler for demonstrating the term vector component
  912. This is purely as an example.
  913. In reality you will likely want to add the component to your
  914. already specified request handlers.
  915. -->
  916. <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
  917. <lst name="defaults">
  918. <bool name="tv">true</bool>
  919. </lst>
  920. <arr name="last-components">
  921. <str>tvComponent</str>
  922. </arr>
  923. </requestHandler>
  924. <!-- Clustering Component. (Omitted here. See the default Solr example for a typical configuration.) -->
  925. <!-- Terms Component
  926. http://wiki.apache.org/solr/TermsComponent
  927. A component to return terms and document frequency of those
  928. terms
  929. -->
  930. <searchComponent name="terms" class="solr.TermsComponent"/>
  931. <!-- A request handler for demonstrating the terms component -->
  932. <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
  933. <lst name="defaults">
  934. <bool name="terms">true</bool>
  935. <bool name="distrib">false</bool>
  936. </lst>
  937. <arr name="components">
  938. <str>terms</str>
  939. </arr>
  940. </requestHandler>
  941. <!-- Query Elevation Component
  942. http://wiki.apache.org/solr/QueryElevationComponent
  943. a search component that enables you to configure the top
  944. results for a given query regardless of the normal lucene
  945. scoring.
  946. -->
  947. <searchComponent name="elevator" class="solr.QueryElevationComponent" >
  948. <!-- pick a fieldType to analyze queries -->
  949. <str name="queryFieldType">string</str>
  950. <str name="config-file">elevate.xml</str>
  951. </searchComponent>
  952. <!-- A request handler for demonstrating the elevator component -->
  953. <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
  954. <lst name="defaults">
  955. <str name="echoParams">explicit</str>
  956. </lst>
  957. <arr name="last-components">
  958. <str>elevator</str>
  959. </arr>
  960. </requestHandler>
  961. <!-- Highlighting Component
  962. http://wiki.apache.org/solr/HighlightingParameters
  963. -->
  964. <searchComponent class="solr.HighlightComponent" name="highlight">
  965. <highlighting>
  966. <!-- Configure the standard fragmenter -->
  967. <!-- This could most likely be commented out in the "default" case -->
  968. <fragmenter name="gap"
  969. default="true"
  970. class="solr.highlight.GapFragmenter">
  971. <lst name="defaults">
  972. <int name="hl.fragsize">100</int>
  973. </lst>
  974. </fragmenter>
  975. <!-- A regular-expression-based fragmenter
  976. (for sentence extraction)
  977. -->
  978. <fragmenter name="regex"
  979. class="solr.highlight.RegexFragmenter">
  980. <lst name="defaults">
  981. <!-- slightly smaller fragsizes work better because of slop -->
  982. <int name="hl.fragsize">70</int>
  983. <!-- allow 50% slop on fragment sizes -->
  984. <float name="hl.regex.slop">0.5</float>
  985. <!-- a basic sentence pattern -->
  986. <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
  987. </lst>
  988. </fragmenter>
  989. <!-- Configure the standard formatter -->
  990. <formatter name="html"
  991. default="true"
  992. class="solr.highlight.HtmlFormatter">
  993. <lst name="defaults">
  994. <str name="hl.simple.pre"><![CDATA[<em>]]></str>
  995. <str name="hl.simple.post"><![CDATA[</em>]]></str>
  996. </lst>
  997. </formatter>
  998. <!-- Configure the standard encoder -->
  999. <encoder name="html"
  1000. class="solr.highlight.HtmlEncoder" />
  1001. <!-- Configure the standard fragListBuilder -->
  1002. <fragListBuilder name="simple"
  1003. class="solr.highlight.SimpleFragListBuilder"/>
  1004. <!-- Configure the single fragListBuilder -->
  1005. <fragListBuilder name="single"
  1006. class="solr.highlight.SingleFragListBuilder"/>
  1007. <!-- Configure the weighted fragListBuilder -->
  1008. <fragListBuilder name="weighted"
  1009. default="true"
  1010. class="solr.highlight.WeightedFragListBuilder"/>
  1011. <!-- default tag FragmentsBuilder -->
  1012. <fragmentsBuilder name="default"
  1013. default="true"
  1014. class="solr.highlight.ScoreOrderFragmentsBuilder">
  1015. <!--
  1016. <lst name="defaults">
  1017. <str name="hl.multiValuedSeparatorChar">/</str>
  1018. </lst>
  1019. -->
  1020. </fragmentsBuilder>
  1021. <!-- multi-colored tag FragmentsBuilder -->
  1022. <fragmentsBuilder name="colored"
  1023. class="solr.highlight.ScoreOrderFragmentsBuilder">
  1024. <lst name="defaults">
  1025. <str name="hl.tag.pre"><![CDATA[
  1026. <b style="background:yellow">,<b style="background:lawgreen">,
  1027. <b style="background:aquamarine">,<b style="background:magenta">,
  1028. <b style="background:palegreen">,<b style="background:coral">,
  1029. <b style="background:wheat">,<b style="background:khaki">,
  1030. <b style="background:lime">,<b style="background:deepskyblue">]]></str>
  1031. <str name="hl.tag.post"><![CDATA[</b>]]></str>
  1032. </lst>
  1033. </fragmentsBuilder>
  1034. <boundaryScanner name="default"
  1035. default="true"
  1036. class="solr.highlight.SimpleBoundaryScanner">
  1037. <lst name="defaults">
  1038. <str name="hl.bs.maxScan">10</str>
  1039. <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
  1040. </lst>
  1041. </boundaryScanner>
  1042. <boundaryScanner name="breakIterator"
  1043. class="solr.highlight.BreakIteratorBoundaryScanner">
  1044. <lst name="defaults">
  1045. <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
  1046. <str name="hl.bs.type">WORD</str>
  1047. <!-- language and country are used when constructing Locale object. -->
  1048. <!-- And the Locale object will be used when getting instance of BreakIterator -->
  1049. <str name="hl.bs.language">en</str>
  1050. <str name="hl.bs.country">US</str>
  1051. </lst>
  1052. </boundaryScanner>
  1053. </highlighting>
  1054. </searchComponent>
  1055. <!-- Update Processors
  1056. Chains of Update Processor Factories for dealing with Update
  1057. Requests can be declared, and then used by name in Update
  1058. Request Processors
  1059. http://wiki.apache.org/solr/UpdateRequestProcessor
  1060. -->
  1061. <!-- Add unknown fields to the schema
  1062. An example field type guessing update processor that will
  1063. attempt to parse string-typed field values as Booleans, Longs,
  1064. Doubles, or Dates, and then add schema fields with the guessed
  1065. field types.
  1066. This requires that the schema is both managed and mutable, by
  1067. declaring schemaFactory as ManagedIndexSchemaFactory, with
  1068. mutable specified as true.
  1069. See http://wiki.apache.org/solr/GuessingFieldTypes
  1070. -->
  1071. <updateRequestProcessorChain name="add-unknown-fields-to-the-schema">
  1072. <!-- UUIDUpdateProcessorFactory will generate an id if none is present in the incoming document -->
  1073. <processor class="solr.UUIDUpdateProcessorFactory" />
  1074. <processor class="solr.LogUpdateProcessorFactory"/>
  1075. <processor class="solr.DistributedUpdateProcessorFactory"/>
  1076. <processor class="solr.RemoveBlankFieldUpdateProcessorFactory"/>
  1077. <processor class="solr.FieldNameMutatingUpdateProcessorFactory">
  1078. <str name="pattern">[^\w-\.]</str>
  1079. <str name="replacement">_</str>
  1080. </processor>
  1081. <processor class="solr.ParseBooleanFieldUpdateProcessorFactory"/>
  1082. <processor class="solr.ParseLongFieldUpdateProcessorFactory"/>
  1083. <processor class="solr.ParseDoubleFieldUpdateProcessorFactory"/>
  1084. <processor class="solr.ParseDateFieldUpdateProcessorFactory">
  1085. <arr name="format">
  1086. <str>yyyy-MM-dd'T'HH:mm:ss.SSSZ</str>
  1087. <str>yyyy-MM-dd'T'HH:mm:ss,SSSZ</str>
  1088. <str>yyyy-MM-dd'T'HH:mm:ss.SSS</str>
  1089. <str>yyyy-MM-dd'T'HH:mm:ss,SSS</str>
  1090. <str>yyyy-MM-dd'T'HH:mm:ssZ</str>
  1091. <str>yyyy-MM-dd'T'HH:mm:ss</str>
  1092. <str>yyyy-MM-dd'T'HH:mmZ</str>
  1093. <str>yyyy-MM-dd'T'HH:mm</str>
  1094. <str>yyyy-MM-dd HH:mm:ss.SSSZ</str>
  1095. <str>yyyy-MM-dd HH:mm:ss,SSSZ</str>
  1096. <str>yyyy-MM-dd HH:mm:ss.SSS</str>
  1097. <str>yyyy-MM-dd HH:mm:ss,SSS</str>
  1098. <str>yyyy-MM-dd HH:mm:ssZ</str>
  1099. <str>yyyy-MM-dd HH:mm:ss</str>
  1100. <str>yyyy-MM-dd HH:mmZ</str>
  1101. <str>yyyy-MM-dd HH:mm</str>
  1102. <str>yyyy-MM-dd</str>
  1103. </arr>
  1104. </processor>
  1105. <processor class="solr.AddSchemaFieldsUpdateProcessorFactory">
  1106. <str name="defaultFieldType">strings</str>
  1107. <lst name="typeMapping">
  1108. <str name="valueClass">java.lang.Boolean</str>
  1109. <str name="fieldType">booleans</str>
  1110. </lst>
  1111. <lst name="typeMapping">
  1112. <str name="valueClass">java.util.Date</str>
  1113. <str name="fieldType">tdates</str>
  1114. </lst>
  1115. <lst name="typeMapping">
  1116. <str name="valueClass">java.lang.Long</str>
  1117. <str name="valueClass">java.lang.Integer</str>
  1118. <str name="fieldType">tlongs</str>
  1119. </lst>
  1120. <lst name="typeMapping">
  1121. <str name="valueClass">java.lang.Number</str>
  1122. <str name="fieldType">tdoubles</str>
  1123. </lst>
  1124. </processor>
  1125. <processor class="solr.RunUpdateProcessorFactory"/>
  1126. </updateRequestProcessorChain>
  1127. <!-- Deduplication
  1128. An example dedup update processor that creates the "id" field
  1129. on the fly based on the hash code of some other fields. This
  1130. example has overwriteDupes set to false since we are using the
  1131. id field as the signatureField and Solr will maintain
  1132. uniqueness based on that anyway.
  1133. -->
  1134. <!--
  1135. <updateRequestProcessorChain name="dedupe">
  1136. <processor class="solr.processor.SignatureUpdateProcessorFactory">
  1137. <bool name="enabled">true</bool>
  1138. <str name="signatureField">id</str>
  1139. <bool name="overwriteDupes">false</bool>
  1140. <str name="fields">name,features,cat</str>
  1141. <str name="signatureClass">solr.processor.Lookup3Signature</str>
  1142. </processor>
  1143. <processor class="solr.LogUpdateProcessorFactory" />
  1144. <processor class="solr.RunUpdateProcessorFactory" />
  1145. </updateRequestProcessorChain>
  1146. -->
  1147. <!-- Language identification
  1148. This example update chain identifies the language of the incoming
  1149. documents using the langid contrib. The detected language is
  1150. written to field language_s. No field name mapping is done.
  1151. The fields used for detection are text, title, subject and description,
  1152. making this example suitable for detecting languages form full-text
  1153. rich documents injected via ExtractingRequestHandler.
  1154. See more about langId at http://wiki.apache.org/solr/LanguageDetection
  1155. -->
  1156. <!--
  1157. <updateRequestProcessorChain name="langid">
  1158. <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
  1159. <str name="langid.fl">text,title,subject,description</str>
  1160. <str name="langid.langField">language_s</str>
  1161. <str name="langid.fallback">en</str>
  1162. </processor>
  1163. <processor class="solr.LogUpdateProcessorFactory" />
  1164. <processor class="solr.RunUpdateProcessorFactory" />
  1165. </updateRequestProcessorChain>
  1166. -->
  1167. <!-- Script update processor
  1168. This example hooks in an update processor implemented using JavaScript.
  1169. See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
  1170. -->
  1171. <!--
  1172. <updateRequestProcessorChain name="script">
  1173. <processor class="solr.StatelessScriptUpdateProcessorFactory">
  1174. <str name="script">update-script.js</str>
  1175. <lst name="params">
  1176. <str name="config_param">example config parameter</str>
  1177. </lst>
  1178. </processor>
  1179. <processor class="solr.RunUpdateProcessorFactory" />
  1180. </updateRequestProcessorChain>
  1181. -->
  1182. <!-- Response Writers
  1183. http://wiki.apache.org/solr/QueryResponseWriter
  1184. Request responses will be written using the writer specified by
  1185. the 'wt' request parameter matching the name of a registered
  1186. writer.
  1187. The "default" writer is the default and will be used if 'wt' is
  1188. not specified in the request.
  1189. -->
  1190. <!-- The following response writers are implicitly configured unless
  1191. overridden...
  1192. -->
  1193. <!--
  1194. <queryResponseWriter name="xml"
  1195. default="true"
  1196. class="solr.XMLResponseWriter" />
  1197. <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
  1198. <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
  1199. <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
  1200. <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
  1201. <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
  1202. <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
  1203. <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
  1204. -->
  1205. <queryResponseWriter name="json" class="solr.JSONResponseWriter">
  1206. <!-- For the purposes of the tutorial, JSON responses are written as
  1207. plain text so that they are easy to read in *any* browser.
  1208. If you expect a MIME type of "application/json" just remove this override.
  1209. -->
  1210. <str name="content-type">text/plain; charset=UTF-8</str>
  1211. </queryResponseWriter>
  1212. <!--
  1213. Custom response writers can be declared as needed...
  1214. -->
  1215. <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy">
  1216. <str name="template.base.dir">${velocity.template.base.dir:}</str>
  1217. <str name="solr.resource.loader.enabled">${velocity.solr.resource.loader.enabled:true}</str>
  1218. <str name="params.resource.loader.enabled">${velocity.params.resource.loader.enabled:false}</str>
  1219. </queryResponseWriter>
  1220. <!-- XSLT response writer transforms the XML output by any xslt file found
  1221. in Solr's conf/xslt directory. Changes to xslt files are checked for
  1222. every xsltCacheLifetimeSeconds.
  1223. -->
  1224. <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
  1225. <int name="xsltCacheLifetimeSeconds">5</int>
  1226. </queryResponseWriter>
  1227. <!-- Query Parsers
  1228. http://wiki.apache.org/solr/SolrQuerySyntax
  1229. Multiple QParserPlugins can be registered by name, and then
  1230. used in either the "defType" param for the QueryComponent (used
  1231. by SearchHandler) or in LocalParams
  1232. -->
  1233. <!-- example of registering a query parser -->
  1234. <!--
  1235. <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
  1236. -->
  1237. <!-- Function Parsers
  1238. http://wiki.apache.org/solr/FunctionQuery
  1239. Multiple ValueSourceParsers can be registered by name, and then
  1240. used as function names when using the "func" QParser.
  1241. -->
  1242. <!-- example of registering a custom function parser -->
  1243. <!--
  1244. <valueSourceParser name="myfunc"
  1245. class="com.mycompany.MyValueSourceParser" />
  1246. -->
  1247. <!-- Document Transformers
  1248. http://wiki.apache.org/solr/DocTransformers
  1249. -->
  1250. <!--
  1251. Could be something like:
  1252. <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
  1253. <int name="connection">jdbc://....</int>
  1254. </transformer>
  1255. To add a constant value to all docs, use:
  1256. <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
  1257. <int name="value">5</int>
  1258. </transformer>
  1259. If you want the user to still be able to change it with _value:something_ use this:
  1260. <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
  1261. <double name="defaultValue">5</double>
  1262. </transformer>
  1263. If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The
  1264. EditorialMarkerFactory will do exactly that:
  1265. <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
  1266. -->
  1267. <!-- Legacy config for the admin interface -->
  1268. <admin>
  1269. <defaultQuery>*:*</defaultQuery>
  1270. </admin>
  1271. </config>