Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" ?> |
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 | <config> | |
20 | ||
21 | <!-- Used to specify an alternate directory to hold all index data | |
22 | other than the default ./data under the Solr home. | |
23 | If replication is in use, this should match the replication configuration. --> | |
24 | <!-- | |
25 | <dataDir>./solr/data</dataDir> | |
26 | --> | |
27 | ||
28 | <indexDefaults> | |
29 | <!-- Values here affect all index writers and act as a default unless overridden. --> | |
30 | <useCompoundFile>false</useCompoundFile> | |
31 | <mergeFactor>10</mergeFactor> | |
32 | <maxBufferedDocs>1000</maxBufferedDocs> | |
33 | <maxMergeDocs>2147483647</maxMergeDocs> | |
34 | <maxFieldLength>10000</maxFieldLength> | |
35 | <writeLockTimeout>1000</writeLockTimeout> | |
36 | <commitLockTimeout>10000</commitLockTimeout> | |
37 | </indexDefaults> | |
38 | ||
39 | <mainIndex> | |
40 | <!-- options specific to the main on-disk lucene index --> | |
41 | <useCompoundFile>false</useCompoundFile> | |
42 | <mergeFactor>10</mergeFactor> | |
43 | <maxBufferedDocs>1000</maxBufferedDocs> | |
44 | <maxMergeDocs>2147483647</maxMergeDocs> | |
45 | <maxFieldLength>10000</maxFieldLength> | |
46 | ||
31037a42 | 47 | <!-- If true, unlock any held write or commit locks on startup. |
6a488035 TO |
48 | This defeats the locking mechanism that allows multiple |
49 | processes to safely access a lucene index, and should be | |
50 | used with care. --> | |
51 | <unlockOnStartup>false</unlockOnStartup> | |
52 | </mainIndex> | |
53 | ||
54 | <!-- the default high-performance update handler --> | |
55 | <updateHandler class="solr.DirectUpdateHandler2"> | |
56 | ||
57 | <!-- A prefix of "solr." for class names is an alias that | |
58 | causes solr to search appropriate packages, including | |
59 | org.apache.solr.(search|update|request|core|analysis) | |
60 | --> | |
61 | ||
31037a42 EM |
62 | <!-- autocommit pending docs if certain criteria are met |
63 | <autoCommit> | |
6a488035 TO |
64 | <maxDocs>10000</maxDocs> |
65 | </autoCommit> | |
66 | --> | |
67 | ||
68 | <!-- The RunExecutableListener executes an external command. | |
69 | exe - the name of the executable to run | |
70 | dir - dir to use as the current working directory. default="." | |
71 | wait - the calling thread waits until the executable returns. default="true" | |
72 | args - the arguments to pass to the program. default=nothing | |
73 | env - environment variables to set. default=nothing | |
74 | --> | |
75 | <!-- A postCommit event is fired after every commit or optimize command | |
76 | <listener event="postCommit" class="solr.RunExecutableListener"> | |
77 | <str name="exe">snapshooter</str> | |
78 | <str name="dir">solr/bin</str> | |
79 | <bool name="wait">true</bool> | |
80 | <arr name="args"> <str>arg1</str> <str>arg2</str> </arr> | |
81 | <arr name="env"> <str>MYVAR=val1</str> </arr> | |
82 | </listener> | |
83 | --> | |
84 | <!-- A postOptimize event is fired only after every optimize command, useful | |
e4f46be0 | 85 | in conjunction with index distribution to only distribute optimized indices |
6a488035 TO |
86 | <listener event="postOptimize" class="solr.RunExecutableListener"> |
87 | <str name="exe">snapshooter</str> | |
88 | <str name="dir">solr/bin</str> | |
89 | <bool name="wait">true</bool> | |
90 | </listener> | |
91 | --> | |
92 | ||
93 | </updateHandler> | |
94 | ||
95 | ||
96 | <query> | |
97 | <!-- Maximum number of clauses in a boolean query... can affect | |
98 | range or prefix queries that expand to big boolean | |
99 | queries. An exception is thrown if exceeded. --> | |
100 | <maxBooleanClauses>1024</maxBooleanClauses> | |
101 | ||
31037a42 | 102 | |
6a488035 TO |
103 | <!-- Cache used by SolrIndexSearcher for filters (DocSets), |
104 | unordered sets of *all* documents that match a query. | |
105 | When a new searcher is opened, its caches may be prepopulated | |
106 | or "autowarmed" using data from caches in the old searcher. | |
107 | autowarmCount is the number of items to prepopulate. For LRUCache, | |
108 | the autowarmed items will be the most recently accessed items. | |
109 | Parameters: | |
110 | class - the SolrCache implementation (currently only LRUCache) | |
111 | size - the maximum number of entries in the cache | |
112 | initialSize - the initial capacity (number of entries) of | |
113 | the cache. (seel java.util.HashMap) | |
114 | autowarmCount - the number of entries to prepopulate from | |
115 | and old cache. | |
116 | --> | |
117 | <filterCache | |
118 | class="solr.LRUCache" | |
119 | size="512" | |
120 | initialSize="512" | |
121 | autowarmCount="256"/> | |
122 | ||
123 | <!-- queryResultCache caches results of searches - ordered lists of | |
124 | document ids (DocList) based on a query, a sort, and the range | |
125 | of documents requested. --> | |
126 | <queryResultCache | |
127 | class="solr.LRUCache" | |
128 | size="512" | |
129 | initialSize="512" | |
130 | autowarmCount="256"/> | |
131 | ||
132 | <!-- documentCache caches Lucene Document objects (the stored fields for each document). | |
133 | Since Lucene internal document ids are transient, this cache will not be autowarmed. --> | |
134 | <documentCache | |
135 | class="solr.LRUCache" | |
136 | size="512" | |
137 | initialSize="512" | |
138 | autowarmCount="0"/> | |
139 | ||
140 | <!-- If true, stored fields that are not requested will be loaded lazily. | |
141 | --> | |
142 | <enableLazyFieldLoading>false</enableLazyFieldLoading> | |
143 | ||
144 | <!-- Example of a generic cache. These caches may be accessed by name | |
145 | through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert(). | |
146 | The purpose is to enable easy caching of user/application level data. | |
147 | The regenerator argument should be specified as an implementation | |
148 | of solr.search.CacheRegenerator if autowarming is desired. --> | |
149 | <!-- | |
150 | <cache name="myUserCache" | |
151 | class="solr.LRUCache" | |
152 | size="4096" | |
153 | initialSize="1024" | |
154 | autowarmCount="1024" | |
155 | regenerator="org.mycompany.mypackage.MyRegenerator" | |
156 | /> | |
157 | --> | |
158 | ||
159 | <!-- An optimization that attempts to use a filter to satisfy a search. | |
160 | If the requested sort does not include score, then the filterCache | |
161 | will be checked for a filter matching the query. If found, the filter | |
162 | will be used as the source of document ids, and then the sort will be | |
163 | applied to that. | |
164 | <useFilterForSortedQuery>true</useFilterForSortedQuery> | |
165 | --> | |
166 | ||
167 | <!-- An optimization for use with the queryResultCache. When a search | |
168 | is requested, a superset of the requested number of document ids | |
169 | are collected. For example, if a search for a particular query | |
170 | requests matching documents 10 through 19, and queryWindowSize is 50, | |
171 | then documents 0 through 50 will be collected and cached. Any further | |
172 | requests in that range can be satisfied via the cache. --> | |
173 | <queryResultWindowSize>10</queryResultWindowSize> | |
174 | ||
175 | <!-- This entry enables an int hash representation for filters (DocSets) | |
176 | when the number of items in the set is less than maxSize. For smaller | |
177 | sets, this representation is more memory efficient, more efficient to | |
178 | iterate over, and faster to take intersections. --> | |
179 | <HashDocSet maxSize="3000" loadFactor="0.75"/> | |
180 | ||
181 | ||
182 | <!-- boolToFilterOptimizer converts boolean clauses with zero boost | |
183 | into cached filters if the number of docs selected by the clause exceeds | |
184 | the threshold (represented as a fraction of the total index) --> | |
185 | <boolTofilterOptimizer enabled="true" cacheSize="32" threshold=".05"/> | |
186 | ||
187 | ||
188 | <!-- a newSearcher event is fired whenever a new searcher is being prepared | |
189 | and there is a current searcher handling requests (aka registered). --> | |
190 | <!-- QuerySenderListener takes an array of NamedList and executes a | |
191 | local query request for each NamedList in sequence. --> | |
192 | <!-- | |
193 | <listener event="newSearcher" class="solr.QuerySenderListener"> | |
194 | <arr name="queries"> | |
195 | <lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst> | |
196 | <lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst> | |
197 | </arr> | |
198 | </listener> | |
199 | --> | |
200 | ||
201 | <!-- a firstSearcher event is fired whenever a new searcher is being | |
202 | prepared but there is no current registered searcher to handle | |
203 | requests or to gain autowarming data from. --> | |
204 | <!-- | |
205 | <listener event="firstSearcher" class="solr.QuerySenderListener"> | |
206 | <arr name="queries"> | |
207 | <lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst> | |
208 | </arr> | |
209 | </listener> | |
210 | --> | |
211 | ||
212 | <!-- If a search request comes in and there is no current registered searcher, | |
213 | then immediately register the still warming searcher and use it. If | |
214 | "false" then all requests will block until the first searcher is done | |
215 | warming. --> | |
216 | <useColdSearcher>false</useColdSearcher> | |
217 | ||
218 | </query> | |
219 | ||
220 | ||
221 | <!-- requestHandler plugins... incoming queries will be dispatched to the | |
222 | correct handler based on the qt (query type) param matching the | |
223 | name of registered handlers. | |
224 | The "standard" request handler is the default and will be used if qt | |
225 | is not specified in the request. | |
226 | --> | |
227 | <requestHandler name="standard" class="solr.StandardRequestHandler"> | |
228 | <!-- default values for query parameters --> | |
229 | <lst name="defaults"> | |
230 | <str name="echoParams">explicit</str> | |
31037a42 | 231 | <!-- |
6a488035 TO |
232 | <int name="rows">10</int> |
233 | <str name="fl">*</str> | |
234 | <str name="version">2.1</str> | |
235 | --> | |
236 | </lst> | |
237 | </requestHandler> | |
238 | ||
239 | <!-- DisMaxRequestHandler allows easy searching across multiple fields | |
31037a42 | 240 | for simple user-entered phrases. |
6a488035 TO |
241 | see http://wiki.apache.org/solr/DisMaxRequestHandler |
242 | --> | |
243 | <requestHandler name="dismax" class="solr.DisMaxRequestHandler" > | |
244 | <lst name="defaults"> | |
245 | <str name="echoParams">explicit</str> | |
246 | <float name="tie">0.01</float> | |
247 | <str name="qf"> | |
248 | text^0.5 address^1.0 display_name^1.2 email^1.5 id^10.0 | |
249 | </str> | |
250 | <str name="pf"> | |
251 | text^0.2 address^1.1 display_name^1.5 | |
252 | </str> | |
253 | <str name="fl"> | |
254 | id,display_name,address,note | |
255 | </str> | |
256 | <str name="mm"> | |
257 | 2<-1 5<-2 6<90% | |
258 | </str> | |
259 | <int name="ps">100</int> | |
260 | </lst> | |
261 | </requestHandler> | |
262 | ||
263 | <!-- queryResponseWriter plugins... query responses will be written using the | |
264 | writer specified by the 'wt' request parameter matching the name of a registered | |
265 | writer. | |
31037a42 | 266 | The "standard" writer is the default and will be used if 'wt' is not specified |
6a488035 TO |
267 | in the request. XMLResponseWriter will be used if nothing is specified here. |
268 | The json, python, and ruby writers are also available by default. | |
269 | ||
270 | <queryResponseWriter name="standard" class="org.apache.solr.request.XMLResponseWriter"/> | |
271 | <queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/> | |
272 | <queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/> | |
273 | <queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/> | |
274 | ||
275 | <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/> | |
276 | --> | |
277 | ||
278 | <!-- XSLT response writer transforms the XML output by any xslt file found | |
279 | in Solr's conf/xslt directory. Changes to xslt files are checked for | |
31037a42 | 280 | every xsltCacheLifetimeSeconds. |
6a488035 TO |
281 | --> |
282 | <queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter"> | |
283 | <int name="xsltCacheLifetimeSeconds">5</int> | |
31037a42 EM |
284 | </queryResponseWriter> |
285 | ||
286 | <!-- config for the admin interface --> | |
6a488035 TO |
287 | <admin> |
288 | <defaultQuery>civicrm</defaultQuery> | |
289 | <gettableFiles>solrconfig.xml schema.xml admin-extra.html</gettableFiles> | |
290 | <!-- pingQuery should be "URLish" ... | |
291 | & separated key=val pairs ... but there shouldn't be any | |
292 | URL escaping of the values --> | |
293 | <pingQuery> | |
294 | qt=dismax&q=solr&start=3&fq=id:[* TO *]&fq=text:[* TO *] | |
295 | </pingQuery> | |
296 | <!-- configure a healthcheck file for servers behind a loadbalancer | |
297 | <healthcheck type="file">server-enabled</healthcheck> | |
298 | --> | |
299 | </admin> | |
300 | ||
301 | </config> |