-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsolrconfig.xml
522 lines (475 loc) · 17.6 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
<?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.
-->
<!--
This is a stripped down config file used for a simple example...
It is *not* a good example to work from.
-->
<config>
<luceneMatchVersion>LUCENE_40</luceneMatchVersion>
<!-- 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}"/>
<lib dir="../lib/contrib/analysis-extras/lib" />
<lib dir="../lib/contrib/analysis-extras/lucene-libs" />
<dataDir>${solr.blacklight-core.data.dir:}</dataDir>
<requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
<requestDispatcher handleSelect="true" >
<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
</requestDispatcher>
<requestHandler name="standard" class="solr.StandardRequestHandler" />
<requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
<requestHandler name="/update" class="solr.UpdateRequestHandler" />
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
<lst name="invariants">
<str name="q">solrpingquery</str>
</lst>
<lst name="defaults">
<str name="echoParams">all</str>
</lst>
</requestHandler>
<!-- config for the admin interface -->
<admin>
<defaultQuery>solr</defaultQuery>
</admin>
<!-- SearchHandler
http://wiki.apache.org/solr/SearchHandler
For processing Search Queries, the primary Request Handler
provided with Solr is "SearchHandler" It delegates to a sequent
of SearchComponents (see below) and supports distributed
queries across multiple shards
-->
<requestHandler name="search" class="solr.SearchHandler" default="true">
<!-- default values for query parameters can be specified, these
will be overridden by parameters in the request
-->
<lst name="defaults">
<str name="defType">dismax</str>
<str name="echoParams">explicit</str>
<int name="rows">10</int>
<str name="q.alt">*:*</str>
<str name="mm">2<-1 5<-2 6<90%</str>
<!-- this qf and pf are used by default, if not otherwise specified by
client. The default blacklight_config will use these for the
"keywords" search. See the author_qf/author_pf, title_qf, etc
below, which the default blacklight_config will specify for
those searches. You may also be interested in:
http://wiki.apache.org/solr/LocalParams
-->
<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>
<!-- NOT using marc_display because it is large and will slow things down for search results -->
<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,
</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>
<!-- In addition to defaults, "appends" params can be specified
to identify values which should be appended to the list of
multi-val params from the query (or the existing "defaults").
-->
<!-- In this example, the param "fq=instock:true" would be appended to
any query time fq params the user may specify, as a mechanism for
partitioning the index, independent of any user selected filtering
that may also be desired (perhaps as a result of faceted searching).
NOTE: there is *absolutely* nothing a client can do to prevent these
"appends" values from being used, so don't use this mechanism
unless you are sure you always want it.
-->
<!--
<lst name="appends">
<str name="fq">inStock:true</str>
</lst>
-->
<!-- "invariants" are a way of letting the Solr maintainer lock down
the options available to Solr clients. Any params values
specified here are used regardless of what values may be specified
in either the query, the "defaults", or the "appends" params.
In this example, the facet.field and facet.query params would
be fixed, limiting the facets clients can use. Faceting is
not turned on by default - but if the client does specify
facet=true in the request, these are the only facets they
will be able to see counts for; regardless of what other
facet.field or facet.query params they may specify.
NOTE: there is *absolutely* nothing a client can do to prevent these
"invariants" values from being used, so don't use this mechanism
unless you are sure you always want it.
-->
<!--
<lst name="invariants">
<str name="facet.field">cat</str>
<str name="facet.field">manu_exact</str>
<str name="facet.query">price:[* TO 500]</str>
<str name="facet.query">price:[500 TO *]</str>
</lst>
-->
<!-- If the default list of SearchComponents is not desired, that
list can either be overridden completely, or components can be
prepended or appended to the default list. (see below)
-->
<!--
<arr name="components">
<str>nameOfCustomComponent1</str>
<str>nameOfCustomComponent2</str>
</arr>
-->
<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>
<!-- NOT using marc_display because it is large and will slow things down for search results -->
<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,
</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>
<!-- Spell Check
The spell check component can return a list of alternative spelling
suggestions.
http://wiki.apache.org/solr/SpellCheckComponent
-->
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">textSpell</str>
<!-- Multiple "Spell Checkers" can be declared and used by this
component
-->
<!-- a spellchecker built from a field of the main index, and
written to disk
-->
<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>
<!-- a spellchecker that uses a different distance measure -->
<!--
<lst name="spellchecker">
<str name="name">jarowinkler</str>
<str name="field">spell</str>
<str name="distanceMeasure">
org.apache.lucene.search.spell.JaroWinklerDistance
</str>
<str name="spellcheckIndexDir">spellcheckerJaro</str>
</lst>
-->
<!-- a spellchecker that use an alternate comparator
comparatorClass be one of:
1. score (default)
2. freq (Frequency first, then score)
3. A fully qualified class name
-->
<!--
<lst name="spellchecker">
<str name="name">freq</str>
<str name="field">lowerfilt</str>
<str name="spellcheckIndexDir">spellcheckerFreq</str>
<str name="comparatorClass">freq</str>
<str name="buildOnCommit">true</str>
-->
<!-- A spellchecker that reads the list of words from a file -->
<!--
<lst name="spellchecker">
<str name="classname">solr.FileBasedSpellChecker</str>
<str name="name">file</str>
<str name="sourceLocation">spellings.txt</str>
<str name="characterEncoding">UTF-8</str>
<str name="spellcheckIndexDir">spellcheckerFile</str>
</lst>
-->
</searchComponent>
</config>