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

« back to all changes in this revision

Viewing changes to solr/core/src/test-files/solr/conf/solrconfig-propinject-indexdefault.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-propinject-indexdefault.xml 1197159 2011-11-03 14:40:25Z mvg $
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 class="org.apache.lucene.index.LogByteSizeMergePolicy">
85
 
      <double name="maxMergeMB">32.0</double>
86
 
    </mergePolicy>
87
 
 
88
 
    <!--
89
 
     Expert:
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.
92
 
     -->
93
 
    <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler">
94
 
      <int name="maxMergeCount">4</int>
95
 
      <int name="maxThreadCount">4</int>
96
 
    </mergeScheduler>
97
 
    <!-- these are global... can't currently override per index -->
98
 
    <writeLockTimeout>1000</writeLockTimeout>
99
 
 
100
 
    <lockType>single</lockType>
101
 
  </indexDefaults>
102
 
 
103
 
  <mainIndex>
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.
109
 
    -->
110
 
    <maxBufferedDocs>10</maxBufferedDocs>
111
 
    <maxMergeDocs>2147483647</maxMergeDocs>
112
 
    <maxFieldLength>10000</maxFieldLength>
113
 
 
114
 
    <!--<mergePolicy class="org.apache.lucene.index.LogByteSizeMergePolicy">-->
115
 
      <!--<double name="maxMergeMB">64.0</double>-->
116
 
    <!--</mergePolicy>-->
117
 
    <!---->
118
 
    <!--<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler">-->
119
 
      <!--<int name="maxThreadCount">2</int>-->
120
 
    <!--</mergeScheduler>-->
121
 
    <unlockOnStartup>true</unlockOnStartup>
122
 
  </mainIndex>
123
 
 
124
 
  <updateHandler class="solr.DirectUpdateHandler2">
125
 
 
126
 
    <!-- autocommit pending docs if certain criteria are met
127
 
    <autoCommit>
128
 
      <maxDocs>10000</maxDocs>
129
 
      <maxTime>3600000</maxTime>
130
 
    </autoCommit>
131
 
    -->
132
 
    <!-- represents a lower bound on the frequency that commits may
133
 
    occur (in seconds). NOTE: not yet implemented
134
 
 
135
 
    <commitIntervalLowerBound>0</commitIntervalLowerBound>
136
 
    -->
137
 
 
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
144
 
      -->
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>
152
 
    </listener>
153
 
    -->
154
 
 
155
 
 
156
 
  </updateHandler>
157
 
 
158
 
 
159
 
  <query>
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.
163
 
    -->
164
 
    <maxBooleanClauses>1024</maxBooleanClauses>
165
 
 
166
 
 
167
 
    <!-- Cache specification for Filters or DocSets - unordered set of *all* documents
168
 
         that match a particular query.
169
 
      -->
170
 
    <filterCache
171
 
      class="solr.search.FastLRUCache"
172
 
      size="512"
173
 
      initialSize="512"
174
 
      autowarmCount="256"/>
175
 
 
176
 
    <queryResultCache
177
 
      class="solr.search.LRUCache"
178
 
      size="512"
179
 
      initialSize="512"
180
 
      autowarmCount="1024"/>
181
 
 
182
 
    <documentCache
183
 
      class="solr.search.LRUCache"
184
 
      size="512"
185
 
      initialSize="512"
186
 
      autowarmCount="0"/>
187
 
 
188
 
    <!-- If true, stored fields that are not requested will be loaded lazily.
189
 
    -->
190
 
    <enableLazyFieldLoading>true</enableLazyFieldLoading>
191
 
 
192
 
    <!--
193
 
 
194
 
    <cache name="myUserCache"
195
 
      class="solr.search.LRUCache"
196
 
      size="4096"
197
 
      initialSize="1024"
198
 
      autowarmCount="1024"
199
 
      regenerator="MyRegenerator"
200
 
      />
201
 
    -->
202
 
 
203
 
 
204
 
    <!--
205
 
    <useFilterForSortedQuery>true</useFilterForSortedQuery>
206
 
    -->
207
 
 
208
 
    <queryResultWindowSize>10</queryResultWindowSize>
209
 
 
210
 
    <!-- set maxSize artificially low to exercise both types of sets -->
211
 
    <HashDocSet maxSize="3" loadFactor="0.75"/>
212
 
 
213
 
 
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)
217
 
    -->
218
 
    <boolTofilterOptimizer enabled="false" cacheSize="32" threshold=".05"/>
219
 
 
220
 
 
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. -->
225
 
    <!--
226
 
    <listener event="newSearcher" class="solr.QuerySenderListener">
227
 
      <arr name="queries">
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>
230
 
      </arr>
231
 
    </listener>
232
 
    -->
233
 
 
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. -->
237
 
    <!--
238
 
    <listener event="firstSearcher" class="solr.QuerySenderListener">
239
 
      <arr name="queries">
240
 
        <lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
241
 
      </arr>
242
 
    </listener>
243
 
    -->
244
 
 
245
 
 
246
 
  </query>
