Advertisement
Guest User

solrconfig.xml

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