-
Notifications
You must be signed in to change notification settings - Fork 26
/
solrconfig.xml
328 lines (289 loc) · 10.7 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
<?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>
<!-- 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>8.2.0</luceneMatchVersion>
<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
<lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
<directoryFactory name="DirectoryFactory"
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}">
</directoryFactory>
<codecFactory class="solr.SchemaCodecFactory"/>
<schemaFactory class="ClassicIndexSchemaFactory"/>
<dataDir>${solr.blacklight-core.data.dir:}</dataDir>
<requestDispatcher handleSelect="true" >
<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
</requestDispatcher>
<requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
<!-- config for the admin interface -->
<admin>
<defaultQuery>*:*</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">edismax</str>
<str name="echoParams">explicit</str>
<int name="rows">10</int>
<str name="q.alt">*:*</str>
<!-- Minimum Should Match parameter (mm) -->
<str name="mm">4<90%</str>
<!-- 1-4 term query, all must match
5+ term query, 90% must match; rounded down, so e.g.:
* 5-10 term query, all but one must match
* 11-20 term query, all but two must match
* 21-29 term query, all but three must match, etc.
-->
<!-- 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
-->
<!-- In general, matches using the pf parameter should be boosted higher
than qf, so the proximity of multiple search terms in the matching
documents is significant in relevance scoring. See:
https://solr.apache.org/guide/solr/latest/query-guide/dismax-query-parser.html#pf-phrase-fields-parameter
-->
<str name="qf">
collection_title_tesim^150
title_tesim^100
normalized_title_teim^100
unitid_identifier_match^40
name_teim^10
place_teim^10
subject_teim^2
id
ead_ssi
ref_ssm
unitid_ssm
container_teim
parent_unittitles_tesim
text
</str>
<str name="pf">
collection_title_tesim^300
title_tesim^200
normalized_title_teim^200
unitid_identifier_match^80
name_teim^20
place_teim^20
subject_teim^5
id^2
ead_ssi^2
ref_ssm^2
unitid_ssm^2
container_teim^2
parent_unittitles_tesim^2
text^2
</str>
<str name="qf_container">
container_teim
</str>
<str name="pf_container">
container_teim^2
</str>
<str name="qf_identifier">
id
ead_ssi
ref_ssm
unitid_ssm
unitid_identifier_match
</str>
<str name="pf_identifier">
id^2
ead_ssi^2
ref_ssm^2
unitid_ssm^2
unitid_identifier_match^2
</str>
<str name="qf_name">
name_teim
</str>
<str name="pf_name">
name_teim^2
</str>
<str name="qf_place">
place_teim
</str>
<str name="pf_place">
place_teim^2
</str>
<str name="qf_subject">
subject_teim
</str>
<str name="pf_subject">
subject_teim^2
</str>
<str name="qf_title">
title_tesim
normalized_title_teim
</str>
<str name="pf_title">
title_tesim^2
normalized_title_teim^2
</str>
<int name="ps">3</int>
<float name="tie">0.01</float>
<str name="fl">*</str>
<str name="facet">true</str>
<str name="facet.mincount">1</str>
<str name="facet.field">level_ssim</str>
<str name="facet.field">creator_ssim</str>
<str name="facet.field">date_range_isim</str>
<str name="facet.field">names_ssim</str>
<str name="facet.field">geogname_ssim</str>
<str name="facet.field">access_subjects_ssim</str>
<str name="facet.field">repository_ssim</str>
<str name="facet.field">collection_ssim</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">{!term f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
</lst>
</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>
<searchComponent name="suggest" class="solr.SuggestComponent">
<lst name="suggester">
<str name="name">mySuggester</str>
<str name="lookupImpl">AnalyzingInfixLookupFactory</str>
<str name="indexPath">suggester_infix_dir</str>
<str name="highlight">false</str>
<str name="suggestAnalyzerFieldType">text</str>
<str name="buildOnCommit">true</str>
<str name="field">suggest</str>
</lst>
</searchComponent>
<requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
<lst name="defaults">
<str name="suggest">true</str>
<str name="suggest.count">5</str>
<str name="suggest.dictionary">mySuggester</str>
</lst>
<arr name="components">
<str>suggest</str>
</arr>
</requestHandler>
</config>