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-delpolicy2.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="org.apache.solr.core.FakeDeletionPolicy">
95
<str name="var1">value1</str>
96
<str name="var2">value2</str>
101
<updateHandler class="solr.DirectUpdateHandler2">
103
<!-- autocommit pending docs if certain criteria are met
105
<maxDocs>10000</maxDocs>
106
<maxTime>3600000</maxTime>
109
<!-- represents a lower bound on the frequency that commits may
110
occur (in seconds). NOTE: not yet implemented
112
<commitIntervalLowerBound>0</commitIntervalLowerBound>
115
<!-- The RunExecutableListener executes an external command.
116
exe - the name of the executable to run
117
dir - dir to use as the current working directory. default="."
118
wait - the calling thread waits until the executable returns. default="true"
119
args - the arguments to pass to the program. default=nothing
120
env - environment variables to set. default=nothing
122
<!-- A postCommit event is fired after every commit
123
<listener event="postCommit" class="solr.RunExecutableListener">
124
<str name="exe">/var/opt/resin3/__PORT__/scripts/solr/snapshooter</str>
125
<str name="dir">/var/opt/resin3/__PORT__</str>
126
<bool name="wait">true</bool>
127
<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
128
<arr name="env"> <str>MYVAR=val1</str> </arr>
137
<!-- Maximum number of clauses in a boolean query... can affect
138
range or wildcard queries that expand to big boolean
139
queries. An exception is thrown if exceeded.
141
<maxBooleanClauses>1024</maxBooleanClauses>
144
<!-- Cache specification for Filters or DocSets - unordered set of *all* documents
145
that match a particular query.
148
class="solr.search.LRUCache"
151
autowarmCount="256"/>
154
class="solr.search.LRUCache"
157
autowarmCount="1024"/>
160
class="solr.search.LRUCache"
165
<!-- If true, stored fields that are not requested will be loaded lazily.
167
<enableLazyFieldLoading>true</enableLazyFieldLoading>
171
<cache name="myUserCache"
172
class="solr.search.LRUCache"
176
regenerator="MyRegenerator"
181
<useFilterForSortedQuery>true</useFilterForSortedQuery>
183
<queryResultWindowSize>10</queryResultWindowSize>
185
<!-- set maxSize artificially low to exercise both types of sets -->
186
<HashDocSet maxSize="3" loadFactor="0.75"/>
189
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
190
into cached filters if the number of docs selected by the clause exceeds
191
the threshold (represented as a fraction of the total index)
193
<boolTofilterOptimizer enabled="false" cacheSize="32" threshold=".05"/>
196
<!-- a newSearcher event is fired whenever a new searcher is being prepared
197
and there is a current searcher handling requests (aka registered). -->
198
<!-- QuerySenderListener takes an array of NamedList and executes a
199
local query request for each NamedList in sequence. -->
201
<listener event="newSearcher" class="solr.QuerySenderListener">
203
<lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
204
<lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
209
<!-- a firstSearcher event is fired whenever a new searcher is being
210
prepared but there is no current registered searcher to handle
211
requests or to gain prewarming data from. -->
213
<listener event="firstSearcher" class="solr.QuerySenderListener">
215
<lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
224
<!-- An alternate set representation that uses an integer hash to store filters (sets of docids).
225
If the set cardinality <= maxSize elements, then HashDocSet will be used instead of the bitset
226
based HashBitset. -->
228
<!-- requestHandler plugins... incoming queries will be dispatched to the
229
correct handler based on the qt (query type) param matching the
230
name of registered handlers.
231
The "standard" request handler is the default and will be used if qt
232
is not specified in the request.
234
<requestHandler name="standard" class="solr.StandardRequestHandler">
235
<bool name="httpCaching">true</bool>
237
<requestHandler name="dismaxOldStyleDefaults"
238
class="solr.DisMaxRequestHandler" >
239
<!-- for historic reasons, DisMaxRequestHandler will use all of
240
it's init params as "defaults" if there is no "defaults" list
243
<float name="tie">0.01</float>
245
text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0
248
text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5
251
ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3
254
3<-1 5<-2 6<90%
256
<int name="ps">100</int>
258
<requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
259
<lst name="defaults">
260
<str name="q.alt">*:*</str>
261
<float name="tie">0.01</float>
263
text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0
266
text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5
269
ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3
272
3<-1 5<-2 6<90%
274
<int name="ps">100</int>
277
<requestHandler name="old" class="solr.tst.OldRequestHandler" >
278
<int name="myparam">1000</int>
279
<float name="ratio">1.4142135</float>
280
<arr name="myarr"><int>1</int><int>2</int></arr>
283
<requestHandler name="oldagain" class="solr.tst.OldRequestHandler" >
284
<lst name="lst1"> <str name="op">sqrt</str> <int name="val">2</int> </lst>
285
<lst name="lst2"> <str name="op">log</str> <float name="val">10</float> </lst>
288
<requestHandler name="test" class="solr.tst.TestRequestHandler" />
290
<!-- test query parameter defaults -->
291
<requestHandler name="defaults" class="solr.StandardRequestHandler">
292
<lst name="defaults">
293
<int name="rows">4</int>
294
<bool name="hl">true</bool>
295
<str name="hl.fl">text,name,subject,title,whitetok</str>
299
<!-- test query parameter defaults -->
300
<requestHandler name="lazy" class="solr.StandardRequestHandler" startup="lazy">
301
<lst name="defaults">
302
<int name="rows">4</int>
303
<bool name="hl">true</bool>
304
<str name="hl.fl">text,name,subject,title,whitetok</str>
308
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
309
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy">
310
<bool name="httpCaching">false</bool>
313
<!-- test elevation -->
314
<!--searchComponent name="elevate" class="org.apache.solr.handler.component.QueryElevationComponent" >
315
<str name="queryFieldType">string</str>
316
<str name="config-file">elevate.xml</str>
319
<requestHandler name="/elevate" class="org.apache.solr.handler.component.SearchHandler">
320
<lst name="defaults">
321
<str name="echoParams">explicit</str>
323
<!--arr name="last-components">
328
<searchComponent name="spellcheck" class="org.apache.solr.handler.component.SpellCheckComponent">
329
<str name="queryAnalyzerFieldType">lowerfilt</str>
331
<lst name="spellchecker">
332
<str name="name">default</str>
333
<str name="field">lowerfilt</str>
334
<str name="spellcheckIndexDir">spellchecker1</str>
335
<str name="buildOnCommit">true</str>
337
<!-- Example of using different distance measure -->
338
<lst name="spellchecker">
339
<str name="name">jarowinkler</str>
340
<str name="field">lowerfilt</str>
341
<!-- Use a different Distance Measure -->
342
<str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
343
<str name="spellcheckIndexDir">spellchecker2</str>
346
<lst name="spellchecker">
347
<str name="classname">solr.FileBasedSpellChecker</str>
348
<str name="name">external</str>
349
<str name="sourceLocation">spellings.txt</str>
350
<str name="characterEncoding">UTF-8</str>
351
<str name="spellcheckIndexDir">spellchecker3</str>
355
The SpellingQueryConverter to convert raw (CommonParams.Q) queries into tokens. Uses a simple regular expression
356
to strip off field markup, boosts, ranges, etc. but it is not guaranteed to match an exact parse from the query parser.
358
<queryConverter name="queryConverter" class="org.apache.solr.spelling.SpellingQueryConverter"/>
360
<requestHandler name="spellCheckCompRH" class="org.apache.solr.handler.component.SearchHandler">
361
<lst name="defaults">
362
<!-- omp = Only More Popular -->
363
<str name="spellcheck.onlyMorePopular">false</str>
364
<!-- exr = Extended Results -->
365
<str name="spellcheck.extendedResults">false</str>
366
<!-- The number of suggestions to return -->
367
<str name="spellcheck.count">1</str>
369
<arr name="last-components">
370
<str>spellcheck</str>
374
<searchComponent class="solr.HighlightComponent" name="highlight">
376
<!-- Configure the standard fragmenter -->
377
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
378
<lst name="defaults">
379
<int name="hl.fragsize">100</int>
383
<fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
384
<lst name="defaults">
385
<int name="hl.fragsize">70</int>
389
<!-- Configure the standard formatter -->
390
<formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
391
<lst name="defaults">
392
<str name="hl.simple.pre"><![CDATA[<em>]]></str>
393
<str name="hl.simple.post"><![CDATA[</em>]]></str>
400
<!-- enable streaming for testing... -->
401
<requestDispatcher handleSelect="true" >
402
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
403
<httpCaching lastModifiedFrom="openTime" etagSeed="Solr" never304="false">
404
<cacheControl>max-age=30, public</cacheControl>
409
<defaultQuery>solr</defaultQuery>
410
<!--gettableFiles>solrconfig.xml scheam.xml admin-extra.html</gettableFiles-->
413
<!-- test getting system property -->
414
<propTest attr1="${solr.test.sys.prop1}-$${literal}"
415
attr2="${non.existent.sys.prop:default-from-config}">prefix-${solr.test.sys.prop2}-suffix</propTest>
417
<queryParser name="foo" class="FooQParserPlugin"/>