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

« back to all changes in this revision

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