~slub.team/goobi-indexserver/3.x

« back to all changes in this revision

Viewing changes to solr/core/src/test-files/solr/conf/solrconfig-legacy.xml

  • Committer: Sebastian Meyer
  • Date: 2012-08-03 09:12:40 UTC
  • Revision ID: sebastian.meyer@slub-dresden.de-20120803091240-x6861b0vabq1xror
Remove Lucene and Solr source code and add patches instead
Fix Bug #985487: Auto-suggestion for the search interface

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" ?>
2
 
 
3
 
<!--
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
10
 
 
11
 
     http://www.apache.org/licenses/LICENSE-2.0
12
 
 
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.
18
 
-->
19
 
 
20
 
<!-- $Id: solrconfig.xml 382610 2006-03-03 01:43:03Z yonik $
21
 
     $Source$
22
 
     $Name$
23
 
 
24
 
 
25
 
 
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.
31
 
 
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.
35
 
 
36
 
 
37
 
  -->
38
 
 
39
 
<config>
40
 
  <luceneMatchVersion>${tests.luceneMatchVersion:LUCENE_CURRENT}</luceneMatchVersion>
41
 
  <jmx />
42
 
 
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>
47
 
 
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}"/>
52
 
 
53
 
 
54
 
  <indexDefaults>
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.
61
 
     -->
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
65
 
 
66
 
    If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
67
 
 
68
 
    -->
69
 
    <ramBufferSizeMB>32</ramBufferSizeMB>
70
 
    <maxMergeDocs>2147483647</maxMergeDocs>
71
 
    <maxFieldLength>10000</maxFieldLength>
72
 
    <writeLockTimeout>1000</writeLockTimeout>
73
 
 
74
 
    <!--
75
 
     Expert:
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.
78
 
 
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
81
 
 
82
 
     Other implementations of MergePolicy must have a no-argument constructor
83
 
     -->
84
 
    <mergePolicy>org.apache.lucene.index.LogDocMergePolicy</mergePolicy>
85
 
 
86
 
    <!--
87
 
     Expert:
88
 
     The Merge Scheduler in Lucene controls how merges are performed.  The ConcurrentMergeScheduler (Lucene 2.3 default)
89
 
      can perform merges in the background using separate threads.  The SerialMergeScheduler (Lucene 2.2 default) does not.
90
 
     -->
91
 
    <mergeScheduler>org.apache.lucene.index.SerialMergeScheduler</mergeScheduler>
92
 
    <!-- these are global... can't currently override per index -->
93
 
    <writeLockTimeout>1000</writeLockTimeout>
94
 
 
95
 
    <lockType>single</lockType>
96
 
  </indexDefaults>
97
 
 
98
 
  <mainIndex>
99
 
    <!-- lucene options specific to the main on-disk lucene index -->
100
 
    <useCompoundFile>false</useCompoundFile>
101
 
    <mergeFactor>10</mergeFactor>
102
 
    <!-- for better multi-segment testing, we are using slower
103
 
    indexing properties of maxBufferedDocs=10 and LogDocMergePolicy.
104
 
    -->
105
 
    <maxBufferedDocs>10</maxBufferedDocs>
106
 
    <maxMergeDocs>2147483647</maxMergeDocs>
107
 
    <maxFieldLength>10000</maxFieldLength>
108
 
    <mergePolicy>org.apache.lucene.index.LogDocMergePolicy</mergePolicy>
109
 
    <mergeScheduler>org.apache.lucene.index.SerialMergeScheduler</mergeScheduler>
110
 
    <unlockOnStartup>true</unlockOnStartup>
111
 
  </mainIndex>
112
 
 
113
 
  <updateHandler class="solr.DirectUpdateHandler2">
114
 
 
115
 
    <!-- autocommit pending docs if certain criteria are met 
116
 
    <autoCommit> 
117
 
      <maxDocs>10000</maxDocs>
118
 
      <maxTime>3600000</maxTime> 
119
 
    </autoCommit>
120
 
    -->
121
 
    <!-- represents a lower bound on the frequency that commits may
122
 
    occur (in seconds). NOTE: not yet implemented
123
 
    
124
 
    <commitIntervalLowerBound>0</commitIntervalLowerBound>
125
 
    -->
126
 
 
127
 
    <!-- The RunExecutableListener executes an external command.
128
 
         exe - the name of the executable to run
129
 
         dir - dir to use as the current working directory. default="."
130
 
         wait - the calling thread waits until the executable returns. default="true"
131
 
         args - the arguments to pass to the program.  default=nothing
132
 
         env - environment variables to set.  default=nothing
133
 
      -->
