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-delpolicy1.xml 1197159 2011-11-03 14:40:25Z mvg $
26
<luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
29
<!-- Used to specify an alternate directory to hold all index data.
30
It defaults to "index" if not present, and should probably
31
not be changed if replication is in use. -->
32
<dataDir>${solr.data.dir:}</dataDir>
34
<!-- The DirectoryFactory to use for indexes.
35
solr.StandardDirectoryFactory, the default, is filesystem based.
36
solr.RAMDirectoryFactory is memory based and not persistent. -->
37
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
41
<!-- Values here affect all index writers and act as a default
42
unless overridden. -->
43
<!-- Values here affect all index writers and act as a default unless overridden. -->
44
<useCompoundFile>false</useCompoundFile>
45
<mergeFactor>10</mergeFactor>
46
<!-- If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
48
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
49
<!-- Tell Lucene when to flush documents to disk.
50
Giving Lucene more memory for indexing means faster indexing at the cost of more RAM
52
If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
55
<ramBufferSizeMB>32</ramBufferSizeMB>
56
<maxMergeDocs>2147483647</maxMergeDocs>
57
<maxFieldLength>10000</maxFieldLength>
58
<writeLockTimeout>1000</writeLockTimeout>
62
The Merge Policy in Lucene controls how merging is handled by Lucene. The default in 2.3 is the LogByteSizeMergePolicy, previous
63
versions used LogDocMergePolicy.
65
LogByteSizeMergePolicy chooses segments to merge based on their size. The Lucene 2.2 default, LogDocMergePolicy chose when
66
to merge based on number of documents
68
Other implementations of MergePolicy must have a no-argument constructor
70
<mergePolicy class="org.apache.lucene.index.LogByteSizeMergePolicy"/>
74
The Merge Scheduler in Lucene controls how merges are performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
75
can perform merges in the background using separate threads. The SerialMergeScheduler (Lucene 2.2 default) does not.
77
<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
78
<!-- these are global... can't currently override per index -->
79
<writeLockTimeout>1000</writeLockTimeout>
81
<lockType>single</lockType>
85
<!-- lucene options specific to the main on-disk lucene index -->
86
<useCompoundFile>false</useCompoundFile>
87
<mergeFactor>10</mergeFactor>
88
<ramBufferSizeMB>32</ramBufferSizeMB>
89
<maxMergeDocs>2147483647</maxMergeDocs>
90
<maxFieldLength>10000</maxFieldLength>
92
<unlockOnStartup>true</unlockOnStartup>
94
<deletionPolicy class="solr.SolrDeletionPolicy">
96
<str name="keepOptimizedOnly">true</str>
97
<str name="maxCommitsToKeep">3</str>
98
<str name="maxCommitAge">100MILLISECONDS</str>
104
<updateHandler class="solr.DirectUpdateHandler2">
106
<!-- autocommit pending docs if certain criteria are met
108
<maxDocs>10000</maxDocs>
109
<maxTime>3600000</maxTime>
112
<!-- represents a lower bound on the frequency that commits may
113
occur (in seconds). NOTE: not yet implemented
115
<commitIntervalLowerBound>0</commitIntervalLowerBound>
118
<!-- The RunExecutableListener executes an external command.
119
exe - the name of the executable to run
120
dir - dir to use as the current working directory. default="."
121
wait - the calling thread waits until the executable returns. default="true"
122
args - the arguments to pass to the program. default=nothing
123
env - environment variables to set. default=nothing
125
<!-- A postCommit event is fired after every commit
126
<listener event="postCommit" class="solr.RunExecutableListener">
127
<str name="exe">/var/opt/resin3/__PORT__/scripts/solr/snapshooter</str>
128
<str name="dir">/var/opt/resin3/__PORT__</str>
129
<bool name="wait">true</bool>
130
<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
131
<arr name="env"> <str>MYVAR=val1</str> </arr>
140
<!-- Maximum number of clauses in a boolean query... can affect
141
range or wildcard queries that expand to big boolean
142
queries. An exception is thrown if exceeded.
144
<maxBooleanClauses>1024</maxBooleanClauses>
147
<!-- Cache specification for Filters or DocSets - unordered set of *all* documents
148
that match a particular query.
151
class="solr.search.LRUCache"
154
autowarmCount="256"/>
157
class="solr.search.LRUCache"
160
autowarmCount="1024"/>
163
class="solr.search.LRUCache"
168
<!-- If true, stored fields that are not requested will be loaded lazily.
170
<enableLazyFieldLoading>true</enableLazyFieldLoading>
174
<cache name="myUserCache"
175
class="solr.search.LRUCache"
179
regenerator="MyRegenerator"
184
<useFilterForSortedQuery>true</useFilterForSortedQuery>
186
<queryResultWindowSize>10</queryResultWindowSize>
188
<!-- set maxSize artificially low to exercise both types of sets -->
189
<HashDocSet maxSize="3" loadFactor="0.75"/>
192
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
193
into cached filters if the number of docs selected by the clause exceeds
194
the threshold (represented as a fraction of the total index)
196
<boolTofilterOptimizer enabled="false" cacheSize="32" threshold=".05"/>
199
<!-- a newSearcher event is fired whenever a new searcher is being prepared
200
and there is a current searcher handling requests (aka registered). -->
201
<!-- QuerySenderListener takes an array of NamedList and executes a
202
local query request for each NamedList in sequence. -->
204
<listener event="newSearcher" class="solr.QuerySenderListener">
206
<lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
207
<lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
212
<!-- a firstSearcher event is fired whenever a new searcher is being
213
prepared but there is no current registered searcher to handle
214
requests or to gain prewarming data from. -->
216
<listener event="firstSearcher" class="solr.QuerySenderListener">
218
<lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
227
<!-- An alternate set representation that uses an integer hash to store filters (sets of docids).
228
If the set cardinality <= maxSize elements, then HashDocSet will be used instead of the bitset
229
based HashBitset. -->
231
<!-- requestHandler plugins... incoming queries will be dispatched to the
232
correct handler based on the qt (query type) param matching the
233
name of registered handlers.
234
The "standard" request handler is the default and will be used if qt
235
is not specified in the request.
237
<requestHandler name="standard" class="solr.StandardRequestHandler">
238
<bool name="httpCaching">true</bool>
240
<requestHandler name="dismaxOldStyleDefaults"
241
class="solr.DisMaxRequestHandler" >
242
<!-- for historic reasons, DisMaxRequestHandler will use all of
243
it's init params as "defaults" if there is no "defaults" list
246
<float name="tie">0.01</float>
248
text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0
251
text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5
254
ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3
257
3<-1 5<-2 6<90%
259
<int name="ps">100</int>
261
<requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
262
<lst name="defaults">
263
<str name="q.alt">*:*</str>
264
<float name="tie">0.01</float>
266
text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0
269
text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5
272
ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3
275
3<-1 5<-2 6<90%
277
<int name="ps">100</int>
280
<requestHandler name="old" class="solr.tst.OldRequestHandler" >
281
<int name="myparam">1000</int>
282
<float name="ratio">1.4142135</float>
283
<arr name="myarr"><int>1</int><int>2</int></arr>
286
<requestHandler name="oldagain" class="solr.tst.OldRequestHandler" >
287
<lst name="lst1"> <str name="op">sqrt</str> <int name="val">2</int> </lst>
288
<lst name="lst2"> <str name="op">log</str> <float name="val">10</float> </lst>
291
<requestHandler name="test" class="solr.tst.TestRequestHandler" />
293
<!-- test query parameter defaults -->
294
<requestHandler name="defaults" class="solr.StandardRequestHandler">
295
<lst name="defaults">
296
<int name="rows">4</int>
297
<bool name="hl">true</bool>
298
<str name="hl.fl">text,name,subject,title,whitetok</str>
302
<!-- test query parameter defaults -->
303
<requestHandler name="lazy" class="solr.StandardRequestHandler" startup="lazy">
304
<lst name="defaults">
305
<int name="rows">4</int>
306
<bool name="hl">true</bool>
307
<str name="hl.fl">text,name,subject,title,whitetok</str>
311
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
312
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy">
313
<bool name="httpCaching">false</bool>
316
<!-- test elevation -->
317
<!--searchComponent name="elevate" class="org.apache.solr.handler.component.QueryElevationComponent" >
318
<str name="queryFieldType">string</str>
319
<str name="config-file">elevate.xml</str>
322
<requestHandler name="/elevate" class="org.apache.solr.handler.component.SearchHandler">
323
<lst name="defaults">
324
<str name="echoParams">explicit</str>
326
<!--arr name="last-components">
331
<searchComponent name="spellcheck" class="org.apache.solr.handler.component.SpellCheckComponent">
332
<str name="queryAnalyzerFieldType">lowerfilt</str>
334
<lst name="spellchecker">
335
<str name="name">default</str>
336
<str name="field">lowerfilt</str>
337
<str name="spellcheckIndexDir">spellchecker1</str>
338
<str name="buildOnCommit">true</str>
340
<!-- Example of using different distance measure -->
341
<lst name="spellchecker">
342
<str name="name">jarowinkler</str>
343
<str name="field">lowerfilt</str>
344
<!-- Use a different Distance Measure -->
345
<str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
346
<str name="spellcheckIndexDir">spellchecker2</str>
349
<lst name="spellchecker">
350
<str name="classname">solr.FileBasedSpellChecker</str>
351
<str name="name">external</str>
352
<str name="sourceLocation">spellings.txt</str>
353
<str name="characterEncoding">UTF-8</str>
354
<str name="spellcheckIndexDir">spellchecker3</str>
358
The SpellingQueryConverter to convert raw (CommonParams.Q) queries into tokens. Uses a simple regular expression
359
to strip off field markup, boosts, ranges, etc. but it is not guaranteed to match an exact parse from the query parser.
361
<queryConverter name="queryConverter" class="org.apache.solr.spelling.SpellingQueryConverter"/>
363
<requestHandler name="spellCheckCompRH" class="org.apache.solr.handler.component.SearchHandler">
364
<lst name="defaults">
365
<!-- omp = Only More Popular -->
366
<str name="spellcheck.onlyMorePopular">false</str>
367
<!-- exr = Extended Results -->
368
<str name="spellcheck.extendedResults">false</str>
369
<!-- The number of suggestions to return -->
370
<str name="spellcheck.count">1</str>
372
<arr name="last-components">
373
<str>spellcheck</str>
377
<searchComponent class="solr.HighlightComponent" name="highlight">
379
<!-- Configure the standard fragmenter -->
380
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
381
<lst name="defaults">
382
<int name="hl.fragsize">100</int>
386
<fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
387
<lst name="defaults">
388
<int name="hl.fragsize">70</int>
392
<!-- Configure the standard formatter -->
393
<formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
394
<lst name="defaults">
395
<str name="hl.simple.pre"><![CDATA[<em>]]></str>
396
<str name="hl.simple.post"><![CDATA[</em>]]></str>
402
<!-- enable streaming for testing... -->
403
<requestDispatcher handleSelect="true" >
404
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
405
<httpCaching lastModifiedFrom="openTime" etagSeed="Solr" never304="false">
406
<cacheControl>max-age=30, public</cacheControl>
411
<defaultQuery>solr</defaultQuery>
412
<!--gettableFiles>solrconfig.xml scheam.xml admin-extra.html</gettableFiles-->
415
<!-- test getting system property -->
416
<propTest attr1="${solr.test.sys.prop1}-$${literal}"
417
attr2="${non.existent.sys.prop:default-from-config}">prefix-${solr.test.sys.prop2}-suffix</propTest>
419
<queryParser name="foo" class="FooQParserPlugin"/>