solr-config-7.7.0.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!-- This is the default config with stuff non-essential to Dovecot removed. -->
  3. <config>
  4. <!-- Controls what version of Lucene various components of Solr
  5. adhere to. Generally, you want to use the latest version to
  6. get all bug fixes and improvements. It is highly recommended
  7. that you fully re-index after changing this setting as it can
  8. affect both how text is indexed and queried.
  9. -->
  10. <luceneMatchVersion>7.7.0</luceneMatchVersion>
  11. <!-- A 'dir' option by itself adds any files found in the directory
  12. to the classpath, this is useful for including all jars in a
  13. directory.
  14. When a 'regex' is specified in addition to a 'dir', only the
  15. files in that directory which completely match the regex
  16. (anchored on both ends) will be included.
  17. If a 'dir' option (with or without a regex) is used and nothing
  18. is found that matches, a warning will be logged.
  19. The examples below can be used to load some solr-contribs along
  20. with their external dependencies.
  21. -->
  22. <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
  23. <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
  24. <lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />
  25. <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" />
  26. <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />
  27. <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />
  28. <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
  29. <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
  30. <!-- Data Directory
  31. Used to specify an alternate directory to hold all index data
  32. other than the default ./data under the Solr home. If
  33. replication is in use, this should match the replication
  34. configuration.
  35. -->
  36. <dataDir>${solr.data.dir:}</dataDir>
  37. <!-- The default high-performance update handler -->
  38. <updateHandler class="solr.DirectUpdateHandler2">
  39. <!-- Enables a transaction log, used for real-time get, durability, and
  40. and solr cloud replica recovery. The log can grow as big as
  41. uncommitted changes to the index, so use of a hard autoCommit
  42. is recommended (see below).
  43. "dir" - the target directory for transaction logs, defaults to the
  44. solr data directory.
  45. "numVersionBuckets" - sets the number of buckets used to keep
  46. track of max version values when checking for re-ordered
  47. updates; increase this value to reduce the cost of
  48. synchronizing access to version buckets during high-volume
  49. indexing, this requires 8 bytes (long) * numVersionBuckets
  50. of heap space per Solr core.
  51. -->
  52. <updateLog>
  53. <str name="dir">${solr.ulog.dir:}</str>
  54. <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>
  55. </updateLog>
  56. <!-- AutoCommit
  57. Perform a hard commit automatically under certain conditions.
  58. Instead of enabling autoCommit, consider using "commitWithin"
  59. when adding documents.
  60. http://wiki.apache.org/solr/UpdateXmlMessages
  61. maxDocs - Maximum number of documents to add since the last
  62. commit before automatically triggering a new commit.
  63. maxTime - Maximum amount of time in ms that is allowed to pass
  64. since a document was added before automatically
  65. triggering a new commit.
  66. openSearcher - if false, the commit causes recent index changes
  67. to be flushed to stable storage, but does not cause a new
  68. searcher to be opened to make those changes visible.
  69. If the updateLog is enabled, then it's highly recommended to
  70. have some sort of hard autoCommit to limit the log size.
  71. -->
  72. <autoCommit>
  73. <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
  74. <openSearcher>false</openSearcher>
  75. </autoCommit>
  76. <!-- softAutoCommit is like autoCommit except it causes a
  77. 'soft' commit which only ensures that changes are visible
  78. but does not ensure that data is synced to disk. This is
  79. faster and more near-realtime friendly than a hard commit.
  80. -->
  81. <autoSoftCommit>
  82. <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
  83. </autoSoftCommit>
  84. <!-- Update Related Event Listeners
  85. Various IndexWriter related events can trigger Listeners to
  86. take actions.
  87. postCommit - fired after every commit or optimize command
  88. postOptimize - fired after every optimize command
  89. -->
  90. </updateHandler>
  91. <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  92. Query section - these settings control query time things like caches
  93. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
  94. <query>
  95. <!-- Solr Internal Query Caches
  96. There are two implementations of cache available for Solr,
  97. LRUCache, based on a synchronized LinkedHashMap, and
  98. FastLRUCache, based on a ConcurrentHashMap.
  99. FastLRUCache has faster gets and slower puts in single
  100. threaded operation and thus is generally faster than LRUCache
  101. when the hit ratio of the cache is high (> 75%), and may be
  102. faster under other scenarios on multi-cpu systems.
  103. -->
  104. <!-- Filter Cache
  105. Cache used by SolrIndexSearcher for filters (DocSets),
  106. unordered sets of *all* documents that match a query. When a
  107. new searcher is opened, its caches may be prepopulated or
  108. "autowarmed" using data from caches in the old searcher.
  109. autowarmCount is the number of items to prepopulate. For
  110. LRUCache, the autowarmed items will be the most recently
  111. accessed items.
  112. Parameters:
  113. class - the SolrCache implementation LRUCache or
  114. (LRUCache or FastLRUCache)
  115. size - the maximum number of entries in the cache
  116. initialSize - the initial capacity (number of entries) of
  117. the cache. (see java.util.HashMap)
  118. autowarmCount - the number of entries to prepopulate from
  119. and old cache.
  120. maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
  121. to occupy. Note that when this option is specified, the size
  122. and initialSize parameters are ignored.
  123. -->
  124. <filterCache class="solr.FastLRUCache"
  125. size="512"
  126. initialSize="512"
  127. autowarmCount="0"/>
  128. <!-- Query Result Cache
  129. Caches results of searches - ordered lists of document ids
  130. (DocList) based on a query, a sort, and the range of documents requested.
  131. Additional supported parameter by LRUCache:
  132. maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
  133. to occupy
  134. -->
  135. <queryResultCache class="solr.LRUCache"
  136. size="512"
  137. initialSize="512"
  138. autowarmCount="0"/>
  139. <!-- Document Cache
  140. Caches Lucene Document objects (the stored fields for each
  141. document). Since Lucene internal document ids are transient,
  142. this cache will not be autowarmed.
  143. -->
  144. <documentCache class="solr.LRUCache"
  145. size="512"
  146. initialSize="512"
  147. autowarmCount="0"/>
  148. <!-- custom cache currently used by block join -->
  149. <cache name="perSegFilter"
  150. class="solr.search.LRUCache"
  151. size="10"
  152. initialSize="0"
  153. autowarmCount="10"
  154. regenerator="solr.NoOpRegenerator" />
  155. <!-- Lazy Field Loading
  156. If true, stored fields that are not requested will be loaded
  157. lazily. This can result in a significant speed improvement
  158. if the usual case is to not load all stored fields,
  159. especially if the skipped fields are large compressed text
  160. fields.
  161. -->
  162. <enableLazyFieldLoading>true</enableLazyFieldLoading>
  163. <!-- Result Window Size
  164. An optimization for use with the queryResultCache. When a search
  165. is requested, a superset of the requested number of document ids
  166. are collected. For example, if a search for a particular query
  167. requests matching documents 10 through 19, and queryWindowSize is 50,
  168. then documents 0 through 49 will be collected and cached. Any further
  169. requests in that range can be satisfied via the cache.
  170. -->
  171. <queryResultWindowSize>20</queryResultWindowSize>
  172. <!-- Maximum number of documents to cache for any entry in the
  173. queryResultCache.
  174. -->
  175. <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
  176. <!-- Use Cold Searcher
  177. If a search request comes in and there is no current
  178. registered searcher, then immediately register the still
  179. warming searcher and use it. If "false" then all requests
  180. will block until the first searcher is done warming.
  181. -->
  182. <useColdSearcher>false</useColdSearcher>
  183. </query>
  184. <!-- Request Dispatcher
  185. This section contains instructions for how the SolrDispatchFilter
  186. should behave when processing requests for this SolrCore.
  187. -->
  188. <requestDispatcher>
  189. <httpCaching never304="true" />
  190. </requestDispatcher>
  191. <!-- Request Handlers
  192. http://wiki.apache.org/solr/SolrRequestHandler
  193. Incoming queries will be dispatched to a specific handler by name
  194. based on the path specified in the request.
  195. If a Request Handler is declared with startup="lazy", then it will
  196. not be initialized until the first request that uses it.
  197. -->
  198. <!-- SearchHandler
  199. http://wiki.apache.org/solr/SearchHandler
  200. For processing Search Queries, the primary Request Handler
  201. provided with Solr is "SearchHandler" It delegates to a sequent
  202. of SearchComponents (see below) and supports distributed
  203. queries across multiple shards
  204. -->
  205. <requestHandler name="/select" class="solr.SearchHandler">
  206. <!-- default values for query parameters can be specified, these
  207. will be overridden by parameters in the request
  208. -->
  209. <lst name="defaults">
  210. <str name="echoParams">explicit</str>
  211. <int name="rows">10</int>
  212. </lst>
  213. </requestHandler>
  214. <initParams path="/update/**,/select">
  215. <lst name="defaults">
  216. <str name="df">_text_</str>
  217. </lst>
  218. </initParams>
  219. <!-- Response Writers
  220. http://wiki.apache.org/solr/QueryResponseWriter
  221. Request responses will be written using the writer specified by
  222. the 'wt' request parameter matching the name of a registered
  223. writer.
  224. The "default" writer is the default and will be used if 'wt' is
  225. not specified in the request.
  226. -->
  227. <queryResponseWriter name="xml"
  228. default="true"
  229. class="solr.XMLResponseWriter" />
  230. </config>