134
 
    <!-- A postCommit event is fired after every commit
135
 
    <listener event="postCommit" class="solr.RunExecutableListener">
136
 
      <str name="exe">/var/opt/resin3/__PORT__/scripts/solr/snapshooter</str>
137
 
      <str name="dir">/var/opt/resin3/__PORT__</str>
138
 
      <bool name="wait">true</bool>
139
 
      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
140
 
      <arr name="env"> <str>MYVAR=val1</str> </arr>
141
 
    </listener>
142
 
    -->
143
 
 
144
 
 
145
 
  </updateHandler>
146
 
 
147
 
 
148
 
  <query>
149
 
    <!-- Maximum number of clauses in a boolean query... can affect
150
 
        range or wildcard queries that expand to big boolean
151
 
        queries.  An exception is thrown if exceeded.
152
 
    -->
153
 
    <maxBooleanClauses>1024</maxBooleanClauses>
154
 
 
155
 
 
156
 
    <!-- Cache specification for Filters or DocSets - unordered set of *all* documents
157
 
         that match a particular query.
158
 
      -->
159
 
    <filterCache
160
 
      class="solr.search.FastLRUCache"
161
 
      size="512"
162
 
      initialSize="512"
163
 
      autowarmCount="256"/>
164
 
 
165
 
    <queryResultCache
166
 
      class="solr.search.LRUCache"
167
 
      size="512"
168
 
      initialSize="512"
169
 
      autowarmCount="1024"/>
170
 
 
171
 
    <documentCache
172
 
      class="solr.search.LRUCache"
173
 
      size="512"
174
 
      initialSize="512"
175
 
      autowarmCount="0"/>
176
 
 
177
 
    <!-- If true, stored fields that are not requested will be loaded lazily.
178
 
    -->
179
 
    <enableLazyFieldLoading>true</enableLazyFieldLoading>
180
 
 
181
 
    <!--
182
 
 
183
 
    <cache name="myUserCache"
184
 
      class="solr.search.LRUCache"
185
 
      size="4096"
186
 
      initialSize="1024"
187
 
      autowarmCount="1024"
188
 
      regenerator="MyRegenerator"
189
 
      />
190
 
    -->
191
 
 
192
 
 
193
 
    <!--
194
 
    <useFilterForSortedQuery>true</useFilterForSortedQuery>
195
 
    -->
196
 
 
197
 
    <queryResultWindowSize>10</queryResultWindowSize>
198
 
 
199
 
    <!-- set maxSize artificially low to exercise both types of sets -->
200
 
    <HashDocSet maxSize="3" loadFactor="0.75"/>
201
 
 
202
 
 
203
 
    <!-- boolToFilterOptimizer converts boolean clauses with zero boost
204
 
         into cached filters if the number of docs selected by the clause exceeds
205
 
         the threshold (represented as a fraction of the total index)
206
 
    -->
207
 
    <boolTofilterOptimizer enabled="false" cacheSize="32" threshold=".05"/>
208
 
 
209
 
 
210
 
    <!-- a newSearcher event is fired whenever a new searcher is being prepared
211
 
         and there is a current searcher handling requests (aka registered). -->
212
 
    <!-- QuerySenderListener takes an array of NamedList and executes a
213
 
         local query request for each NamedList in sequence. -->
214
 
    <!--
215
 
    <listener event="newSearcher" class="solr.QuerySenderListener">
216
 
      <arr name="queries">
217
 
        <lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
218
 
        <lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
219
 
      </arr>
220
 
    </listener>
221
 
    -->
222
 
 
223
 
    <!-- a firstSearcher event is fired whenever a new searcher is being
224
 
         prepared but there is no current registered searcher to handle
225
 
         requests or to gain prewarming data from. -->
226
 
    <!--
227
 
    <listener event="firstSearcher" class="solr.QuerySenderListener">
228
 
      <arr name="queries">
229
 
        <lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
230
 
      </arr>
231
 
    </listener>
232
 
    -->
233
 
 
234
 
 
235
 
  </query>
236
 
 
237
 
 
238
 
  <!-- An alternate set representation that uses an integer hash to store filters (sets of docids).
239
 
       If the set cardinality <= maxSize elements, then HashDocSet will be used instead of the bitset
240
 
       based HashBitset. -->
241
 
 
242
 
  <!-- requestHandler plugins... incoming queries will be dispatched to the
243
 
     correct handler based on the qt (query type) param matching the
244
 
     name of registered handlers.
245
 
      The "standard" request handler is the default and will be used if qt
246
 
     is not specified in the request.
247
 
  -->
248
 
  <requestHandler name="standard" class="solr.StandardRequestHandler">
