/
solrconfig.xml
executable file
·628 lines (582 loc) · 22 KB
/
solrconfig.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
For more details about configurations options that may appear in this
file, see http://wiki.apache.org/solr/SolrConfigXml.
Specifically, the Solr Config can support XInclude, which may make it easier to manage
the configuration. See https://issues.apache.org/jira/browse/SOLR-1167
-->
<config>
<!--
Controls what version of Lucene various components of Solr adhere to. Generally, you want
to use the latest version to get all bug fixes and improvements. It is highly recommended
that you fully re-index after changing this setting as it can affect both how text is indexed
and queried.
-->
<luceneMatchVersion>LUCENE_40</luceneMatchVersion>
<!-- lib directives can be used to instruct Solr to load an Jars identified
and use them to resolve any "plugins" specified in your solrconfig.xml or
schema.xml (ie: Analyzers, Request Handlers, etc...).
All directories and paths are resolved relative to the instanceDir.
If a "./lib" directory exists in your instanceDir, all files found in it
are included as if you had used the following syntax...
<lib dir="./lib" />
-->
<!-- A dir option by itself adds any files found in the directory to the
classpath, this is useful for including all jars in a directory.
-->
<!--<lib dir="../../contrib/extraction/lib" /> -->
<!-- When a regex is specified in addition to a directory, only the files in that
directory which completely match the regex (anchored on both ends)
will be included.
-->
<!--<lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar" />
<lib dir="../../dist/" regex="apache-solr-clustering-\d.*\.jar" /> -->
<!-- If a dir option (with or without a regex) is used and nothing is found
that matches, it will be ignored
-->
<!-- <lib dir="../../contrib/clustering/lib/" />
<lib dir="/total/crap/dir/ignored" /> -->
<!-- an exact path can be used to specify a specific file. This will cause
a serious error to be logged if it can't be loaded.
<lib path="../a-jar-that-does-not-exist.jar" />
-->
<dataDir>${solr.data.dir:}</dataDir>
<!-- The DirectoryFactory to use for indexes.
solr.StandardDirectoryFactory, the default, is filesystem based.
solr.RAMDirectoryFactory is memory based, not persistent, and doesn't work with replication. -->
<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
<indexDefaults>
<useCompoundFile>false</useCompoundFile>
<mergeFactor>10</mergeFactor>
<ramBufferSizeMB>32</ramBufferSizeMB>
<maxFieldLength>10000</maxFieldLength>
<writeLockTimeout>1000</writeLockTimeout>
<commitLockTimeout>10000</commitLockTimeout>
<lockType>native</lockType>
</indexDefaults>
<mainIndex>
<useCompoundFile>false</useCompoundFile>
<ramBufferSizeMB>32</ramBufferSizeMB>
<mergeFactor>10</mergeFactor>
<unlockOnStartup>false</unlockOnStartup>
<reopenReaders>true</reopenReaders>
<deletionPolicy class="solr.SolrDeletionPolicy">
<str name="maxCommitsToKeep">1</str>
<str name="maxOptimizedCommitsToKeep">1</str>
</deletionPolicy>
<!-- To aid in advanced debugging, you may turn on IndexWriter debug logging.
Setting to true will set the file that the underlying Lucene IndexWriter
will write its debug infostream to. -->
<infoStream file="INFOSTREAM.txt">false</infoStream>
</mainIndex>
<updateHandler class="solr.DirectUpdateHandler2" />
<query>
<maxBooleanClauses>1024</maxBooleanClauses>
<filterCache class="solr.FastLRUCache" size="512" initialSize="512" autowarmCount="128"/>
<queryResultCache class="solr.LRUCache" size="512" initialSize="512" autowarmCount="32"/>
<documentCache class="solr.LRUCache" size="512" initialSize="512" autowarmCount="0"/>
<enableLazyFieldLoading>true</enableLazyFieldLoading>
<queryResultWindowSize>50</queryResultWindowSize>
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
<!-- a newSearcher event is fired whenever a new searcher is being prepared
and there is a current searcher handling requests (aka registered).
It can be used to prime certain caches to prevent long request times for
certain requests.
-->
<!-- QuerySenderListener takes an array of NamedList and executes a
local query request for each NamedList in sequence. -->
<listener event="newSearcher" class="solr.QuerySenderListener">
<arr name="queries">
<lst>
<str name="rows">0</str>
<str name="fl">score</str>
<str name="facet">true</str>
<str name="facet.mincount">1</str>
<str name="facet.limit">10</str>
<str name="facet.field">format</str>
<str name="facet.field">lc_1letter_facet</str>
<str name="f.lc_1letter_facet.facet.sort">false</str>
<str name="facet.field">lc_alpha_facet</str>
<str name="facet.field">lc_b4cutter_facet</str>
<str name="facet.field">language_facet</str>
<str name="facet.field">pub_date</str>
<str name="facet.field">subject_era_facet</str>
<str name="facet.field">subject_geo_facet</str>
<str name="facet.field">subject_topic_facet</str>
</lst>
<!-- query for single document to populate filter cache -->
<lst>
<str name="q">id:00282214</str>
<str name="qt">standard</str>
<str name="rows">0</str>
<str name="fl">score</str>
<str name="facet">true</str>
<str name="facet.mincount">1</str>
<str name="facet.limit">10</str>
<str name="facet.field">format</str>
<str name="facet.field">lc_1letter_facet</str>
<str name="f.lc_1letter_facet.facet.sort">false</str>
<str name="facet.field">lc_alpha_facet</str>
<str name="facet.field">lc_b4cutter_facet</str>
<str name="facet.field">language_facet</str>
<str name="facet.field">pub_date</str>
<str name="facet.field">subject_era_facet</str>
<str name="facet.field">subject_geo_facet</str>
<str name="facet.field">subject_topic_facet</str>
</lst>
</arr>
</listener>
<!-- a firstSearcher event is fired whenever a new searcher is being
prepared but there is no current registered searcher to handle
requests or to gain autowarming data from. -->
<listener event="firstSearcher" class="solr.QuerySenderListener">
<arr name="queries">
<lst>
<str name="rows">0</str>
<str name="fl">score</str>
<str name="facet">true</str>
<str name="facet.mincount">1</str>
<str name="facet.limit">10</str>
<str name="facet.field">format</str>
<str name="facet.field">lc_1letter_facet</str>
<str name="f.lc_1letter_facet.facet.sort">false</str>
<str name="facet.field">lc_alpha_facet</str>
<str name="facet.field">lc_b4cutter_facet</str>
<str name="facet.field">language_facet</str>
<str name="facet.field">pub_date</str>
<str name="facet.field">subject_era_facet</str>
<str name="facet.field">subject_geo_facet</str>
<str name="facet.field">subject_topic_facet</str>
</lst>
<!-- query for single document to populate filter cache -->
<lst>
<str name="q">id:00282214</str>
<str name="qt">standard</str>
<str name="rows">0</str>
<str name="fl">score</str>
<str name="facet">true</str>
<str name="facet.mincount">1</str>
<str name="facet.limit">10</str>
<str name="facet.field">format</str>
<str name="facet.field">lc_1letter_facet</str>
<str name="f.lc_1letter_facet.facet.sort">false</str>
<str name="facet.field">lc_alpha_facet</str>
<str name="facet.field">lc_b4cutter_facet</str>
<str name="facet.field">language_facet</str>
<str name="facet.field">pub_date</str>
<str name="facet.field">subject_era_facet</str>
<str name="facet.field">subject_geo_facet</str>
<str name="facet.field">subject_topic_facet</str>
</lst>
</arr>
</listener>
<useColdSearcher>false</useColdSearcher>
<maxWarmingSearchers>2</maxWarmingSearchers>
</query>
<requestDispatcher handleSelect="true" >
<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048000" />
<httpCaching lastModifiedFrom="openTime" etagSeed="Solr" />
</requestDispatcher>
<requestHandler name="standard" class="solr.SearchHandler" >
<!-- default values for query parameters -->
<lst name="defaults">
<str name="echoParams">explicit</str>
<!--
<int name="rows">10</int>
<str name="fl">*</str>
<str name="version">2.1</str>
-->
</lst>
</requestHandler>
<!-- Searching ("All Fields") -->
<requestHandler name="search" class="solr.SearchHandler" default="true" >
<lst name="defaults">
<str name="defType">dismax</str>
<str name="echoParams">explicit</str>
<str name="q.alt">*:*</str>
<str name="mm">2<-1 5<-2 6<90%</str>
<str name="qf">
title_unstem_search^100000
subtitle_unstem_search^50000
title_t^25000
subtitle_t^10000
title_addl_unstem_search^5000
title_addl_t^2500
title_added_entry_unstem_search^1500
title_added_entry_t^1250
subject_topic_unstem_search^1000
subject_unstem_search^750
subject_topic_facet^625
subject_t^500
author_unstem_search^250
author_addl_unstem_search^250
author_t^100
author_addl_t^50
subject_addl_unstem_search^250
subject_addl_t^50
title_series_unstem_search^25
title_series_t^10
isbn_t
text
</str>
<str name="pf">
title_unstem_search^1000000
subtitle_unstem_search^500000
title_t^250000
subtitle_t^100000
title_addl_unstem_search^50000
title_addl_t^25000
title_added_entry_unstem_search^15000
title_added_entry_t^12500
subject_topic_unstem_search^10000
subject_unstem_search^7500
subject_topic_facet^6250
subject_t^5000
author_unstem_search^2500
author_addl_unstem_search^2500
author_t^1000
author_addl_t^500
subject_addl_unstem_search^2500
subject_addl_t^500
title_series_unstem_search^250
title_series_t^100
text^10
</str>
<str name="author_qf">
author_unstem_search^200
author_addl_unstem_search^50
author_t^20
author_addl_t
</str>
<str name="author_pf">
author_unstem_search^2000
author_addl_unstem_search^500
author_t^200
author_addl_t^10
</str>
<str name="title_qf">
title_unstem_search^50000
subtitle_unstem_search^25000
title_addl_unstem_search^10000
title_t^5000
subtitle_t^2500
title_addl_t^100
title_added_entry_unstem_search^50
title_added_entry_t^10
title_series_unstem_search^5
title_series_t
</str>
<str name="title_pf">
title_unstem_search^500000
subtitle_unstem_search^250000
title_addl_unstem_search^100000
title_t^50000
subtitle_t^25000
title_addl_t^1000
title_added_entry_unstem_search^500
title_added_entry_t^100
title_series_t^50
title_series_unstem_search^10
</str>
<str name="subject_qf">
subject_topic_unstem_search^200
subject_unstem_search^125
subject_topic_facet^100
subject_t^50
subject_addl_unstem_search^10
subject_addl_t
</str>
<str name="subject_pf">
subject_topic_unstem_search^2000
subject_unstem_search^1250
subject_t^1000
subject_topic_facet^500
subject_addl_unstem_search^100
subject_addl_t^10
</str>
<int name="ps">3</int>
<float name="tie">0.01</float>
<str name="fl">
id,
score,
author_display,
author_vern_display,
format,
isbn_t,
language_facet,
lc_callnum_display,
material_type_display,
published_display,
published_vern_display,
pub_date,
title_display,
title_vern_display,
subject_topic_facet,
subject_geo_facet,
subject_era_facet,
subtitle_display,
subtitle_vern_display,
url_fulltext_display,
url_suppl_display,
identifier_display,
description_display,
date_display,
pdf_display,
msword_display,
mspowerpoint_display,
mp3_display,
web_display,
shockwave_display
</str>
<str name="facet">true</str>
<str name="facet.mincount">1</str>
<str name="facet.limit">10</str>
<str name="facet.field">format</str>
<str name="facet.field">lc_1letter_facet</str>
<str name="facet.field">lc_alpha_facet</str>
<str name="facet.field">lc_b4cutter_facet</str>
<str name="facet.field">language_facet</str>
<str name="facet.field">pub_date</str>
<str name="facet.field">subject_era_facet</str>
<str name="facet.field">subject_geo_facet</str>
<str name="facet.field">subject_topic_facet</str>
<str name="spellcheck">true</str>
<str name="spellcheck.dictionary">default</str>
<str name="spellcheck.onlyMorePopular">true</str>
<str name="spellcheck.extendedResults">true</str>
<str name="spellcheck.collate">false</str>
<str name="spellcheck.count">5</str>
</lst>
<arr name="last-components">
<str>spellcheck</str>
</arr>
</requestHandler>
<!-- for requests to get a single document; use id=666 instead of q=id:666 -->
<requestHandler name="document" class="solr.SearchHandler" >
<lst name="defaults">
<str name="echoParams">all</str>
<str name="fl">*</str>
<str name="rows">1</str>
<str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
</lst>
</requestHandler>
<!-- For Advanced Search -->
<requestHandler name="advanced" class="solr.SearchHandler" >
<lst name="defaults">
<str name="defType">lucene</str>
<str name="echoParams">explicit</str>
<str name="sort">score desc, pub_date_sort desc, title_sort asc</str>
<str name="df">text</str>
<str name="q.op">AND</str>
<str name="qs">1</str>
<!-- used for dismax query parser -->
<str name="mm">1</str>
<str name="ps">3</str>
<float name="tie">0.01</float>
<!-- for user query terms in author text box -->
<str name="qf_author">
author_unstem_search^200
author_addl_unstem_search^50
author_t^20
author_addl_t
</str>
<str name="pf_author">
author_unstem_search^2000
author_addl_unstem_search^500
author_t^200
author_addl_t^10
</str>
<!-- for user query terms in title text box -->
<str name="qf_title">
title_unstem_search^50000
subtitle_unstem_search^25000
title_addl_unstem_search^10000
title_t^5000
subtitle_t^2500
title_addl_t^100
title_added_entry_unstem_search^50
title_added_entry_t^10
title_series_unstem_search^5
title_series_t
</str>
<str name="pf_title">
title_unstem_search^500000
subtitle_unstem_search^250000
title_addl_unstem_search^100000
title_t^50000
subtitle_t^25000
title_addl_t^1000
title_added_entry_unstem_search^500
title_added_entry_t^100
title_series_t^50
title_series_unstem_search^10
</str>
<!-- for user query terms in subject text box -->
<str name="qf_subject">
subject_topic_unstem_search^200
subject_unstem_search^125
subject_topic_facet^100
subject_t^50
subject_addl_unstem_search^10
subject_addl_t
</str>
<str name="pf_subject">
subject_topic_unstem_search^2000
subject_unstem_search^1250
subject_t^1000
subject_topic_facet^500
subject_addl_unstem_search^100
subject_addl_t^10
</str>
<!-- for user query terms in number text box -->
<str name="qf_number">isbn_t</str>
<!-- for user query terms in keyword text box -->
<str name="qf_keyword">text</str>
<str name="pf_keyword">text^10</str>
<str name="fl">
id,
score,
author_display,
author_vern_display,
format,
isbn_t,
language_facet,
lc_callnum_display,
material_type_display,
published_display,
published_vern_display,
pub_date,
title_display,
title_vern_display,
subject_topic_facet,
subject_geo_facet,
subject_era_facet,
subtitle_display,
subtitle_vern_display,
url_fulltext_display,
url_suppl_display,
identifier_display,
description_display,
date_display,
pdf_display,
msword_display,
mspowerpoint_display,
mp3_display,
web_display,
shockwave_display
</str>
<str name="facet">true</str>
<str name="facet.mincount">1</str>
<str name="facet.limit">10</str>
<str name="facet.field">format</str>
<str name="facet.field">lc_1letter_facet</str>
<str name="facet.field">lc_alpha_facet</str>
<str name="facet.field">lc_b4cutter_facet</str>
<str name="facet.field">language_facet</str>
<str name="facet.field">pub_date</str>
<str name="facet.field">subject_era_facet</str>
<str name="facet.field">subject_geo_facet</str>
<str name="facet.field">subject_topic_facet</str>
<str name="spellcheck">true</str>
<str name="spellcheck.dictionary">subject</str>
<str name="spellcheck.onlyMorePopular">true</str>
<str name="spellcheck.extendedResults">true</str>
<str name="spellcheck.collate">false</str>
<str name="spellcheck.count">5</str>
</lst>
<arr name="last-components">
<str>spellcheck</str>
</arr>
</requestHandler>
<!--
Search components are registered to SolrCore and used by Search Handlers
By default, the following components are avaliable:
<searchComponent name="query" class="org.apache.solr.handler.component.QueryComponent" />
<searchComponent name="facet" class="org.apache.solr.handler.component.FacetComponent" />
<searchComponent name="mlt" class="org.apache.solr.handler.component.MoreLikeThisComponent" />
<searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" />
<searchComponent name="stats" class="org.apache.solr.handler.component.StatsComponent" />
<searchComponent name="debug" class="org.apache.solr.handler.component.DebugComponent" />
Default configuration in a requestHandler would look like:
<arr name="components">
<str>query</str>
<str>facet</str>
<str>mlt</str>
<str>highlight</str>
<str>stats</str>
<str>debug</str>
</arr>
If you register a searchComponent to one of the standard names, that will be used instead.
To insert components before or after the 'standard' components, use:
<arr name="first-components">
<str>myFirstComponentName</str>
</arr>
<arr name="last-components">
<str>myLastComponentName</str>
</arr>
-->
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">textSpell</str>
<lst name="spellchecker">
<str name="name">default</str>
<str name="field">spell</str>
<str name="spellcheckIndexDir">./spell</str>
<str name="buildOnOptimize">true</str>
</lst>
<lst name="spellchecker">
<str name="name">author</str>
<str name="field">author_spell</str>
<str name="spellcheckIndexDir">./spell_author</str>
<str name="accuracy">0.7</str>
<str name="buildOnOptimize">true</str>
</lst>
<lst name="spellchecker">
<str name="name">subject</str>
<str name="field">subject_spell</str>
<str name="spellcheckIndexDir">./spell_subject</str>
<str name="accuracy">0.7</str>
<str name="buildOnOptimize">true</str>
</lst>
<lst name="spellchecker">
<str name="name">title</str>
<str name="field">title_spell</str>
<str name="spellcheckIndexDir">./spell_title</str>
<str name="accuracy">0.7</str>
<str name="buildOnOptimize">true</str>
</lst>
</searchComponent>
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
<requestHandler name="/update/javabin" class="solr.BinaryUpdateRequestHandler" />
<requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
<requestHandler name="/admin/ping" class="PingRequestHandler">
<lst name="defaults">
<str name="qt">search</str>
<str name="q">book</str>
<str name="echoParams">all</str>
</lst>
</requestHandler>
<admin>
<defaultQuery>book</defaultQuery>
</admin>
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="echoHandler">true</str>
</lst>
</requestHandler>
</config>