4
Licensed to the Apache Software Foundation (ASF) under one or more
5
contributor license agreements. See the NOTICE file distributed with
6
this work for additional information regarding copyright ownership.
7
The ASF licenses this file to You under the Apache License, Version 2.0
8
(the "License"); you may not use this file except in compliance with
9
the License. You may obtain a copy of the License at
11
http://www.apache.org/licenses/LICENSE-2.0
13
Unless required by applicable law or agreed to in writing, software
14
distributed under the License is distributed on an "AS IS" BASIS,
15
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
See the License for the specific language governing permissions and
17
limitations under the License.
20
<!-- $Id: solrconfig.xml 382610 2006-03-03 01:43:03Z yonik $
26
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
27
<!-- see TestConfig.testLib() -->
28
<lib dir="../lib-dirs/a" />
29
<lib dir="../lib-dirs/b" regex="b." />
30
<lib dir="../lib-dirs/c" regex="c1" />
31
<lib path="../lib-dirs/d/d1/" />
35
<!-- Used to specify an alternate directory to hold all index data.
36
It defaults to "index" if not present, and should probably
37
not be changed if replication is in use. -->
38
<dataDir>${solr.data.dir:}</dataDir>
40
<!-- The DirectoryFactory to use for indexes.
41
solr.StandardDirectoryFactory, the default, is filesystem based.
42
solr.RAMDirectoryFactory is memory based and not persistent. -->
43
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
46
<!-- Values here affect all index writers and act as a default
47
unless overridden. -->
48
<!-- Values here affect all index writers and act as a default unless overridden. -->
49
<useCompoundFile>false</useCompoundFile>
50
<mergeFactor>10</mergeFactor>
51
<!-- If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
53
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
54
<!-- Tell Lucene when to flush documents to disk.
55
Giving Lucene more memory for indexing means faster indexing at the cost of more RAM
57
If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
60
<ramBufferSizeMB>32</ramBufferSizeMB>
61
<maxMergeDocs>2147483647</maxMergeDocs>
62
<maxFieldLength>10000</maxFieldLength>
63
<writeLockTimeout>1000</writeLockTimeout>
67
The Merge Policy in Lucene controls how merging is handled by Lucene. The default in 2.3 is the LogByteSizeMergePolicy, previous
68
versions used LogDocMergePolicy.
70
LogByteSizeMergePolicy chooses segments to merge based on their size. The Lucene 2.2 default, LogDocMergePolicy chose when
71
to merge based on number of documents
73
Other implementations of MergePolicy must have a no-argument constructor
75
<mergePolicy class="org.apache.lucene.index.TieredMergePolicy"/>
79
The Merge Scheduler in Lucene controls how merges are performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
80
can perform merges in the background using separate threads. The SerialMergeScheduler (Lucene 2.2 default) does not.
82
<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
83
<!-- these are global... can't currently override per index -->
84
<writeLockTimeout>1000</writeLockTimeout>
85
<!-- Controls how often Lucene loads terms into memory -->
86
<termIndexInterval>256</termIndexInterval>
88
<lockType>single</lockType>
92
<!-- lucene options specific to the main on-disk lucene index -->
93
<useCompoundFile>false</useCompoundFile>
94
<mergeFactor>10</mergeFactor>
95
<!-- for better multi-segment testing, we are using slower
96
indexing properties of maxBufferedDocs=10 and LogDocMergePolicy.
98
<maxBufferedDocs>10</maxBufferedDocs>
100
<termIndexInterval>256</termIndexInterval>
102
<maxMergeDocs>2147483647</maxMergeDocs>
103
<maxFieldLength>10000</maxFieldLength>
104
<mergePolicy class="org.apache.lucene.index.LogDocMergePolicy"/>
106
<unlockOnStartup>true</unlockOnStartup>
109
<updateHandler class="solr.DirectUpdateHandler2">
111
<!-- autocommit pending docs if certain criteria are met
113
<maxDocs>10000</maxDocs>
114
<maxTime>3600000</maxTime>
117
<!-- represents a lower bound on the frequency that commits may
118
occur (in seconds). NOTE: not yet implemented
120
<commitIntervalLowerBound>0</commitIntervalLowerBound>
123
<!-- The RunExecutableListener executes an external command.
124
exe - the name of the executable to run
125
dir - dir to use as the current working directory. default="."
126
wait - the calling thread waits until the executable returns. default="true"
127
args - the arguments to pass to the program. default=nothing
128
env - environment variables to set. default=nothing
130
<!-- A postCommit event is fired after every commit
131
<listener event="postCommit" class="solr.RunExecutableListener">
132
<str name="exe">/var/opt/resin3/__PORT__/scripts/solr/snapshooter</str>
133
<str name="dir">/var/opt/resin3/__PORT__</str>
134
<bool name="wait">true</bool>
135
<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
136
<arr name="env"> <str>MYVAR=val1</str> </arr>
143
<indexReaderFactory name="IndexReaderFactory" class="org.apache.solr.core.StandardIndexReaderFactory">
144
<int name="setTermIndexDivisor">12</int>
145
</indexReaderFactory >
148
<!-- Maximum number of clauses in a boolean query... can affect
149
range or wildcard queries that expand to big boolean
150
queries. An exception is thrown if exceeded.
152
<maxBooleanClauses>1024</maxBooleanClauses>
155
<!-- Cache specification for Filters or DocSets - unordered set of *all* documents
156
that match a particular query.
159
class="solr.search.FastLRUCache"
162
autowarmCount="256"/>
165
class="solr.search.LRUCache"
168
autowarmCount="1024"/>
171
class="solr.search.LRUCache"
176
<!-- If true, stored fields that are not requested will be loaded lazily.
178
<enableLazyFieldLoading>true</enableLazyFieldLoading>
182
<cache name="myUserCache"
183
class="solr.search.LRUCache"
187
regenerator="MyRegenerator"
193
<useFilterForSortedQuery>true</useFilterForSortedQuery>
196
<queryResultWindowSize>10</queryResultWindowSize>
198
<!-- set maxSize artificially low to exercise both types of sets -->
199
<HashDocSet maxSize="3" loadFactor="0.75"/>
202
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
203
into cached filters if the number of docs selected by the clause exceeds
204
the threshold (represented as a fraction of the total index)
206
<boolTofilterOptimizer enabled="false" cacheSize="32" threshold=".05"/>
209
<!-- a newSearcher event is fired whenever a new searcher is being prepared
210
and there is a current searcher handling requests (aka registered). -->
211
<!-- QuerySenderListener takes an array of NamedList and executes a
212
local query request for each NamedList in sequence. -->
214
<listener event="newSearcher" class="solr.QuerySenderListener">
216
<lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
217
<lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
222
<!-- a firstSearcher event is fired whenever a new searcher is being
223
prepared but there is no current registered searcher to handle
224
requests or to gain prewarming data from. -->
226
<listener event="firstSearcher" class="solr.QuerySenderListener">
228
<lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
237
<!-- An alternate set representation that uses an integer hash to store filters (sets of docids).
238
If the set cardinality <= maxSize elements, then HashDocSet will be used instead of the bitset
239
based HashBitset. -->
241
<!-- requestHandler plugins... incoming queries will be dispatched to the
242
correct handler based on the qt (query type) param matching the
243
name of registered handlers.
244
The "standard" request handler is the default and will be used if qt
245
is not specified in the request.
247
<requestHandler name="standard" class="solr.StandardRequestHandler">
248
<bool name="httpCaching">true</bool>
250
<requestHandler name="dismaxOldStyleDefaults"
251
class="solr.DisMaxRequestHandler" >
252
<!-- for historic reasons, DisMaxRequestHandler will use all of
253
it's init params as "defaults" if there is no "defaults" list
256
<float name="tie">0.01</float>
258
text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0
261
text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5
264
ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3
267
3<-1 5<-2 6<90%
269
<int name="ps">100</int>
271
<requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
272
<lst name="defaults">
273
<str name="q.alt">*:*</str>
274
<float name="tie">0.01</float>
276
text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0
279
text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5
282
ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3
285
3<-1 5<-2 6<90%
287
<int name="ps">100</int>
290
<requestHandler name="old" class="solr.tst.OldRequestHandler" >
291
<int name="myparam">1000</int>
292
<float name="ratio">1.4142135</float>
293
<arr name="myarr"><int>1</int><int>2</int></arr>
296
<requestHandler name="oldagain" class="solr.tst.OldRequestHandler" >
297
<lst name="lst1"> <str name="op">sqrt</str> <int name="val">2</int> </lst>
298
<lst name="lst2"> <str name="op">log</str> <float name="val">10</float> </lst>
301
<requestHandler name="test" class="solr.tst.TestRequestHandler" />
303
<!-- test query parameter defaults -->
304
<requestHandler name="defaults" class="solr.StandardRequestHandler">
305
<lst name="defaults">
306
<int name="rows">4</int>
307
<bool name="hl">true</bool>
308
<str name="hl.fl">text,name,subject,title,whitetok</str>
312
<!-- test query parameter defaults -->
313
<requestHandler name="lazy" class="solr.StandardRequestHandler" startup="lazy">
314
<lst name="defaults">
315
<int name="rows">4</int>
316
<bool name="hl">true</bool>
317
<str name="hl.fl">text,name,subject,title,whitetok</str>
321
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
322
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy">
323
<bool name="httpCaching">false</bool>
326
<searchComponent name="spellcheck" class="org.apache.solr.handler.component.SpellCheckComponent">
327
<str name="queryAnalyzerFieldType">lowerfilt</str>
329
<lst name="spellchecker">
330
<str name="name">default</str>
331
<str name="field">lowerfilt</str>
332
<str name="spellcheckIndexDir">spellchecker1</str>
333
<str name="buildOnCommit">true</str>
335
<!-- Example of using different distance measure -->
336
<lst name="spellchecker">
337
<str name="name">jarowinkler</str>
338
<str name="field">lowerfilt</str>
339
<!-- Use a different Distance Measure -->
340
<str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
341
<str name="spellcheckIndexDir">spellchecker2</str>
344
<lst name="spellchecker">
345
<str name="classname">solr.FileBasedSpellChecker</str>
346
<str name="name">external</str>
347
<str name="sourceLocation">spellings.txt</str>
348
<str name="characterEncoding">UTF-8</str>
349
<str name="spellcheckIndexDir">spellchecker3</str>
353
<searchComponent name="termsComp" class="org.apache.solr.handler.component.TermsComponent"/>
355
<requestHandler name="/terms" class="org.apache.solr.handler.component.SearchHandler">
356
<arr name="components">
361
The SpellingQueryConverter to convert raw (CommonParams.Q) queries into tokens. Uses a simple regular expression
362
to strip off field markup, boosts, ranges, etc. but it is not guaranteed to match an exact parse from the query parser.
364
<queryConverter name="queryConverter" class="org.apache.solr.spelling.SpellingQueryConverter"/>
366
<requestHandler name="spellCheckCompRH" class="org.apache.solr.handler.component.SearchHandler">
367
<lst name="defaults">
368
<!-- omp = Only More Popular -->
369
<str name="spellcheck.onlyMorePopular">false</str>
370
<!-- exr = Extended Results -->
371
<str name="spellcheck.extendedResults">false</str>
372
<!-- The number of suggestions to return -->
373
<str name="spellcheck.count">1</str>
375
<arr name="last-components">
376
<str>spellcheck</str>
381
<searchComponent name="tvComponent" class="org.apache.solr.handler.component.TermVectorComponent"/>
383
<requestHandler name="tvrh" class="org.apache.solr.handler.component.SearchHandler">
384
<lst name="defaults">
387
<arr name="last-components">
388
<str>tvComponent</str>
392
<searchComponent class="solr.HighlightComponent" name="highlight">
394
<!-- Configure the standard fragmenter -->
395
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
396
<lst name="defaults">
397
<int name="hl.fragsize">100</int>
401
<fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
402
<lst name="defaults">
403
<int name="hl.fragsize">70</int>
407
<!-- Configure the standard formatter -->
408
<formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
409
<lst name="defaults">
410
<str name="hl.simple.pre"><![CDATA[<em>]]></str>
411
<str name="hl.simple.post"><![CDATA[</em>]]></str>
418
<!-- enable streaming for testing... -->
419
<requestDispatcher handleSelect="true" >
420
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
421
<httpCaching lastModifiedFrom="openTime" etagSeed="Solr" never304="false">
422
<cacheControl>max-age=30, public</cacheControl>
427
<defaultQuery>solr</defaultQuery>
428
<gettableFiles>solrconfig.xml scheam.xml admin-extra.html</gettableFiles>
431
<!-- test getting system property -->
432
<propTest attr1="${solr.test.sys.prop1}-$${literal}"
433
attr2="${non.existent.sys.prop:default-from-config}">prefix-${solr.test.sys.prop2}-suffix</propTest>
435
<queryParser name="foo" class="FooQParserPlugin"/>
437
<updateRequestProcessorChain name="dedupe">
438
<processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
439
<bool name="enabled">false</bool>
440
<bool name="overwriteDupes">true</bool>
441
<str name="fields">v_t,t_field</str>
442
<str name="signatureClass">org.apache.solr.update.processor.TextProfileSignature</str>
444
<processor class="solr.RunUpdateProcessorFactory" />
445
</updateRequestProcessorChain>