249
 
        <bool name="httpCaching">true</bool>
250
 
  </requestHandler>
251
 
  <requestHandler name="dismaxOldStyleDefaults"
252
 
                  class="solr.DisMaxRequestHandler" >
253
 
     <!-- for historic reasons, DisMaxRequestHandler will use all of
254
 
          it's init params as "defaults" if there is no "defaults" list
255
 
          specified
256
 
     -->
257
 
     <str name="q.alt">*:*</str>
258
 
     <float name="tie">0.01</float>
259
 
     <str name="qf">
260
 
        text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0
261
 
     </str>
262
 
     <str name="pf">
263
 
        text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5
264
 
     </str>
265
 
     <str name="bf">
266
 
        ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3
267
 
     </str>
268
 
     <str name="mm">
269
 
        3&lt;-1 5&lt;-2 6&lt;90%
270
 
     </str>
271
 
     <int name="ps">100</int>
272
 
  </requestHandler>
273
 
  <requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
274
 
    <lst name="defaults">
275
 
     <str name="q.alt">*:*</str>
276
 
     <float name="tie">0.01</float>
277
 
     <str name="qf">
278
 
        text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0
279
 
     </str>
280
 
     <str name="pf">
281
 
        text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5
282
 
     </str>
283
 
     <str name="bf">
284
 
        ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3
285
 
     </str>
286
 
     <str name="mm">
287
 
        3&lt;-1 5&lt;-2 6&lt;90%
288
 
     </str>
289
 
     <int name="ps">100</int>
290
 
    </lst>
291
 
  </requestHandler>
292
 
  <requestHandler name="old" class="solr.tst.OldRequestHandler" >
293
 
    <int name="myparam">1000</int>
294
 
    <float name="ratio">1.4142135</float>
295
 
    <arr name="myarr"><int>1</int><int>2</int></arr>
296
 
    <str>foo</str>
297
 
  </requestHandler>
298
 
  <requestHandler name="oldagain" class="solr.tst.OldRequestHandler" >
299
 
    <lst name="lst1"> <str name="op">sqrt</str> <int name="val">2</int> </lst>
300
 
    <lst name="lst2"> <str name="op">log</str> <float name="val">10</float> </lst>
301
 
  </requestHandler>
302
 
 
303
 
  <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
304
 
 
305
 
  <requestHandler name="test" class="solr.tst.TestRequestHandler" />
306
 
 
307
 
  <!-- test query parameter defaults -->
308
 
  <requestHandler name="defaults" class="solr.StandardRequestHandler">
309
 
    <lst name="defaults">
310
 
      <int name="rows">4</int>
311
 
      <bool name="hl">true</bool>
312
 
      <str name="hl.fl">text,name,subject,title,whitetok</str>
313
 
    </lst>
314
 
  </requestHandler>
315
 
 
316
 
  <!-- test query parameter defaults -->
317
 
  <requestHandler name="lazy" class="solr.StandardRequestHandler" startup="lazy">
318
 
    <lst name="defaults">
319
 
      <int name="rows">4</int>
320
 
      <bool name="hl">true</bool>
321
 
      <str name="hl.fl">text,name,subject,title,whitetok</str>
322
 
    </lst>
323
 
  </requestHandler>
324
 
 
325
 
  <requestHandler name="/update"     class="solr.XmlUpdateRequestHandler"          />
326
 
  <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy">
327
 
        <bool name="httpCaching">false</bool>
328
 
  </requestHandler>
329
 
 
330
 
  <searchComponent name="spellcheck" class="org.apache.solr.handler.component.SpellCheckComponent">
331
 
    <str name="queryAnalyzerFieldType">lowerfilt</str>
332
 
 
333
 
    <lst name="spellchecker">
334
 
      <str name="name">default</str>
335
 
      <str name="field">lowerfilt</str>
336
 
      <str name="spellcheckIndexDir">spellchecker1</str>
337
 
      <str name="buildOnCommit">true</str>
338
 
    </lst>
339
 
    <!-- Example of using different distance measure -->
340
 
    <lst name="spellchecker">
341
 
      <str name="name">jarowinkler</str>
342
 
      <str name="field">lowerfilt</str>
343
 
      <!-- Use a different Distance Measure -->
344
 
      <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
345
 
      <str name="spellcheckIndexDir">spellchecker2</str>
346
 
 
347
 
    </lst>
348
 
    <lst name="spellchecker">
349
 
      <str name="classname">solr.FileBasedSpellChecker</str>
350
 
      <str name="name">external</str>
351
 
      <str name="sourceLocation">spellings.txt</str>
