solrconfig.xml 52 KB

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