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
10 http://www.apache.org/licenses/LICENSE-2.0
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.
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. -->
25 <dataDir>./solr/data</dataDir>
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>
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>
47 <!-- If true, unlock any held write or commit locks on startup.
48 This defeats the locking mechanism that allows multiple
49 processes to safely access a lucene index, and should be
51 <unlockOnStartup>false
</unlockOnStartup>
54 <!-- the default high-performance update handler -->
55 <updateHandler class=
"solr.DirectUpdateHandler2">
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)
62 <!-- autocommit pending docs if certain criteria are met
64 <maxDocs>10000</maxDocs>
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
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>
84 <!-- A postOptimize event is fired only after every optimize command, useful
85 in conjunction with index distribution to only distribute optimized indicies
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>
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>
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.
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
118 class=
"solr.LRUCache"
121 autowarmCount=
"256"/>
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. -->
127 class=
"solr.LRUCache"
130 autowarmCount=
"256"/>
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. -->
135 class=
"solr.LRUCache"
140 <!-- If true, stored fields that are not requested will be loaded lazily.
142 <enableLazyFieldLoading>false
</enableLazyFieldLoading>
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. -->
150 <cache name="myUserCache"
151 class="solr.LRUCache"
155 regenerator="org.mycompany.mypackage.MyRegenerator"
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
164 <useFilterForSortedQuery>true</useFilterForSortedQuery>
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>
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"/>
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"/>
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. -->
193 <listener event="newSearcher" class="solr.QuerySenderListener">
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>
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. -->
205 <listener event="firstSearcher" class="solr.QuerySenderListener">
207 <lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
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
216 <useColdSearcher>false
</useColdSearcher>
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.
227 <requestHandler name=
"standard" class=
"solr.StandardRequestHandler">
228 <!-- default values for query parameters -->
229 <lst name=
"defaults">
230 <str name=
"echoParams">explicit
</str>
232 <int name="rows">10</int>
233 <str name="fl">*</str>
234 <str name="version">2.1</str>
239 <!-- DisMaxRequestHandler allows easy searching across multiple fields
240 for simple user-entered phrases.
241 see http://wiki.apache.org/solr/DisMaxRequestHandler
243 <requestHandler name=
"dismax" class=
"solr.DisMaxRequestHandler" >
244 <lst name=
"defaults">
245 <str name=
"echoParams">explicit
</str>
246 <float name=
"tie">0.01</float>
248 text^
0.5 address^
1.0 display_name^
1.2 email^
1.5 id^
10.0
251 text^
0.2 address^
1.1 display_name^
1.5
254 id,display_name,address,note
257 2<-
1 5<-
2 6<90%
259 <int name=
"ps">100</int>
263 <!-- queryResponseWriter plugins... query responses will be written using the
264 writer specified by the 'wt' request parameter matching the name of a registered
266 The "standard" writer is the default and will be used if 'wt' is not specified
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.
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"/>
275 <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
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
280 every xsltCacheLifetimeSeconds.
282 <queryResponseWriter name=
"xslt" class=
"org.apache.solr.request.XSLTResponseWriter">
283 <int name=
"xsltCacheLifetimeSeconds">5</int>
284 </queryResponseWriter>
286 <!-- config for the admin interface -->
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 -->
294 qt=dismax
&q=solr
&start=
3&fq=id:[* TO *]
&fq=text:[* TO *]
296 <!-- configure a healthcheck file for servers behind a loadbalancer
297 <healthcheck type="file">server-enabled</healthcheck>