352
 
      <str name="characterEncoding">UTF-8</str>
353
 
      <str name="spellcheckIndexDir">spellchecker3</str>
354
 
    </lst>
355
 
  </searchComponent>
356
 
 
357
 
  <searchComponent name="termsComp" class="org.apache.solr.handler.component.TermsComponent"/>
358
 
 
359
 
  <requestHandler name="/terms" class="org.apache.solr.handler.component.SearchHandler">
360
 
    <arr name="components">
361
 
      <str>termsComp</str>
362
 
    </arr>
363
 
  </requestHandler>
364
 
  <!--
365
 
  The SpellingQueryConverter to convert raw (CommonParams.Q) queries into tokens.  Uses a simple regular expression
366
 
   to strip off field markup, boosts, ranges, etc. but it is not guaranteed to match an exact parse from the query parser.
367
 
   -->
368
 
  <queryConverter name="queryConverter" class="org.apache.solr.spelling.SpellingQueryConverter"/>
369
 
 
370
 
  <requestHandler name="spellCheckCompRH" class="org.apache.solr.handler.component.SearchHandler">
371
 
    <lst name="defaults">
372
 
      <!-- omp = Only More Popular -->
373
 
      <str name="spellcheck.onlyMorePopular">false</str>
374
 
      <!-- exr = Extended Results -->
375
 
      <str name="spellcheck.extendedResults">false</str>
376
 
      <!--  The number of suggestions to return -->
377
 
      <str name="spellcheck.count">1</str>
378
 
    </lst>
379
 
    <arr name="last-components">
380
 
      <str>spellcheck</str>
381
 
    </arr>
382
 
  </requestHandler>
383
 
 
384
 
  
385
 
  <searchComponent name="tvComponent" class="org.apache.solr.handler.component.TermVectorComponent"/>
386
 
 
387
 
  <requestHandler name="tvrh" class="org.apache.solr.handler.component.SearchHandler">
388
 
    <lst name="defaults">
389
 
 
390
 
    </lst>
391
 
    <arr name="last-components">
392
 
      <str>tvComponent</str>
393
 
    </arr>
394
 
  </requestHandler>
395
 
 
396
 
  <searchComponent class="solr.HighlightComponent" name="highlight">
397
 
  <highlighting>
398
 
   <!-- Configure the standard fragmenter -->
399
 
   <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
400
 
    <lst name="defaults">
401
 
     <int name="hl.fragsize">100</int>
402
 
    </lst>
403
 
   </fragmenter>
404
 
 
405
 
   <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
406
 
    <lst name="defaults">
407
 
     <int name="hl.fragsize">70</int>
408
 
    </lst>
409
 
   </fragmenter>
410
 
 
411
 
   <!-- Configure the standard formatter -->
412
 
   <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
413
 
    <lst name="defaults">
414
 
     <str name="hl.simple.pre"><![CDATA[<em>]]></str>
415
 
     <str name="hl.simple.post"><![CDATA[</em>]]></str>
416
 
    </lst>
417
 
   </formatter>
418
 
  </highlighting>
419
 
  </searchComponent>
420
 
 
421
 
 
422
 
  <!-- enable streaming for testing... -->
423
 
  <requestDispatcher handleSelect="true" >
424
 
    <requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" />
425
 
    <httpCaching lastModifiedFrom="openTime" etagSeed="Solr" never304="false">
426
 
      <cacheControl>max-age=30, public</cacheControl>
427
 
    </httpCaching>
428
 
  </requestDispatcher>
429
 
 
430
 
  <admin>
431
 
    <defaultQuery>solr</defaultQuery>
432
 
    <gettableFiles>solrconfig.xml scheam.xml admin-extra.html</gettableFiles>
433
 
  </admin>
434
 
 
435
 
  <!-- test getting system property -->
436
 
  <propTest attr1="${solr.test.sys.prop1}-$${literal}"
437
 
            attr2="${non.existent.sys.prop:default-from-config}">prefix-${solr.test.sys.prop2}-suffix</propTest>
438
 
 
439
 
  <queryParser name="foo" class="FooQParserPlugin"/>
440
 
 
441
 
  <updateRequestProcessorChain name="dedupe">
442
 
    <processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
443
 
      <bool name="enabled">false</bool>
444
 
      <bool name="overwriteDupes">true</bool>
445
 
      <str name="fields">v_t,t_field</str>
446
 
      <str name="signatureClass">org.apache.solr.update.processor.TextProfileSignature</str>
447
 
    </processor>
448
 
    <processor class="solr.RunUpdateProcessorFactory" />
449
 
  </updateRequestProcessorChain>
450
 
 
451
 
</config>