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-propinject-indexdefault.xml 1197159 2011-11-03 14:40:25Z mvg $
26
This is a "kitchen sink" config file that tests can use.
27
When writting a new test, feel free to add *new* items (plugins,
28
config options, etc...) as long as they don't break any existing
29
tests. if you need to test something esoteric please add a new
30
"solrconfig-your-esoteric-purpose.xml" config file.
32
Note in particular that this test is used by MinimalSchemaTest so
33
Anything added to this file needs to work correctly even if there
34
is now uniqueKey or defaultSearch Field.
40
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
43
<!-- Used to specify an alternate directory to hold all index data.
44
It defaults to "index" if not present, and should probably
45
not be changed if replication is in use. -->
46
<dataDir>${solr.data.dir:}</dataDir>
48
<!-- The DirectoryFactory to use for indexes.
49
solr.StandardDirectoryFactory, the default, is filesystem based.
50
solr.RAMDirectoryFactory is memory based and not persistent. -->
51
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
55
<!-- Values here affect all index writers and act as a default
56
unless overridden. -->
57
<!-- Values here affect all index writers and act as a default unless overridden. -->
58
<useCompoundFile>false</useCompoundFile>
59
<mergeFactor>10</mergeFactor>
60
<!-- If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
62
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
63
<!-- Tell Lucene when to flush documents to disk.
64
Giving Lucene more memory for indexing means faster indexing at the cost of more RAM
66
If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
69
<ramBufferSizeMB>32</ramBufferSizeMB>
70
<maxMergeDocs>2147483647</maxMergeDocs>
71
<maxFieldLength>10000</maxFieldLength>
72
<writeLockTimeout>1000</writeLockTimeout>
76
The Merge Policy in Lucene controls how merging is handled by Lucene. The default in 2.3 is the LogByteSizeMergePolicy, previous
77
versions used LogDocMergePolicy.
79
LogByteSizeMergePolicy chooses segments to merge based on their size. The Lucene 2.2 default, LogDocMergePolicy chose when
80
to merge based on number of documents
82
Other implementations of MergePolicy must have a no-argument constructor
84
<mergePolicy class="org.apache.lucene.index.LogByteSizeMergePolicy">
85
<double name="maxMergeMB">32.0</double>
90
The Merge Scheduler in Lucene controls how merges are performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
91
can perform merges in the background using separate threads. The SerialMergeScheduler (Lucene 2.2 default) does not.
93
<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler">
94
<int name="maxMergeCount">4</int>
95
<int name="maxThreadCount">4</int>
97
<!-- these are global... can't currently override per index -->
98
<writeLockTimeout>1000</writeLockTimeout>
100
<lockType>single</lockType>
104
<!-- lucene options specific to the main on-disk lucene index -->
105
<useCompoundFile>false</useCompoundFile>
106
<mergeFactor>10</mergeFactor>
107
<!-- for better multi-segment testing, we are using slower
108
indexing properties of maxBufferedDocs=10 and LogDocMergePolicy.
110
<maxBufferedDocs>10</maxBufferedDocs>
111
<maxMergeDocs>2147483647</maxMergeDocs>
112
<maxFieldLength>10000</maxFieldLength>
114
<!--<mergePolicy class="org.apache.lucene.index.LogByteSizeMergePolicy">-->
115
<!--<double name="maxMergeMB">64.0</double>-->
116
<!--</mergePolicy>-->
118
<!--<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler">-->
119
<!--<int name="maxThreadCount">2</int>-->
120
<!--</mergeScheduler>-->
121
<unlockOnStartup>true</unlockOnStartup>
124
<updateHandler class="solr.DirectUpdateHandler2">
126
<!-- autocommit pending docs if certain criteria are met
128
<maxDocs>10000</maxDocs>
129
<maxTime>3600000</maxTime>
132
<!-- represents a lower bound on the frequency that commits may
133
occur (in seconds). NOTE: not yet implemented
135
<commitIntervalLowerBound>0</commitIntervalLowerBound>
138
<!-- The RunExecutableListener executes an external command.
139
exe - the name of the executable to run
140
dir - dir to use as the current working directory. default="."
141
wait - the calling thread waits until the executable returns. default="true"
142
args - the arguments to pass to the program. default=nothing
143
env - environment variables to set. default=nothing
145
<!-- A postCommit event is fired after every commit
146
<listener event="postCommit" class="solr.RunExecutableListener">
147
<str name="exe">/var/opt/resin3/__PORT__/scripts/solr/snapshooter</str>
148
<str name="dir">/var/opt/resin3/__PORT__</str>
149
<bool name="wait">true</bool>
150
<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
151
<arr name="env"> <str>MYVAR=val1</str> </arr>
160
<!-- Maximum number of clauses in a boolean query... can affect
161
range or wildcard queries that expand to big boolean
162
queries. An exception is thrown if exceeded.
164
<maxBooleanClauses>1024</maxBooleanClauses>
167
<!-- Cache specification for Filters or DocSets - unordered set of *all* documents
168
that match a particular query.
171
class="solr.search.FastLRUCache"
174
autowarmCount="256"/>
177
class="solr.search.LRUCache"
180
autowarmCount="1024"/>
183
class="solr.search.LRUCache"
188
<!-- If true, stored fields that are not requested will be loaded lazily.
190
<enableLazyFieldLoading>true</enableLazyFieldLoading>
194
<cache name="myUserCache"
195
class="solr.search.LRUCache"
199
regenerator="MyRegenerator"
205
<useFilterForSortedQuery>true</useFilterForSortedQuery>
208
<queryResultWindowSize>10</queryResultWindowSize>
210
<!-- set maxSize artificially low to exercise both types of sets -->
211
<HashDocSet maxSize="3" loadFactor="0.75"/>
214
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
215
into cached filters if the number of docs selected by the clause exceeds
216
the threshold (represented as a fraction of the total index)
218
<boolTofilterOptimizer enabled="false" cacheSize="32" threshold=".05"/>
221
<!-- a newSearcher event is fired whenever a new searcher is being prepared
222
and there is a current searcher handling requests (aka registered). -->
223
<!-- QuerySenderListener takes an array of NamedList and executes a
224
local query request for each NamedList in sequence. -->
226
<listener event="newSearcher" class="solr.QuerySenderListener">
228
<lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
229
<lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
234
<!-- a firstSearcher event is fired whenever a new searcher is being
235
prepared but there is no current registered searcher to handle
236
requests or to gain prewarming data from. -->
238
<listener event="firstSearcher" class="solr.QuerySenderListener">
240
<lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
249
<!-- An alternate set representation that uses an integer hash to store filters (sets of docids).
250
If the set cardinality <= maxSize elements, then HashDocSet will be used instead of the bitset
251
based HashBitset. -->
253
<!-- requestHandler plugins... incoming queries will be dispatched to the
254
correct handler based on the qt (query type) param matching the
255
name of registered handlers.
256
The "standard" request handler is the default and will be used if qt
257
is not specified in the request.
259
<requestHandler name="standard" class="solr.StandardRequestHandler">
260
<bool name="httpCaching">true</bool>
262
<requestHandler name="dismaxOldStyleDefaults"
263
class="solr.DisMaxRequestHandler" >
264
<!-- for historic reasons, DisMaxRequestHandler will use all of
265
it's init params as "defaults" if there is no "defaults" list
268
<str name="q.alt">*:*</str>
269
<float name="tie">0.01</float>
271
text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0
274
text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5
277
ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3
280
3<-1 5<-2 6<90%
282
<int name="ps">100</int>
284
<requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
285
<lst name="defaults">
286
<str name="q.alt">*:*</str>
287
<float name="tie">0.01</float>
289
text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0
292
text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5
295
ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3
298
3<-1 5<-2 6<90%
300
<int name="ps">100</int>
303
<requestHandler name="old" class="solr.tst.OldRequestHandler" >
304
<int name="myparam">1000</int>
305
<float name="ratio">1.4142135</float>
306
<arr name="myarr"><int>1</int><int>2</int></arr>
309
<requestHandler name="oldagain" class="solr.tst.OldRequestHandler" >
310
<lst name="lst1"> <str name="op">sqrt</str> <int name="val">2</int> </lst>
311
<lst name="lst2"> <str name="op">log</str> <float name="val">10</float> </lst>
314
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
316
<requestHandler name="test" class="solr.tst.TestRequestHandler" />
318
<!-- test query parameter defaults -->
319
<requestHandler name="defaults" class="solr.StandardRequestHandler">
320
<lst name="defaults">
321
<int name="rows">4</int>
322
<bool name="hl">true</bool>
323
<str name="hl.fl">text,name,subject,title,whitetok</str>
327
<!-- test query parameter defaults -->
328
<requestHandler name="lazy" class="solr.StandardRequestHandler" startup="lazy">
329
<lst name="defaults">
330
<int name="rows">4</int>
331
<bool name="hl">true</bool>
332
<str name="hl.fl">text,name,subject,title,whitetok</str>
336
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
337
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy">
338
<bool name="httpCaching">false</bool>
341
<searchComponent name="spellcheck" class="org.apache.solr.handler.component.SpellCheckComponent">
342
<str name="queryAnalyzerFieldType">lowerfilt</str>
344
<lst name="spellchecker">
345
<str name="name">default</str>
346
<str name="field">lowerfilt</str>
347
<str name="spellcheckIndexDir">spellchecker1</str>
348
<str name="buildOnCommit">true</str>
350
<!-- Example of using different distance measure -->
351
<lst name="spellchecker">
352
<str name="name">jarowinkler</str>
353
<str name="field">lowerfilt</str>
354
<!-- Use a different Distance Measure -->
355
<str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
356
<str name="spellcheckIndexDir">spellchecker2</str>
359
<lst name="spellchecker">
360
<str name="classname">solr.FileBasedSpellChecker</str>
361
<str name="name">external</str>
362
<str name="sourceLocation">spellings.txt</str>
363
<str name="characterEncoding">UTF-8</str>
364
<str name="spellcheckIndexDir">spellchecker3</str>
368
<searchComponent name="termsComp" class="org.apache.solr.handler.component.TermsComponent"/>
370
<requestHandler name="/terms" class="org.apache.solr.handler.component.SearchHandler">
371
<arr name="components">
376
The SpellingQueryConverter to convert raw (CommonParams.Q) queries into tokens. Uses a simple regular expression
377
to strip off field markup, boosts, ranges, etc. but it is not guaranteed to match an exact parse from the query parser.
379
<queryConverter name="queryConverter" class="org.apache.solr.spelling.SpellingQueryConverter"/>
381
<requestHandler name="spellCheckCompRH" class="org.apache.solr.handler.component.SearchHandler">
382
<lst name="defaults">
383
<!-- omp = Only More Popular -->
384
<str name="spellcheck.onlyMorePopular">false</str>
385
<!-- exr = Extended Results -->
386
<str name="spellcheck.extendedResults">false</str>
387
<!-- The number of suggestions to return -->
388
<str name="spellcheck.count">1</str>
390
<arr name="last-components">
391
<str>spellcheck</str>
396
<searchComponent name="tvComponent" class="org.apache.solr.handler.component.TermVectorComponent"/>
398
<requestHandler name="tvrh" class="org.apache.solr.handler.component.SearchHandler">
399
<lst name="defaults">
402
<arr name="last-components">
403
<str>tvComponent</str>
407
<searchComponent class="solr.HighlightComponent" name="highlight">
409
<!-- Configure the standard fragmenter -->
410
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
411
<lst name="defaults">
412
<int name="hl.fragsize">100</int>
416
<fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
417
<lst name="defaults">
418
<int name="hl.fragsize">70</int>
422
<!-- Configure the standard formatter -->
423
<formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
424
<lst name="defaults">
425
<str name="hl.simple.pre"><![CDATA[<em>]]></str>
426
<str name="hl.simple.post"><![CDATA[</em>]]></str>
432
<!-- enable streaming for testing... -->
433
<requestDispatcher handleSelect="true" >
434
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
435
<httpCaching lastModifiedFrom="openTime" etagSeed="Solr" never304="false">
436
<cacheControl>max-age=30, public</cacheControl>
441
<defaultQuery>solr</defaultQuery>
442
<gettableFiles>solrconfig.xml scheam.xml admin-extra.html</gettableFiles>
445
<!-- test getting system property -->
446
<propTest attr1="${solr.test.sys.prop1}-$${literal}"
447
attr2="${non.existent.sys.prop:default-from-config}">prefix-${solr.test.sys.prop2}-suffix</propTest>
449
<queryParser name="foo" class="FooQParserPlugin"/>
451
<updateRequestProcessorChain name="dedupe">
452
<processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
453
<bool name="enabled">false</bool>
454
<bool name="overwriteDupes">true</bool>
455
<str name="fields">v_t,t_field</str>
456
<str name="signatureClass">org.apache.solr.update.processor.TextProfileSignature</str>
458
<processor class="solr.RunUpdateProcessorFactory" />
459
</updateRequestProcessorChain>