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