247
 
 
248
 
 
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. -->
252
 
 
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.
258
 
  -->
259
 
  <requestHandler name="standard" class="solr.StandardRequestHandler">
260
 
        <bool name="httpCaching">true</bool>
261
 
  </requestHandler>
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
266
 
          specified
267
 
     -->
268
 
     <str name="q.alt">*:*</str>
269
 
     <float name="tie">0.01</float>
270
 
     <str name="qf">
271
 
        text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0
272
 
     </str>
273
 
     <str name="pf">
274
 
        text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5
275
 
     </str>
276
 
     <str name="bf">
277
 
        ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3
278
 
     </str>
279
 
     <str name="mm">
280
 
        3&lt;-1 5&lt;-2 6&lt;90%
281
 
     </str>
282
 
     <int name="ps">100</int>
283
 
  </requestHandler>
284
 
  <requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
285
 
    <lst name="defaults">
286
 
     <str name="q.alt">*:*</str>
287
 
     <float name="tie">0.01</float>
288
 
     <str name="qf">
289
 
        text^0.5 features_t^1.0 subject^1.4 title_stemmed^2.0
290
 
     </str>
291
 
     <str name="pf">
292
 
        text^0.2 features_t^1.1 subject^1.4 title_stemmed^2.0 title^1.5
293
 
     </str>
294
 
     <str name="bf">
295
 
        ord(weight)^0.5 recip(rord(iind),1,1000,1000)^0.3
296
 
     </str>
297
 
     <str name="mm">
298
 
        3&lt;-1 5&lt;-2 6&lt;90%
299
 
     </str>
300
 
     <int name="ps">100</int>
301
 
    </lst>
302
 
  </requestHandler>
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>
307
 
    <str>foo</str>
308
 
  </requestHandler>
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>
312
 
  </requestHandler>
313
 
 
314
 
  <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
315
 
 
316
 
  <requestHandler name="test" class="solr.tst.TestRequestHandler" />
317
 
 
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>
324
 
    </lst>
325
 
  </requestHandler>
326
 
 
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>
333
 
    </lst>
334
 
  </requestHandler>
335
 
 
336
 
  <requestHandler name="/update"     class="solr.XmlUpdateRequestHandler"          />
337
 
  <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy">
338
 
        <bool name="httpCaching">false</bool>
339
 
  </requestHandler>
340
 
 
341
 
  <searchComponent name="spellcheck" class="org.apache.solr.handler.component.SpellCheckComponent">
342
 
    <str name="queryAnalyzerFieldType">lowerfilt</str>
343
 
 
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>
349
 
    </lst>
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>
357
 
 
358
 
    </lst>
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>
365
 
    </lst>
366
 
  </searchComponent>
367
 
 
368
 
  <searchComponent name="termsComp" class="org.apache.solr.handler.component.TermsComponent"/>
369
 
 
370
 
  <requestHandler name="/terms" class="org.apache.solr.handler.component.SearchHandler">
371
 
    <arr name="components">
372
 
      <str>termsComp</str>
373
 
    </arr>
374
 
  </requestHandler>
375
 
  <!--
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.
378
 
   -->
379
 
  <queryConverter name="queryConverter" class="org.apache.solr.spelling.SpellingQueryConverter"/>
380
 
 
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>
389
 
    </lst>
390
 
    <arr name="last-components">
391
 
      <str>spellcheck</str>
392
 
    </arr>
393
 
  </requestHandler>
394
 
 
395
 
 
396
 
  <searchComponent name="tvComponent" class="org.apache.solr.handler.component.TermVectorComponent"/>
397
 
 
398
 
  <requestHandler name="tvrh" class="org.apache.solr.handler.component.SearchHandler">
399
 
    <lst name="defaults">
400
 
 
401
 
    </lst>
402
 
    <arr name="last-components">
403
 
      <str>tvComponent</str>
404
 
    </arr>
405
 
  </requestHandler>
406
 
 
407
 
  <searchComponent class="solr.HighlightComponent" name="highlight">
408
 
  <highlighting>
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>
413
 
    </lst>
414
 
   </fragmenter>
415
 
 
416
 
   <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
417
 
    <lst name="defaults">
418
 
     <int name="hl.fragsize">70</int>
419
 
    </lst>
420
 
   </fragmenter>
421
 
 
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>
427
 
    </lst>
428
 
   </formatter>
429
 
  </highlighting>
430
 
  </searchComponent>
431
 
 
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>
437
 
    </httpCaching>
438
 
  </requestDispatcher>
439
 
 
440
 
  <admin>
441
 
    <defaultQuery>solr</defaultQuery>
442
 
    <gettableFiles>solrconfig.xml scheam.xml admin-extra.html</gettableFiles>
443
 
  </admin>
444
 
 
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>
448
 
 
449
 
  <queryParser name="foo" class="FooQParserPlugin"/>
450
 
 
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>
457
 
    </processor>
458
 
    <processor class="solr.RunUpdateProcessorFactory" />
459
 
  </updateRequestProcessorChain>
460
 
 
461
 
</config>