simple_solr_client 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +349 -0
- data/Rakefile +11 -0
- data/lib/simple_solr.rb +42 -0
- data/lib/simple_solr/client.rb +139 -0
- data/lib/simple_solr/client/core_admin.rb +0 -0
- data/lib/simple_solr/core.rb +50 -0
- data/lib/simple_solr/core/admin.rb +47 -0
- data/lib/simple_solr/core/core_data.rb +51 -0
- data/lib/simple_solr/core/index.rb +25 -0
- data/lib/simple_solr/core/search.rb +21 -0
- data/lib/simple_solr/response/document.rb +45 -0
- data/lib/simple_solr/response/generic_response.rb +19 -0
- data/lib/simple_solr/response/query_response.rb +54 -0
- data/lib/simple_solr/schema.rb +261 -0
- data/lib/simple_solr/schema/analysis.rb +58 -0
- data/lib/simple_solr/schema/copyfield.rb +42 -0
- data/lib/simple_solr/schema/dynamic_field.rb +23 -0
- data/lib/simple_solr/schema/field.rb +35 -0
- data/lib/simple_solr/schema/field_or_type.rb +112 -0
- data/lib/simple_solr/schema/field_type.rb +62 -0
- data/lib/simple_solr/schema/matcher.rb +16 -0
- data/lib/simple_solr/version.rb +3 -0
- data/simple_solr_client.gemspec +39 -0
- data/solr_sample_core/conf/_schema_analysis_stopwords_english.json +38 -0
- data/solr_sample_core/conf/_schema_analysis_synonyms_english.json +11 -0
- data/solr_sample_core/conf/admin-extra.html +24 -0
- data/solr_sample_core/conf/admin-extra.menu-bottom.html +25 -0
- data/solr_sample_core/conf/admin-extra.menu-top.html +25 -0
- data/solr_sample_core/conf/clustering/carrot2/kmeans-attributes.xml +19 -0
- data/solr_sample_core/conf/clustering/carrot2/lingo-attributes.xml +24 -0
- data/solr_sample_core/conf/clustering/carrot2/stc-attributes.xml +19 -0
- data/solr_sample_core/conf/currency.xml +67 -0
- data/solr_sample_core/conf/elevate.xml +38 -0
- data/solr_sample_core/conf/lang/contractions_ca.txt +8 -0
- data/solr_sample_core/conf/lang/contractions_fr.txt +15 -0
- data/solr_sample_core/conf/lang/contractions_ga.txt +5 -0
- data/solr_sample_core/conf/lang/contractions_it.txt +23 -0
- data/solr_sample_core/conf/lang/hyphenations_ga.txt +5 -0
- data/solr_sample_core/conf/lang/stemdict_nl.txt +6 -0
- data/solr_sample_core/conf/lang/stoptags_ja.txt +420 -0
- data/solr_sample_core/conf/lang/stopwords_ar.txt +125 -0
- data/solr_sample_core/conf/lang/stopwords_bg.txt +193 -0
- data/solr_sample_core/conf/lang/stopwords_ca.txt +220 -0
- data/solr_sample_core/conf/lang/stopwords_ckb.txt +136 -0
- data/solr_sample_core/conf/lang/stopwords_cz.txt +172 -0
- data/solr_sample_core/conf/lang/stopwords_da.txt +110 -0
- data/solr_sample_core/conf/lang/stopwords_de.txt +294 -0
- data/solr_sample_core/conf/lang/stopwords_el.txt +78 -0
- data/solr_sample_core/conf/lang/stopwords_en.txt +54 -0
- data/solr_sample_core/conf/lang/stopwords_es.txt +356 -0
- data/solr_sample_core/conf/lang/stopwords_eu.txt +99 -0
- data/solr_sample_core/conf/lang/stopwords_fa.txt +313 -0
- data/solr_sample_core/conf/lang/stopwords_fi.txt +97 -0
- data/solr_sample_core/conf/lang/stopwords_fr.txt +186 -0
- data/solr_sample_core/conf/lang/stopwords_ga.txt +110 -0
- data/solr_sample_core/conf/lang/stopwords_gl.txt +161 -0
- data/solr_sample_core/conf/lang/stopwords_hi.txt +235 -0
- data/solr_sample_core/conf/lang/stopwords_hu.txt +211 -0
- data/solr_sample_core/conf/lang/stopwords_hy.txt +46 -0
- data/solr_sample_core/conf/lang/stopwords_id.txt +359 -0
- data/solr_sample_core/conf/lang/stopwords_it.txt +303 -0
- data/solr_sample_core/conf/lang/stopwords_ja.txt +127 -0
- data/solr_sample_core/conf/lang/stopwords_lv.txt +172 -0
- data/solr_sample_core/conf/lang/stopwords_nl.txt +119 -0
- data/solr_sample_core/conf/lang/stopwords_no.txt +194 -0
- data/solr_sample_core/conf/lang/stopwords_pt.txt +253 -0
- data/solr_sample_core/conf/lang/stopwords_ro.txt +233 -0
- data/solr_sample_core/conf/lang/stopwords_ru.txt +243 -0
- data/solr_sample_core/conf/lang/stopwords_sv.txt +133 -0
- data/solr_sample_core/conf/lang/stopwords_th.txt +119 -0
- data/solr_sample_core/conf/lang/stopwords_tr.txt +212 -0
- data/solr_sample_core/conf/lang/userdict_ja.txt +29 -0
- data/solr_sample_core/conf/mapping-FoldToASCII.txt +3813 -0
- data/solr_sample_core/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr_sample_core/conf/protwords.txt +21 -0
- data/solr_sample_core/conf/schema.xml +62 -0
- data/solr_sample_core/conf/scripts.conf +24 -0
- data/solr_sample_core/conf/solrconfig.xml +1702 -0
- data/solr_sample_core/conf/spellings.txt +2 -0
- data/solr_sample_core/conf/stopwords.txt +14 -0
- data/solr_sample_core/conf/syn.txt +0 -0
- data/solr_sample_core/conf/synonyms.txt +29 -0
- data/solr_sample_core/conf/token_fixing_charfilter.txt +110 -0
- data/solr_sample_core/conf/update-script.js +53 -0
- data/solr_sample_core/conf/velocity/README.txt +101 -0
- data/solr_sample_core/conf/velocity/VM_global_library.vm +175 -0
- data/solr_sample_core/conf/velocity/browse.vm +33 -0
- data/solr_sample_core/conf/velocity/cluster.vm +19 -0
- data/solr_sample_core/conf/velocity/cluster_results.vm +31 -0
- data/solr_sample_core/conf/velocity/debug.vm +28 -0
- data/solr_sample_core/conf/velocity/did_you_mean.vm +9 -0
- data/solr_sample_core/conf/velocity/error.vm +11 -0
- data/solr_sample_core/conf/velocity/facet_fields.vm +23 -0
- data/solr_sample_core/conf/velocity/facet_pivot.vm +12 -0
- data/solr_sample_core/conf/velocity/facet_queries.vm +12 -0
- data/solr_sample_core/conf/velocity/facet_ranges.vm +23 -0
- data/solr_sample_core/conf/velocity/facets.vm +10 -0
- data/solr_sample_core/conf/velocity/footer.vm +43 -0
- data/solr_sample_core/conf/velocity/head.vm +35 -0
- data/solr_sample_core/conf/velocity/header.vm +7 -0
- data/solr_sample_core/conf/velocity/hit.vm +25 -0
- data/solr_sample_core/conf/velocity/hit_grouped.vm +43 -0
- data/solr_sample_core/conf/velocity/hit_plain.vm +25 -0
- data/solr_sample_core/conf/velocity/join_doc.vm +20 -0
- data/solr_sample_core/conf/velocity/jquery.autocomplete.css +48 -0
- data/solr_sample_core/conf/velocity/jquery.autocomplete.js +763 -0
- data/solr_sample_core/conf/velocity/layout.vm +24 -0
- data/solr_sample_core/conf/velocity/main.css +230 -0
- data/solr_sample_core/conf/velocity/mime_type_lists.vm +68 -0
- data/solr_sample_core/conf/velocity/pagination_bottom.vm +22 -0
- data/solr_sample_core/conf/velocity/pagination_top.vm +29 -0
- data/solr_sample_core/conf/velocity/product_doc.vm +32 -0
- data/solr_sample_core/conf/velocity/query.vm +42 -0
- data/solr_sample_core/conf/velocity/query_form.vm +64 -0
- data/solr_sample_core/conf/velocity/query_group.vm +43 -0
- data/solr_sample_core/conf/velocity/query_spatial.vm +75 -0
- data/solr_sample_core/conf/velocity/results_list.vm +22 -0
- data/solr_sample_core/conf/velocity/richtext_doc.vm +153 -0
- data/solr_sample_core/conf/velocity/suggest.vm +8 -0
- data/solr_sample_core/conf/velocity/tabs.vm +50 -0
- data/solr_sample_core/conf/xslt/example.xsl +132 -0
- data/solr_sample_core/conf/xslt/example_atom.xsl +67 -0
- data/solr_sample_core/conf/xslt/example_rss.xsl +66 -0
- data/solr_sample_core/conf/xslt/luke.xsl +337 -0
- data/solr_sample_core/conf/xslt/updateXml.xsl +70 -0
- data/spec/client_basics_spec.rb +26 -0
- data/spec/connect_spec.rb +25 -0
- data/spec/core_basics.rb +21 -0
- data/spec/index_spec.rb +31 -0
- data/spec/load_spec.rb +7 -0
- data/spec/minitest_helper.rb +36 -0
- data/spec/schema_spec.rb +113 -0
- metadata +284 -0
@@ -0,0 +1,246 @@
|
|
1
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
2
|
+
# (the "License"); you may not use this file except in compliance with
|
3
|
+
# the License. You may obtain a copy of the License at
|
4
|
+
#
|
5
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
# Syntax:
|
14
|
+
# "source" => "target"
|
15
|
+
# "source".length() > 0 (source cannot be empty.)
|
16
|
+
# "target".length() >= 0 (target can be empty.)
|
17
|
+
|
18
|
+
# example:
|
19
|
+
# "À" => "A"
|
20
|
+
# "\u00C0" => "A"
|
21
|
+
# "\u00C0" => "\u0041"
|
22
|
+
# "ß" => "ss"
|
23
|
+
# "\t" => " "
|
24
|
+
# "\n" => ""
|
25
|
+
|
26
|
+
# À => A
|
27
|
+
"\u00C0" => "A"
|
28
|
+
|
29
|
+
# Á => A
|
30
|
+
"\u00C1" => "A"
|
31
|
+
|
32
|
+
# Â => A
|
33
|
+
"\u00C2" => "A"
|
34
|
+
|
35
|
+
# Ã => A
|
36
|
+
"\u00C3" => "A"
|
37
|
+
|
38
|
+
# Ä => A
|
39
|
+
"\u00C4" => "A"
|
40
|
+
|
41
|
+
# Å => A
|
42
|
+
"\u00C5" => "A"
|
43
|
+
|
44
|
+
# Æ => AE
|
45
|
+
"\u00C6" => "AE"
|
46
|
+
|
47
|
+
# Ç => C
|
48
|
+
"\u00C7" => "C"
|
49
|
+
|
50
|
+
# È => E
|
51
|
+
"\u00C8" => "E"
|
52
|
+
|
53
|
+
# É => E
|
54
|
+
"\u00C9" => "E"
|
55
|
+
|
56
|
+
# Ê => E
|
57
|
+
"\u00CA" => "E"
|
58
|
+
|
59
|
+
# Ë => E
|
60
|
+
"\u00CB" => "E"
|
61
|
+
|
62
|
+
# Ì => I
|
63
|
+
"\u00CC" => "I"
|
64
|
+
|
65
|
+
# Í => I
|
66
|
+
"\u00CD" => "I"
|
67
|
+
|
68
|
+
# Î => I
|
69
|
+
"\u00CE" => "I"
|
70
|
+
|
71
|
+
# Ï => I
|
72
|
+
"\u00CF" => "I"
|
73
|
+
|
74
|
+
# IJ => IJ
|
75
|
+
"\u0132" => "IJ"
|
76
|
+
|
77
|
+
# Ð => D
|
78
|
+
"\u00D0" => "D"
|
79
|
+
|
80
|
+
# Ñ => N
|
81
|
+
"\u00D1" => "N"
|
82
|
+
|
83
|
+
# Ò => O
|
84
|
+
"\u00D2" => "O"
|
85
|
+
|
86
|
+
# Ó => O
|
87
|
+
"\u00D3" => "O"
|
88
|
+
|
89
|
+
# Ô => O
|
90
|
+
"\u00D4" => "O"
|
91
|
+
|
92
|
+
# Õ => O
|
93
|
+
"\u00D5" => "O"
|
94
|
+
|
95
|
+
# Ö => O
|
96
|
+
"\u00D6" => "O"
|
97
|
+
|
98
|
+
# Ø => O
|
99
|
+
"\u00D8" => "O"
|
100
|
+
|
101
|
+
# Œ => OE
|
102
|
+
"\u0152" => "OE"
|
103
|
+
|
104
|
+
# Þ
|
105
|
+
"\u00DE" => "TH"
|
106
|
+
|
107
|
+
# Ù => U
|
108
|
+
"\u00D9" => "U"
|
109
|
+
|
110
|
+
# Ú => U
|
111
|
+
"\u00DA" => "U"
|
112
|
+
|
113
|
+
# Û => U
|
114
|
+
"\u00DB" => "U"
|
115
|
+
|
116
|
+
# Ü => U
|
117
|
+
"\u00DC" => "U"
|
118
|
+
|
119
|
+
# Ý => Y
|
120
|
+
"\u00DD" => "Y"
|
121
|
+
|
122
|
+
# Ÿ => Y
|
123
|
+
"\u0178" => "Y"
|
124
|
+
|
125
|
+
# à => a
|
126
|
+
"\u00E0" => "a"
|
127
|
+
|
128
|
+
# á => a
|
129
|
+
"\u00E1" => "a"
|
130
|
+
|
131
|
+
# â => a
|
132
|
+
"\u00E2" => "a"
|
133
|
+
|
134
|
+
# ã => a
|
135
|
+
"\u00E3" => "a"
|
136
|
+
|
137
|
+
# ä => a
|
138
|
+
"\u00E4" => "a"
|
139
|
+
|
140
|
+
# å => a
|
141
|
+
"\u00E5" => "a"
|
142
|
+
|
143
|
+
# æ => ae
|
144
|
+
"\u00E6" => "ae"
|
145
|
+
|
146
|
+
# ç => c
|
147
|
+
"\u00E7" => "c"
|
148
|
+
|
149
|
+
# è => e
|
150
|
+
"\u00E8" => "e"
|
151
|
+
|
152
|
+
# é => e
|
153
|
+
"\u00E9" => "e"
|
154
|
+
|
155
|
+
# ê => e
|
156
|
+
"\u00EA" => "e"
|
157
|
+
|
158
|
+
# ë => e
|
159
|
+
"\u00EB" => "e"
|
160
|
+
|
161
|
+
# ì => i
|
162
|
+
"\u00EC" => "i"
|
163
|
+
|
164
|
+
# í => i
|
165
|
+
"\u00ED" => "i"
|
166
|
+
|
167
|
+
# î => i
|
168
|
+
"\u00EE" => "i"
|
169
|
+
|
170
|
+
# ï => i
|
171
|
+
"\u00EF" => "i"
|
172
|
+
|
173
|
+
# ij => ij
|
174
|
+
"\u0133" => "ij"
|
175
|
+
|
176
|
+
# ð => d
|
177
|
+
"\u00F0" => "d"
|
178
|
+
|
179
|
+
# ñ => n
|
180
|
+
"\u00F1" => "n"
|
181
|
+
|
182
|
+
# ò => o
|
183
|
+
"\u00F2" => "o"
|
184
|
+
|
185
|
+
# ó => o
|
186
|
+
"\u00F3" => "o"
|
187
|
+
|
188
|
+
# ô => o
|
189
|
+
"\u00F4" => "o"
|
190
|
+
|
191
|
+
# õ => o
|
192
|
+
"\u00F5" => "o"
|
193
|
+
|
194
|
+
# ö => o
|
195
|
+
"\u00F6" => "o"
|
196
|
+
|
197
|
+
# ø => o
|
198
|
+
"\u00F8" => "o"
|
199
|
+
|
200
|
+
# œ => oe
|
201
|
+
"\u0153" => "oe"
|
202
|
+
|
203
|
+
# ß => ss
|
204
|
+
"\u00DF" => "ss"
|
205
|
+
|
206
|
+
# þ => th
|
207
|
+
"\u00FE" => "th"
|
208
|
+
|
209
|
+
# ù => u
|
210
|
+
"\u00F9" => "u"
|
211
|
+
|
212
|
+
# ú => u
|
213
|
+
"\u00FA" => "u"
|
214
|
+
|
215
|
+
# û => u
|
216
|
+
"\u00FB" => "u"
|
217
|
+
|
218
|
+
# ü => u
|
219
|
+
"\u00FC" => "u"
|
220
|
+
|
221
|
+
# ý => y
|
222
|
+
"\u00FD" => "y"
|
223
|
+
|
224
|
+
# ÿ => y
|
225
|
+
"\u00FF" => "y"
|
226
|
+
|
227
|
+
# ff => ff
|
228
|
+
"\uFB00" => "ff"
|
229
|
+
|
230
|
+
# fi => fi
|
231
|
+
"\uFB01" => "fi"
|
232
|
+
|
233
|
+
# fl => fl
|
234
|
+
"\uFB02" => "fl"
|
235
|
+
|
236
|
+
# ffi => ffi
|
237
|
+
"\uFB03" => "ffi"
|
238
|
+
|
239
|
+
# ffl => ffl
|
240
|
+
"\uFB04" => "ffl"
|
241
|
+
|
242
|
+
# ſt => ft
|
243
|
+
"\uFB05" => "ft"
|
244
|
+
|
245
|
+
# st => st
|
246
|
+
"\uFB06" => "st"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
2
|
+
# (the "License"); you may not use this file except in compliance with
|
3
|
+
# the License. You may obtain a copy of the License at
|
4
|
+
#
|
5
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and
|
11
|
+
# limitations under the License.
|
12
|
+
|
13
|
+
#-----------------------------------------------------------------------
|
14
|
+
# Use a protected word file to protect against the stemmer reducing two
|
15
|
+
# unrelated words to the same base word.
|
16
|
+
|
17
|
+
# Some non-words that normally won't be encountered,
|
18
|
+
# just to test that they won't be stemmed.
|
19
|
+
dontstems
|
20
|
+
zwhacky
|
21
|
+
|
@@ -0,0 +1,62 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
|
3
|
+
|
4
|
+
<schema name="example" version="1.5">
|
5
|
+
|
6
|
+
<!-- The unique key -->
|
7
|
+
<!-- It's gotta gotta gotta be a string!!! -->
|
8
|
+
<field name="id" type="string" indexed="true" stored="true"
|
9
|
+
multiValued="false"/>
|
10
|
+
<uniqueKey>id</uniqueKey>
|
11
|
+
|
12
|
+
<!-- =========================================
|
13
|
+
=========================================
|
14
|
+
== FIELD TYPE DEFINITIONS ==
|
15
|
+
=========================================
|
16
|
+
========================================= -->
|
17
|
+
|
18
|
+
<!-- Basic solr fields -->
|
19
|
+
<fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
|
20
|
+
<fieldType name="boolean" class="solr.BoolField"
|
21
|
+
sortMissingLast="true"/>
|
22
|
+
<fieldType name="int" class="solr.TrieIntField" precisionStep="0"
|
23
|
+
positionIncrementGap="0"/>
|
24
|
+
<fieldType name="float" class="solr.TrieFloatField" precisionStep="0"
|
25
|
+
positionIncrementGap="0"/>
|
26
|
+
<fieldType name="long" class="solr.TrieLongField" precisionStep="0"
|
27
|
+
positionIncrementGap="0"/>
|
28
|
+
<fieldType name="double" class="solr.TrieDoubleField" precisionStep="0"
|
29
|
+
positionIncrementGap="0"/>
|
30
|
+
<fieldType name="tint" class="solr.TrieIntField" precisionStep="8"
|
31
|
+
positionIncrementGap="0"/>
|
32
|
+
<fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8"
|
33
|
+
positionIncrementGap="0"/>
|
34
|
+
<fieldType name="tlong" class="solr.TrieLongField" precisionStep="8"
|
35
|
+
positionIncrementGap="0"/>
|
36
|
+
<fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8"
|
37
|
+
positionIncrementGap="0"/>
|
38
|
+
<fieldType name="date" class="solr.TrieDateField" precisionStep="0"
|
39
|
+
positionIncrementGap="0"/>
|
40
|
+
<fieldType name="tdate" class="solr.TrieDateField" precisionStep="6"
|
41
|
+
positionIncrementGap="0"/>
|
42
|
+
<fieldType name="binary" class="solr.BinaryField"/>
|
43
|
+
<fieldType name="ignored" stored="false" indexed="false"
|
44
|
+
multiValued="true" class="solr.StrField"/>
|
45
|
+
|
46
|
+
<fieldType class="solr.TextField" name="text_general"
|
47
|
+
positionIncrementGap="100">
|
48
|
+
<analyzer>
|
49
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
50
|
+
<filter class="solr.StopFilterFactory" ignoreCase="true"
|
51
|
+
words="stopwords.txt" enablePositionIncrements="true"/>
|
52
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
53
|
+
</analyzer>
|
54
|
+
</fieldType>
|
55
|
+
|
56
|
+
|
57
|
+
<!-- Some simple dynamic fields -->
|
58
|
+
<dynamicField name="*_s" type="string" stored="true" indexed="true" multiValued="true" sortMissingLast="true"/>
|
59
|
+
<dynamicField name="*_t" type="text_general" stored="true" indexed="true" multiValued="true"/>
|
60
|
+
<dynamicField name="*_i" type="int" stored="true" indexed="true" multiValued="true"/>
|
61
|
+
|
62
|
+
</schema>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
# contributor license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright ownership.
|
4
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
5
|
+
# (the "License"); you may not use this file except in compliance with
|
6
|
+
# the License. You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
|
16
|
+
user=
|
17
|
+
solr_hostname=localhost
|
18
|
+
solr_port=8983
|
19
|
+
rsyncd_port=18983
|
20
|
+
data_dir=
|
21
|
+
webapp_name=solr
|
22
|
+
master_host=
|
23
|
+
master_data_dir=
|
24
|
+
master_status_dir=
|
@@ -0,0 +1,1702 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
|
+
<!--
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
5
|
+
this work for additional information regarding copyright ownership.
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
8
|
+
the License. You may obtain a copy of the License at
|
9
|
+
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
See the License for the specific language governing permissions and
|
16
|
+
limitations under the License.
|
17
|
+
-->
|
18
|
+
|
19
|
+
<!--
|
20
|
+
For more details about configurations options that may appear in
|
21
|
+
this file, see http://wiki.apache.org/solr/SolrConfigXml.
|
22
|
+
-->
|
23
|
+
<config>
|
24
|
+
<!-- In all configuration below, a prefix of "solr." for class names
|
25
|
+
is an alias that causes solr to search appropriate packages,
|
26
|
+
including org.apache.solr.(search|update|request|core|analysis)
|
27
|
+
|
28
|
+
You may also specify a fully qualified Java classname if you
|
29
|
+
have your own custom plugins.
|
30
|
+
-->
|
31
|
+
|
32
|
+
<!-- Controls what version of Lucene various components of Solr
|
33
|
+
adhere to. Generally, you want to use the latest version to
|
34
|
+
get all bug fixes and improvements. It is highly recommended
|
35
|
+
that you fully re-index after changing this setting as it can
|
36
|
+
affect both how text is indexed and queried.
|
37
|
+
-->
|
38
|
+
<luceneMatchVersion>4.9</luceneMatchVersion>
|
39
|
+
|
40
|
+
<!-- <lib/> directives can be used to instruct Solr to load an Jars
|
41
|
+
identified and use them to resolve any "plugins" specified in
|
42
|
+
your solrconfig.xml or schema.xml (ie: Analyzers, Request
|
43
|
+
Handlers, etc...).
|
44
|
+
|
45
|
+
All directories and paths are resolved relative to the
|
46
|
+
instanceDir.
|
47
|
+
|
48
|
+
Please note that <lib/> directives are processed in the order
|
49
|
+
that they appear in your solrconfig.xml file, and are "stacked"
|
50
|
+
on top of each other when building a ClassLoader - so if you have
|
51
|
+
plugin jars with dependencies on other jars, the "lower level"
|
52
|
+
dependency jars should be loaded first.
|
53
|
+
|
54
|
+
If a "./lib" directory exists in your instanceDir, all files
|
55
|
+
found in it are included as if you had used the following
|
56
|
+
syntax...
|
57
|
+
|
58
|
+
<lib dir="./lib" />
|
59
|
+
-->
|
60
|
+
|
61
|
+
<!-- A 'dir' option by itself adds any files found in the directory
|
62
|
+
to the classpath, this is useful for including all jars in a
|
63
|
+
directory.
|
64
|
+
|
65
|
+
When a 'regex' is specified in addition to a 'dir', only the
|
66
|
+
files in that directory which completely match the regex
|
67
|
+
(anchored on both ends) will be included.
|
68
|
+
|
69
|
+
If a 'dir' option (with or without a regex) is used and nothing
|
70
|
+
is found that matches, a warning will be logged.
|
71
|
+
|
72
|
+
The examples below can be used to load some solr-contribs along
|
73
|
+
with their external dependencies.
|
74
|
+
-->
|
75
|
+
<lib dir="../../../contrib/extraction/lib" regex=".*\.jar"/>
|
76
|
+
<lib dir="../../../dist/" regex="solr-cell-\d.*\.jar"/>
|
77
|
+
|
78
|
+
<lib dir="../../../contrib/clustering/lib/" regex=".*\.jar"/>
|
79
|
+
<lib dir="../../../dist/" regex="solr-clustering-\d.*\.jar"/>
|
80
|
+
|
81
|
+
<lib dir="../../../contrib/langid/lib/" regex=".*\.jar"/>
|
82
|
+
<lib dir="../../../dist/" regex="solr-langid-\d.*\.jar"/>
|
83
|
+
|
84
|
+
<lib dir="../../../contrib/velocity/lib" regex=".*\.jar"/>
|
85
|
+
<lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar"/>
|
86
|
+
|
87
|
+
|
88
|
+
<lib dir="../../lib/" regex=".*\.jar"/>
|
89
|
+
|
90
|
+
<!-- an exact 'path' can be used instead of a 'dir' to specify a
|
91
|
+
specific jar file. This will cause a serious error to be logged
|
92
|
+
if it can't be loaded.
|
93
|
+
-->
|
94
|
+
<!--
|
95
|
+
<lib path="../a-jar-that-does-not-exist.jar" />
|
96
|
+
-->
|
97
|
+
|
98
|
+
<!-- Data Directory
|
99
|
+
|
100
|
+
Used to specify an alternate directory to hold all index data
|
101
|
+
other than the default ./data under the Solr home. If
|
102
|
+
replication is in use, this should match the replication
|
103
|
+
configuration.
|
104
|
+
-->
|
105
|
+
<dataDir>${solr.data.dir:}</dataDir>
|
106
|
+
|
107
|
+
|
108
|
+
<!-- The DirectoryFactory to use for indexes.
|
109
|
+
|
110
|
+
solr.StandardDirectoryFactory is filesystem
|
111
|
+
based and tries to pick the best implementation for the current
|
112
|
+
JVM and platform. solr.NRTCachingDirectoryFactory, the default,
|
113
|
+
wraps solr.StandardDirectoryFactory and caches small files in memory
|
114
|
+
for better NRT performance.
|
115
|
+
|
116
|
+
One can force a particular implementation via solr.MMapDirectoryFactory,
|
117
|
+
solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
|
118
|
+
|
119
|
+
solr.RAMDirectoryFactory is memory based, not
|
120
|
+
persistent, and doesn't work with replication.
|
121
|
+
-->
|
122
|
+
<directoryFactory name="DirectoryFactory"
|
123
|
+
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}">
|
124
|
+
|
125
|
+
|
126
|
+
<!-- These will be used if you are using the solr.HdfsDirectoryFactory,
|
127
|
+
otherwise they will be ignored. If you don't plan on using hdfs,
|
128
|
+
you can safely remove this section. -->
|
129
|
+
<!-- The root directory that collection data should be written to. -->
|
130
|
+
<str name="solr.hdfs.home">${solr.hdfs.home:}</str>
|
131
|
+
<!-- The hadoop configuration files to use for the hdfs client. -->
|
132
|
+
<str name="solr.hdfs.confdir">${solr.hdfs.confdir:}</str>
|
133
|
+
<!-- Enable/Disable the hdfs cache. -->
|
134
|
+
<str name="solr.hdfs.blockcache.enabled">
|
135
|
+
${solr.hdfs.blockcache.enabled:true}
|
136
|
+
</str>
|
137
|
+
<!-- Enable/Disable using one global cache for all SolrCores.
|
138
|
+
The settings used will be from the first HdfsDirectoryFactory created. -->
|
139
|
+
<str name="solr.hdfs.blockcache.global">
|
140
|
+
${solr.hdfs.blockcache.global:true}
|
141
|
+
</str>
|
142
|
+
|
143
|
+
</directoryFactory>
|
144
|
+
|
145
|
+
<!-- The CodecFactory for defining the format of the inverted index.
|
146
|
+
The default implementation is SchemaCodecFactory, which is the official Lucene
|
147
|
+
index format, but hooks into the schema to provide per-field customization of
|
148
|
+
the postings lists and per-document values in the fieldType element
|
149
|
+
(postingsFormat/docValuesFormat). Note that most of the alternative implementations
|
150
|
+
are experimental, so if you choose to customize the index format, its a good
|
151
|
+
idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
|
152
|
+
before upgrading to a newer version to avoid unnecessary reindexing.
|
153
|
+
-->
|
154
|
+
<codecFactory class="solr.SchemaCodecFactory"/>
|
155
|
+
|
156
|
+
<!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>:
|
157
|
+
|
158
|
+
<schemaFactory class="ManagedIndexSchemaFactory">
|
159
|
+
<bool name="mutable">true</bool>
|
160
|
+
<str name="managedSchemaResourceName">managed-schema</str>
|
161
|
+
</schemaFactory>
|
162
|
+
|
163
|
+
When ManagedIndexSchemaFactory is specified, Solr will load the schema from
|
164
|
+
he resource named in 'managedSchemaResourceName', rather than from schema.xml.
|
165
|
+
Note that the managed schema resource CANNOT be named schema.xml. If the managed
|
166
|
+
schema does not exist, Solr will create it after reading schema.xml, then rename
|
167
|
+
'schema.xml' to 'schema.xml.bak'.
|
168
|
+
|
169
|
+
Do NOT hand edit the managed schema - external modifications will be ignored and
|
170
|
+
overwritten as a result of schema modification REST API calls.
|
171
|
+
|
172
|
+
When ManagedIndexSchemaFactory is specified with mutable = true, schema
|
173
|
+
modification REST API calls will be allowed; otherwise, error responses will be
|
174
|
+
sent back for these requests.
|
175
|
+
-->
|
176
|
+
<schemaFactory class="ClassicIndexSchemaFactory"/>
|
177
|
+
|
178
|
+
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
179
|
+
Index Config - These settings control low-level behavior of indexing
|
180
|
+
Most example settings here show the default value, but are commented
|
181
|
+
out, to more easily see where customizations have been made.
|
182
|
+
|
183
|
+
Note: This replaces <indexDefaults> and <mainIndex> from older versions
|
184
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
185
|
+
<indexConfig>
|
186
|
+
<!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
|
187
|
+
LimitTokenCountFilterFactory in your fieldType definition. E.g.
|
188
|
+
<filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
|
189
|
+
-->
|
190
|
+
<!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
|
191
|
+
<!-- <writeLockTimeout>1000</writeLockTimeout> -->
|
192
|
+
|
193
|
+
<!-- The maximum number of simultaneous threads that may be
|
194
|
+
indexing documents at once in IndexWriter; if more than this
|
195
|
+
many threads arrive they will wait for others to finish.
|
196
|
+
Default in Solr/Lucene is 8. -->
|
197
|
+
<!-- <maxIndexingThreads>8</maxIndexingThreads> -->
|
198
|
+
|
199
|
+
<!-- Expert: Enabling compound file will use less files for the index,
|
200
|
+
using fewer file descriptors on the expense of performance decrease.
|
201
|
+
Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
|
202
|
+
<!-- <useCompoundFile>false</useCompoundFile> -->
|
203
|
+
|
204
|
+
<!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
|
205
|
+
indexing for buffering added documents and deletions before they are
|
206
|
+
flushed to the Directory.
|
207
|
+
maxBufferedDocs sets a limit on the number of documents buffered
|
208
|
+
before flushing.
|
209
|
+
If both ramBufferSizeMB and maxBufferedDocs is set, then
|
210
|
+
Lucene will flush based on whichever limit is hit first.
|
211
|
+
The default is 100 MB. -->
|
212
|
+
<!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
|
213
|
+
<!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
|
214
|
+
|
215
|
+
<!-- Expert: Merge Policy
|
216
|
+
The Merge Policy in Lucene controls how merging of segments is done.
|
217
|
+
The default since Solr/Lucene 3.3 is TieredMergePolicy.
|
218
|
+
The default since Lucene 2.3 was the LogByteSizeMergePolicy,
|
219
|
+
Even older versions of Lucene used LogDocMergePolicy.
|
220
|
+
-->
|
221
|
+
<!--
|
222
|
+
<mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
|
223
|
+
<int name="maxMergeAtOnce">10</int>
|
224
|
+
<int name="segmentsPerTier">10</int>
|
225
|
+
</mergePolicy>
|
226
|
+
-->
|
227
|
+
|
228
|
+
<!-- Merge Factor
|
229
|
+
The merge factor controls how many segments will get merged at a time.
|
230
|
+
For TieredMergePolicy, mergeFactor is a convenience parameter which
|
231
|
+
will set both MaxMergeAtOnce and SegmentsPerTier at once.
|
232
|
+
For LogByteSizeMergePolicy, mergeFactor decides how many new segments
|
233
|
+
will be allowed before they are merged into one.
|
234
|
+
Default is 10 for both merge policies.
|
235
|
+
-->
|
236
|
+
<!--
|
237
|
+
<mergeFactor>10</mergeFactor>
|
238
|
+
-->
|
239
|
+
|
240
|
+
<!-- Expert: Merge Scheduler
|
241
|
+
The Merge Scheduler in Lucene controls how merges are
|
242
|
+
performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
|
243
|
+
can perform merges in the background using separate threads.
|
244
|
+
The SerialMergeScheduler (Lucene 2.2 default) does not.
|
245
|
+
-->
|
246
|
+
<!--
|
247
|
+
<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
|
248
|
+
-->
|
249
|
+
|
250
|
+
<!-- LockFactory
|
251
|
+
|
252
|
+
This option specifies which Lucene LockFactory implementation
|
253
|
+
to use.
|
254
|
+
|
255
|
+
single = SingleInstanceLockFactory - suggested for a
|
256
|
+
read-only index or when there is no possibility of
|
257
|
+
another process trying to modify the index.
|
258
|
+
native = NativeFSLockFactory - uses OS native file locking.
|
259
|
+
Do not use when multiple solr webapps in the same
|
260
|
+
JVM are attempting to share a single index.
|
261
|
+
simple = SimpleFSLockFactory - uses a plain file for locking
|
262
|
+
|
263
|
+
Defaults: 'native' is default for Solr3.6 and later, otherwise
|
264
|
+
'simple' is the default
|
265
|
+
|
266
|
+
More details on the nuances of each LockFactory...
|
267
|
+
http://wiki.apache.org/lucene-java/AvailableLockFactories
|
268
|
+
-->
|
269
|
+
<lockType>${solr.lock.type:native}</lockType>
|
270
|
+
|
271
|
+
<!-- Unlock On Startup
|
272
|
+
|
273
|
+
If true, unlock any held write or commit locks on startup.
|
274
|
+
This defeats the locking mechanism that allows multiple
|
275
|
+
processes to safely access a lucene index, and should be used
|
276
|
+
with care. Default is "false".
|
277
|
+
|
278
|
+
This is not needed if lock type is 'single'
|
279
|
+
-->
|
280
|
+
<!--
|
281
|
+
<unlockOnStartup>false</unlockOnStartup>
|
282
|
+
-->
|
283
|
+
|
284
|
+
<!-- Expert: Controls how often Lucene loads terms into memory
|
285
|
+
Default is 128 and is likely good for most everyone.
|
286
|
+
-->
|
287
|
+
<!-- <termIndexInterval>128</termIndexInterval> -->
|
288
|
+
|
289
|
+
<!-- If true, IndexReaders will be opened/reopened from the IndexWriter
|
290
|
+
instead of from the Directory. Hosts in a master/slave setup
|
291
|
+
should have this set to false while those in a SolrCloud
|
292
|
+
cluster need to be set to true. Default: true
|
293
|
+
-->
|
294
|
+
<!--
|
295
|
+
<nrtMode>true</nrtMode>
|
296
|
+
-->
|
297
|
+
|
298
|
+
<!-- Commit Deletion Policy
|
299
|
+
Custom deletion policies can be specified here. The class must
|
300
|
+
implement org.apache.lucene.index.IndexDeletionPolicy.
|
301
|
+
|
302
|
+
The default Solr IndexDeletionPolicy implementation supports
|
303
|
+
deleting index commit points on number of commits, age of
|
304
|
+
commit point and optimized status.
|
305
|
+
|
306
|
+
The latest commit point should always be preserved regardless
|
307
|
+
of the criteria.
|
308
|
+
-->
|
309
|
+
<!--
|
310
|
+
<deletionPolicy class="solr.SolrDeletionPolicy">
|
311
|
+
-->
|
312
|
+
<!-- The number of commit points to be kept -->
|
313
|
+
<!-- <str name="maxCommitsToKeep">1</str> -->
|
314
|
+
<!-- The number of optimized commit points to be kept -->
|
315
|
+
<!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
|
316
|
+
<!--
|
317
|
+
Delete all commit points once they have reached the given age.
|
318
|
+
Supports DateMathParser syntax e.g.
|
319
|
+
-->
|
320
|
+
<!--
|
321
|
+
<str name="maxCommitAge">30MINUTES</str>
|
322
|
+
<str name="maxCommitAge">1DAY</str>
|
323
|
+
-->
|
324
|
+
<!--
|
325
|
+
</deletionPolicy>
|
326
|
+
-->
|
327
|
+
|
328
|
+
<!-- Lucene Infostream
|
329
|
+
|
330
|
+
To aid in advanced debugging, Lucene provides an "InfoStream"
|
331
|
+
of detailed information when indexing.
|
332
|
+
|
333
|
+
Setting the value to true will instruct the underlying Lucene
|
334
|
+
IndexWriter to write its info stream to solr's log. By default,
|
335
|
+
this is enabled here, and controlled through log4j.properties.
|
336
|
+
-->
|
337
|
+
<infoStream>true</infoStream>
|
338
|
+
|
339
|
+
<!--
|
340
|
+
Use true to enable this safety check, which can help
|
341
|
+
reduce the risk of propagating index corruption from older segments
|
342
|
+
into new ones, at the expense of slower merging.
|
343
|
+
-->
|
344
|
+
<checkIntegrityAtMerge>false</checkIntegrityAtMerge>
|
345
|
+
</indexConfig>
|
346
|
+
|
347
|
+
|
348
|
+
<!-- JMX
|
349
|
+
|
350
|
+
This example enables JMX if and only if an existing MBeanServer
|
351
|
+
is found, use this if you want to configure JMX through JVM
|
352
|
+
parameters. Remove this to disable exposing Solr configuration
|
353
|
+
and statistics to JMX.
|
354
|
+
|
355
|
+
For more details see http://wiki.apache.org/solr/SolrJmx
|
356
|
+
-->
|
357
|
+
<jmx/>
|
358
|
+
<!-- If you want to connect to a particular server, specify the
|
359
|
+
agentId
|
360
|
+
-->
|
361
|
+
<!-- <jmx agentId="myAgent" /> -->
|
362
|
+
<!-- If you want to start a new MBeanServer, specify the serviceUrl -->
|
363
|
+
<!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
|
364
|
+
-->
|
365
|
+
|
366
|
+
<!-- The default high-performance update handler -->
|
367
|
+
<updateHandler class="solr.DirectUpdateHandler2">
|
368
|
+
|
369
|
+
<!-- Enables a transaction log, used for real-time get, durability, and
|
370
|
+
and solr cloud replica recovery. The log can grow as big as
|
371
|
+
uncommitted changes to the index, so use of a hard autoCommit
|
372
|
+
is recommended (see below).
|
373
|
+
"dir" - the target directory for transaction logs, defaults to the
|
374
|
+
solr data directory. -->
|
375
|
+
<!--<updateLog>-->
|
376
|
+
<!--<str name="dir">${solr.ulog.dir:}</str>-->
|
377
|
+
<!--</updateLog>-->
|
378
|
+
|
379
|
+
<!-- AutoCommit
|
380
|
+
|
381
|
+
Perform a hard commit automatically under certain conditions.
|
382
|
+
Instead of enabling autoCommit, consider using "commitWithin"
|
383
|
+
when adding documents.
|
384
|
+
|
385
|
+
http://wiki.apache.org/solr/UpdateXmlMessages
|
386
|
+
|
387
|
+
maxDocs - Maximum number of documents to add since the last
|
388
|
+
commit before automatically triggering a new commit.
|
389
|
+
|
390
|
+
maxTime - Maximum amount of time in ms that is allowed to pass
|
391
|
+
since a document was added before automatically
|
392
|
+
triggering a new commit.
|
393
|
+
openSearcher - if false, the commit causes recent index changes
|
394
|
+
to be flushed to stable storage, but does not cause a new
|
395
|
+
searcher to be opened to make those changes visible.
|
396
|
+
|
397
|
+
If the updateLog is enabled, then it's highly recommended to
|
398
|
+
have some sort of hard autoCommit to limit the log size.
|
399
|
+
-->
|
400
|
+
<autoCommit>
|
401
|
+
<maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
|
402
|
+
<openSearcher>false</openSearcher>
|
403
|
+
</autoCommit>
|
404
|
+
|
405
|
+
<!-- softAutoCommit is like autoCommit except it causes a
|
406
|
+
'soft' commit which only ensures that changes are visible
|
407
|
+
but does not ensure that data is synced to disk. This is
|
408
|
+
faster and more near-realtime friendly than a hard commit.
|
409
|
+
-->
|
410
|
+
|
411
|
+
<autoSoftCommit>
|
412
|
+
<maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
|
413
|
+
</autoSoftCommit>
|
414
|
+
|
415
|
+
<!-- Update Related Event Listeners
|
416
|
+
|
417
|
+
Various IndexWriter related events can trigger Listeners to
|
418
|
+
take actions.
|
419
|
+
|
420
|
+
postCommit - fired after every commit or optimize command
|
421
|
+
postOptimize - fired after every optimize command
|
422
|
+
-->
|
423
|
+
<!-- The RunExecutableListener executes an external command from a
|
424
|
+
hook such as postCommit or postOptimize.
|
425
|
+
|
426
|
+
exe - the name of the executable to run
|
427
|
+
dir - dir to use as the current working directory. (default=".")
|
428
|
+
wait - the calling thread waits until the executable returns.
|
429
|
+
(default="true")
|
430
|
+
args - the arguments to pass to the program. (default is none)
|
431
|
+
env - environment variables to set. (default is none)
|
432
|
+
-->
|
433
|
+
<!-- This example shows how RunExecutableListener could be used
|
434
|
+
with the script based replication...
|
435
|
+
http://wiki.apache.org/solr/CollectionDistribution
|
436
|
+
-->
|
437
|
+
<!--
|
438
|
+
<listener event="postCommit" class="solr.RunExecutableListener">
|
439
|
+
<str name="exe">solr/bin/snapshooter</str>
|
440
|
+
<str name="dir">.</str>
|
441
|
+
<bool name="wait">true</bool>
|
442
|
+
<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
|
443
|
+
<arr name="env"> <str>MYVAR=val1</str> </arr>
|
444
|
+
</listener>
|
445
|
+
-->
|
446
|
+
|
447
|
+
</updateHandler>
|
448
|
+
|
449
|
+
<!-- IndexReaderFactory
|
450
|
+
|
451
|
+
Use the following format to specify a custom IndexReaderFactory,
|
452
|
+
which allows for alternate IndexReader implementations.
|
453
|
+
|
454
|
+
** Experimental Feature **
|
455
|
+
|
456
|
+
Please note - Using a custom IndexReaderFactory may prevent
|
457
|
+
certain other features from working. The API to
|
458
|
+
IndexReaderFactory may change without warning or may even be
|
459
|
+
removed from future releases if the problems cannot be
|
460
|
+
resolved.
|
461
|
+
|
462
|
+
|
463
|
+
** Features that may not work with custom IndexReaderFactory **
|
464
|
+
|
465
|
+
The ReplicationHandler assumes a disk-resident index. Using a
|
466
|
+
custom IndexReader implementation may cause incompatibility
|
467
|
+
with ReplicationHandler and may cause replication to not work
|
468
|
+
correctly. See SOLR-1366 for details.
|
469
|
+
|
470
|
+
-->
|
471
|
+
<!--
|
472
|
+
<indexReaderFactory name="IndexReaderFactory" class="package.class">
|
473
|
+
<str name="someArg">Some Value</str>
|
474
|
+
</indexReaderFactory >
|
475
|
+
-->
|
476
|
+
<!-- By explicitly declaring the Factory, the termIndexDivisor can
|
477
|
+
be specified.
|
478
|
+
-->
|
479
|
+
<!--
|
480
|
+
<indexReaderFactory name="IndexReaderFactory"
|
481
|
+
class="solr.StandardIndexReaderFactory">
|
482
|
+
<int name="setTermIndexDivisor">12</int>
|
483
|
+
</indexReaderFactory >
|
484
|
+
-->
|
485
|
+
|
486
|
+
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
487
|
+
Query section - these settings control query time things like caches
|
488
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
489
|
+
<query>
|
490
|
+
<!-- Max Boolean Clauses
|
491
|
+
|
492
|
+
Maximum number of clauses in each BooleanQuery, an exception
|
493
|
+
is thrown if exceeded.
|
494
|
+
|
495
|
+
** WARNING **
|
496
|
+
|
497
|
+
This option actually modifies a global Lucene property that
|
498
|
+
will affect all SolrCores. If multiple solrconfig.xml files
|
499
|
+
disagree on this property, the value at any given moment will
|
500
|
+
be based on the last SolrCore to be initialized.
|
501
|
+
|
502
|
+
-->
|
503
|
+
<maxBooleanClauses>1024</maxBooleanClauses>
|
504
|
+
|
505
|
+
|
506
|
+
<!-- Solr Internal Query Caches
|
507
|
+
|
508
|
+
There are two implementations of cache available for Solr,
|
509
|
+
LRUCache, based on a synchronized LinkedHashMap, and
|
510
|
+
FastLRUCache, based on a ConcurrentHashMap.
|
511
|
+
|
512
|
+
FastLRUCache has faster gets and slower puts in single
|
513
|
+
threaded operation and thus is generally faster than LRUCache
|
514
|
+
when the hit ratio of the cache is high (> 75%), and may be
|
515
|
+
faster under other scenarios on multi-cpu systems.
|
516
|
+
-->
|
517
|
+
|
518
|
+
<!-- Filter Cache
|
519
|
+
|
520
|
+
Cache used by SolrIndexSearcher for filters (DocSets),
|
521
|
+
unordered sets of *all* documents that match a query. When a
|
522
|
+
new searcher is opened, its caches may be prepopulated or
|
523
|
+
"autowarmed" using data from caches in the old searcher.
|
524
|
+
autowarmCount is the number of items to prepopulate. For
|
525
|
+
LRUCache, the autowarmed items will be the most recently
|
526
|
+
accessed items.
|
527
|
+
|
528
|
+
Parameters:
|
529
|
+
class - the SolrCache implementation LRUCache or
|
530
|
+
(LRUCache or FastLRUCache)
|
531
|
+
size - the maximum number of entries in the cache
|
532
|
+
initialSize - the initial capacity (number of entries) of
|
533
|
+
the cache. (see java.util.HashMap)
|
534
|
+
autowarmCount - the number of entries to prepopulate from
|
535
|
+
and old cache.
|
536
|
+
-->
|
537
|
+
<filterCache class="solr.FastLRUCache"
|
538
|
+
size="512"
|
539
|
+
initialSize="512"
|
540
|
+
autowarmCount="0"/>
|
541
|
+
|
542
|
+
<!-- Query Result Cache
|
543
|
+
|
544
|
+
Caches results of searches - ordered lists of document ids
|
545
|
+
(DocList) based on a query, a sort, and the range of documents requested.
|
546
|
+
-->
|
547
|
+
<queryResultCache class="solr.LRUCache"
|
548
|
+
size="512"
|
549
|
+
initialSize="512"
|
550
|
+
autowarmCount="0"/>
|
551
|
+
|
552
|
+
<!-- Document Cache
|
553
|
+
|
554
|
+
Caches Lucene Document objects (the stored fields for each
|
555
|
+
document). Since Lucene internal document ids are transient,
|
556
|
+
this cache will not be autowarmed.
|
557
|
+
-->
|
558
|
+
<documentCache class="solr.LRUCache"
|
559
|
+
size="512"
|
560
|
+
initialSize="512"
|
561
|
+
autowarmCount="0"/>
|
562
|
+
|
563
|
+
<!-- custom cache currently used by block join -->
|
564
|
+
<cache name="perSegFilter"
|
565
|
+
class="solr.search.LRUCache"
|
566
|
+
size="10"
|
567
|
+
initialSize="0"
|
568
|
+
autowarmCount="10"
|
569
|
+
regenerator="solr.NoOpRegenerator"/>
|
570
|
+
|
571
|
+
<!-- Field Value Cache
|
572
|
+
|
573
|
+
Cache used to hold field values that are quickly accessible
|
574
|
+
by document id. The fieldValueCache is created by default
|
575
|
+
even if not configured here.
|
576
|
+
-->
|
577
|
+
<!--
|
578
|
+
<fieldValueCache class="solr.FastLRUCache"
|
579
|
+
size="512"
|
580
|
+
autowarmCount="128"
|
581
|
+
showItems="32" />
|
582
|
+
-->
|
583
|
+
|
584
|
+
<!-- Custom Cache
|
585
|
+
|
586
|
+
Example of a generic cache. These caches may be accessed by
|
587
|
+
name through SolrIndexSearcher.getCache(),cacheLookup(), and
|
588
|
+
cacheInsert(). The purpose is to enable easy caching of
|
589
|
+
user/application level data. The regenerator argument should
|
590
|
+
be specified as an implementation of solr.CacheRegenerator
|
591
|
+
if autowarming is desired.
|
592
|
+
-->
|
593
|
+
<!--
|
594
|
+
<cache name="myUserCache"
|
595
|
+
class="solr.LRUCache"
|
596
|
+
size="4096"
|
597
|
+
initialSize="1024"
|
598
|
+
autowarmCount="1024"
|
599
|
+
regenerator="com.mycompany.MyRegenerator"
|
600
|
+
/>
|
601
|
+
-->
|
602
|
+
|
603
|
+
|
604
|
+
<!-- Lazy Field Loading
|
605
|
+
|
606
|
+
If true, stored fields that are not requested will be loaded
|
607
|
+
lazily. This can result in a significant speed improvement
|
608
|
+
if the usual case is to not load all stored fields,
|
609
|
+
especially if the skipped fields are large compressed text
|
610
|
+
fields.
|
611
|
+
-->
|
612
|
+
<enableLazyFieldLoading>true</enableLazyFieldLoading>
|
613
|
+
|
614
|
+
<!-- Use Filter For Sorted Query
|
615
|
+
|
616
|
+
A possible optimization that attempts to use a filter to
|
617
|
+
satisfy a search. If the requested sort does not include
|
618
|
+
score, then the filterCache will be checked for a filter
|
619
|
+
matching the query. If found, the filter will be used as the
|
620
|
+
source of document ids, and then the sort will be applied to
|
621
|
+
that.
|
622
|
+
|
623
|
+
For most situations, this will not be useful unless you
|
624
|
+
frequently get the same search repeatedly with different sort
|
625
|
+
options, and none of them ever use "score"
|
626
|
+
-->
|
627
|
+
<!--
|
628
|
+
<useFilterForSortedQuery>true</useFilterForSortedQuery>
|
629
|
+
-->
|
630
|
+
|
631
|
+
<!-- Result Window Size
|
632
|
+
|
633
|
+
An optimization for use with the queryResultCache. When a search
|
634
|
+
is requested, a superset of the requested number of document ids
|
635
|
+
are collected. For example, if a search for a particular query
|
636
|
+
requests matching documents 10 through 19, and queryWindowSize is 50,
|
637
|
+
then documents 0 through 49 will be collected and cached. Any further
|
638
|
+
requests in that range can be satisfied via the cache.
|
639
|
+
-->
|
640
|
+
<queryResultWindowSize>20</queryResultWindowSize>
|
641
|
+
|
642
|
+
<!-- Maximum number of documents to cache for any entry in the
|
643
|
+
queryResultCache.
|
644
|
+
-->
|
645
|
+
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
|
646
|
+
|
647
|
+
<!-- Query Related Event Listeners
|
648
|
+
|
649
|
+
Various IndexSearcher related events can trigger Listeners to
|
650
|
+
take actions.
|
651
|
+
|
652
|
+
newSearcher - fired whenever a new searcher is being prepared
|
653
|
+
and there is a current searcher handling requests (aka
|
654
|
+
registered). It can be used to prime certain caches to
|
655
|
+
prevent long request times for certain requests.
|
656
|
+
|
657
|
+
firstSearcher - fired whenever a new searcher is being
|
658
|
+
prepared but there is no current registered searcher to handle
|
659
|
+
requests or to gain autowarming data from.
|
660
|
+
|
661
|
+
|
662
|
+
-->
|
663
|
+
<!-- QuerySenderListener takes an array of NamedList and executes a
|
664
|
+
local query request for each NamedList in sequence.
|
665
|
+
-->
|
666
|
+
<listener event="newSearcher" class="solr.QuerySenderListener">
|
667
|
+
<arr name="queries">
|
668
|
+
<!--
|
669
|
+
<lst><str name="q">solr</str><str name="sort">price asc</str></lst>
|
670
|
+
<lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
|
671
|
+
-->
|
672
|
+
</arr>
|
673
|
+
</listener>
|
674
|
+
<listener event="firstSearcher" class="solr.QuerySenderListener">
|
675
|
+
<arr name="queries">
|
676
|
+
<lst>
|
677
|
+
<str name="q">static firstSearcher warming in
|
678
|
+
solrconfig.xml
|
679
|
+
</str>
|
680
|
+
</lst>
|
681
|
+
</arr>
|
682
|
+
</listener>
|
683
|
+
|
684
|
+
<!-- Use Cold Searcher
|
685
|
+
|
686
|
+
If a search request comes in and there is no current
|
687
|
+
registered searcher, then immediately register the still
|
688
|
+
warming searcher and use it. If "false" then all requests
|
689
|
+
will block until the first searcher is done warming.
|
690
|
+
-->
|
691
|
+
<useColdSearcher>false</useColdSearcher>
|
692
|
+
|
693
|
+
<!-- Max Warming Searchers
|
694
|
+
|
695
|
+
Maximum number of searchers that may be warming in the
|
696
|
+
background concurrently. An error is returned if this limit
|
697
|
+
is exceeded.
|
698
|
+
|
699
|
+
Recommend values of 1-2 for read-only slaves, higher for
|
700
|
+
masters w/o cache warming.
|
701
|
+
-->
|
702
|
+
<maxWarmingSearchers>2</maxWarmingSearchers>
|
703
|
+
|
704
|
+
</query>
|
705
|
+
|
706
|
+
|
707
|
+
<!-- Request Dispatcher
|
708
|
+
|
709
|
+
This section contains instructions for how the SolrDispatchFilter
|
710
|
+
should behave when processing requests for this SolrCore.
|
711
|
+
|
712
|
+
handleSelect is a legacy option that affects the behavior of requests
|
713
|
+
such as /select?qt=XXX
|
714
|
+
|
715
|
+
handleSelect="true" will cause the SolrDispatchFilter to process
|
716
|
+
the request and dispatch the query to a handler specified by the
|
717
|
+
"qt" param, assuming "/select" isn't already registered.
|
718
|
+
|
719
|
+
handleSelect="false" will cause the SolrDispatchFilter to
|
720
|
+
ignore "/select" requests, resulting in a 404 unless a handler
|
721
|
+
is explicitly registered with the name "/select"
|
722
|
+
|
723
|
+
handleSelect="true" is not recommended for new users, but is the default
|
724
|
+
for backwards compatibility
|
725
|
+
-->
|
726
|
+
<requestDispatcher handleSelect="true">
|
727
|
+
<!-- Request Parsing
|
728
|
+
|
729
|
+
These settings indicate how Solr Requests may be parsed, and
|
730
|
+
what restrictions may be placed on the ContentStreams from
|
731
|
+
those requests
|
732
|
+
|
733
|
+
enableRemoteStreaming - enables use of the stream.file
|
734
|
+
and stream.url parameters for specifying remote streams.
|
735
|
+
|
736
|
+
multipartUploadLimitInKB - specifies the max size (in KiB) of
|
737
|
+
Multipart File Uploads that Solr will allow in a Request.
|
738
|
+
|
739
|
+
formdataUploadLimitInKB - specifies the max size (in KiB) of
|
740
|
+
form data (application/x-www-form-urlencoded) sent via
|
741
|
+
POST. You can use POST to pass request parameters not
|
742
|
+
fitting into the URL.
|
743
|
+
|
744
|
+
addHttpRequestToContext - if set to true, it will instruct
|
745
|
+
the requestParsers to include the original HttpServletRequest
|
746
|
+
object in the context map of the SolrQueryRequest under the
|
747
|
+
key "httpRequest". It will not be used by any of the existing
|
748
|
+
Solr components, but may be useful when developing custom
|
749
|
+
plugins.
|
750
|
+
|
751
|
+
*** WARNING ***
|
752
|
+
The settings below authorize Solr to fetch remote files, You
|
753
|
+
should make sure your system has some authentication before
|
754
|
+
using enableRemoteStreaming="true"
|
755
|
+
|
756
|
+
-->
|
757
|
+
<requestParsers enableRemoteStreaming="true"
|
758
|
+
multipartUploadLimitInKB="2048000"
|
759
|
+
formdataUploadLimitInKB="2048"
|
760
|
+
addHttpRequestToContext="false"/>
|
761
|
+
|
762
|
+
<!-- HTTP Caching
|
763
|
+
|
764
|
+
Set HTTP caching related parameters (for proxy caches and clients).
|
765
|
+
|
766
|
+
The options below instruct Solr not to output any HTTP Caching
|
767
|
+
related headers
|
768
|
+
-->
|
769
|
+
<httpCaching never304="true"/>
|
770
|
+
<!-- If you include a <cacheControl> directive, it will be used to
|
771
|
+
generate a Cache-Control header (as well as an Expires header
|
772
|
+
if the value contains "max-age=")
|
773
|
+
|
774
|
+
By default, no Cache-Control header is generated.
|
775
|
+
|
776
|
+
You can use the <cacheControl> option even if you have set
|
777
|
+
never304="true"
|
778
|
+
-->
|
779
|
+
<!--
|
780
|
+
<httpCaching never304="true" >
|
781
|
+
<cacheControl>max-age=30, public</cacheControl>
|
782
|
+
</httpCaching>
|
783
|
+
-->
|
784
|
+
<!-- To enable Solr to respond with automatically generated HTTP
|
785
|
+
Caching headers, and to response to Cache Validation requests
|
786
|
+
correctly, set the value of never304="false"
|
787
|
+
|
788
|
+
This will cause Solr to generate Last-Modified and ETag
|
789
|
+
headers based on the properties of the Index.
|
790
|
+
|
791
|
+
The following options can also be specified to affect the
|
792
|
+
values of these headers...
|
793
|
+
|
794
|
+
lastModFrom - the default value is "openTime" which means the
|
795
|
+
Last-Modified value (and validation against If-Modified-Since
|
796
|
+
requests) will all be relative to when the current Searcher
|
797
|
+
was opened. You can change it to lastModFrom="dirLastMod" if
|
798
|
+
you want the value to exactly correspond to when the physical
|
799
|
+
index was last modified.
|
800
|
+
|
801
|
+
etagSeed="..." is an option you can change to force the ETag
|
802
|
+
header (and validation against If-None-Match requests) to be
|
803
|
+
different even if the index has not changed (ie: when making
|
804
|
+
significant changes to your config file)
|
805
|
+
|
806
|
+
(lastModifiedFrom and etagSeed are both ignored if you use
|
807
|
+
the never304="true" option)
|
808
|
+
-->
|
809
|
+
<!--
|
810
|
+
<httpCaching lastModifiedFrom="openTime"
|
811
|
+
etagSeed="Solr">
|
812
|
+
<cacheControl>max-age=30, public</cacheControl>
|
813
|
+
</httpCaching>
|
814
|
+
-->
|
815
|
+
</requestDispatcher>
|
816
|
+
|
817
|
+
<!-- Request Handlers
|
818
|
+
|
819
|
+
http://wiki.apache.org/solr/SolrRequestHandler
|
820
|
+
|
821
|
+
Incoming queries will be dispatched to a specific handler by name
|
822
|
+
based on the path specified in the request.
|
823
|
+
|
824
|
+
Legacy behavior: If the request path uses "/select" but no Request
|
825
|
+
Handler has that name, and if handleSelect="true" has been specified in
|
826
|
+
the requestDispatcher, then the Request Handler is dispatched based on
|
827
|
+
the qt parameter. Handlers without a leading '/' are accessed this way
|
828
|
+
like so: http://host/app/[core/]select?qt=name If no qt is
|
829
|
+
given, then the requestHandler that declares default="true" will be
|
830
|
+
used or the one named "standard".
|
831
|
+
|
832
|
+
If a Request Handler is declared with startup="lazy", then it will
|
833
|
+
not be initialized until the first request that uses it.
|
834
|
+
|
835
|
+
-->
|
836
|
+
<!-- SearchHandler
|
837
|
+
|
838
|
+
http://wiki.apache.org/solr/SearchHandler
|
839
|
+
|
840
|
+
For processing Search Queries, the primary Request Handler
|
841
|
+
provided with Solr is "SearchHandler" It delegates to a sequent
|
842
|
+
of SearchComponents (see below) and supports distributed
|
843
|
+
queries across multiple shards
|
844
|
+
-->
|
845
|
+
<requestHandler name="/old_select" class="solr.SearchHandler">
|
846
|
+
<!-- default values for query parameters can be specified, these
|
847
|
+
will be overridden by parameters in the request
|
848
|
+
-->
|
849
|
+
<lst name="defaults">
|
850
|
+
<str name="echoParams">explicit</str>
|
851
|
+
<int name="rows">10</int>
|
852
|
+
<str name="df">allfields</str>
|
853
|
+
</lst>
|
854
|
+
|
855
|
+
|
856
|
+
<!-- Dismax OR handler with AND boost -->
|
857
|
+
|
858
|
+
|
859
|
+
<!-- In addition to defaults, "appends" params can be specified
|
860
|
+
to identify values which should be appended to the list of
|
861
|
+
multi-val params from the query (or the existing "defaults").
|
862
|
+
-->
|
863
|
+
<!-- In this example, the param "fq=instock:true" would be appended to
|
864
|
+
any query time fq params the user may specify, as a mechanism for
|
865
|
+
partitioning the index, independent of any user selected filtering
|
866
|
+
that may also be desired (perhaps as a result of faceted searching).
|
867
|
+
|
868
|
+
NOTE: there is *absolutely* nothing a client can do to prevent these
|
869
|
+
"appends" values from being used, so don't use this mechanism
|
870
|
+
unless you are sure you always want it.
|
871
|
+
-->
|
872
|
+
<!--
|
873
|
+
<lst name="appends">
|
874
|
+
<str name="fq">inStock:true</str>
|
875
|
+
</lst>
|
876
|
+
-->
|
877
|
+
<!-- "invariants" are a way of letting the Solr maintainer lock down
|
878
|
+
the options available to Solr clients. Any params values
|
879
|
+
specified here are used regardless of what values may be specified
|
880
|
+
in either the query, the "defaults", or the "appends" params.
|
881
|
+
|
882
|
+
In this example, the facet.field and facet.query params would
|
883
|
+
be fixed, limiting the facets clients can use. Faceting is
|
884
|
+
not turned on by default - but if the client does specify
|
885
|
+
facet=true in the request, these are the only facets they
|
886
|
+
will be able to see counts for; regardless of what other
|
887
|
+
facet.field or facet.query params they may specify.
|
888
|
+
|
889
|
+
NOTE: there is *absolutely* nothing a client can do to prevent these
|
890
|
+
"invariants" values from being used, so don't use this mechanism
|
891
|
+
unless you are sure you always want it.
|
892
|
+
-->
|
893
|
+
<!--
|
894
|
+
<lst name="invariants">
|
895
|
+
<str name="facet.field">cat</str>
|
896
|
+
<str name="facet.field">manu_exact</str>
|
897
|
+
<str name="facet.query">price:[* TO 500]</str>
|
898
|
+
<str name="facet.query">price:[500 TO *]</str>
|
899
|
+
</lst>
|
900
|
+
-->
|
901
|
+
<!-- If the default list of SearchComponents is not desired, that
|
902
|
+
list can either be overridden completely, or components can be
|
903
|
+
prepended or appended to the default list. (see below)
|
904
|
+
-->
|
905
|
+
<!--
|
906
|
+
<arr name="components">
|
907
|
+
<str>nameOfCustomComponent1</str>
|
908
|
+
<str>nameOfCustomComponent2</str>
|
909
|
+
</arr>
|
910
|
+
-->
|
911
|
+
</requestHandler>
|
912
|
+
|
913
|
+
<!-- Blacklight-style single document handler -->
|
914
|
+
|
915
|
+
<!-- for requests to get a single document; use id=666 instead of q=id:666 -->
|
916
|
+
<requestHandler name="document" class="solr.SearchHandler">
|
917
|
+
<lst name="defaults">
|
918
|
+
<str name="echoParams">all</str>
|
919
|
+
<str name="fl">*</str>
|
920
|
+
<str name="rows">1</str>
|
921
|
+
<str name="wt">json</str>
|
922
|
+
<str name="q">{!raw f=id v=$id}</str>
|
923
|
+
<!-- use id=666 instead of q=id:666 -->
|
924
|
+
</lst>
|
925
|
+
</requestHandler>
|
926
|
+
|
927
|
+
<!-- Blacklight-style Query handler for the HT catalog dynamicField implementation -->
|
928
|
+
|
929
|
+
<requestHandler name="search" class="solr.SearchHandler" default="true">
|
930
|
+
<!-- default values for query parameters can be specified, these
|
931
|
+
will be overridden by parameters in the request
|
932
|
+
-->
|
933
|
+
<lst name="defaults">
|
934
|
+
<str name="defType">lucene</str>
|
935
|
+
|
936
|
+
<str name="fl">*,score</str>
|
937
|
+
<str name="echoParams">explicit</str>
|
938
|
+
<str name="wt">json</str>
|
939
|
+
<str name="indent">true</str>
|
940
|
+
<str name="fl">*,score</str>
|
941
|
+
<int name="rows">20</int>
|
942
|
+
|
943
|
+
<str name="df">id</str>
|
944
|
+
|
945
|
+
|
946
|
+
</lst>
|
947
|
+
</requestHandler>
|
948
|
+
|
949
|
+
|
950
|
+
<!-- realtime get handler, guaranteed to return the latest stored fields of
|
951
|
+
any document, without the need to commit or open a new searcher. The
|
952
|
+
current implementation relies on the updateLog feature being enabled.
|
953
|
+
|
954
|
+
** WARNING **
|
955
|
+
Do NOT disable the realtime get handler at /get if you are using
|
956
|
+
SolrCloud otherwise any leader election will cause a full sync in ALL
|
957
|
+
replicas for the shard in question. Similarly, a replica recovery will
|
958
|
+
also always fetch the complete index from the leader because a partial
|
959
|
+
sync will not be possible in the absence of this handler.
|
960
|
+
-->
|
961
|
+
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
962
|
+
<lst name="defaults">
|
963
|
+
<str name="omitHeader">true</str>
|
964
|
+
<str name="wt">json</str>
|
965
|
+
<str name="indent">true</str>
|
966
|
+
</lst>
|
967
|
+
</requestHandler>
|
968
|
+
|
969
|
+
|
970
|
+
<!-- Update Request Handler.
|
971
|
+
|
972
|
+
http://wiki.apache.org/solr/UpdateXmlMessages
|
973
|
+
|
974
|
+
The canonical Request Handler for Modifying the Index through
|
975
|
+
commands specified using XML, JSON, CSV, or JAVABIN
|
976
|
+
|
977
|
+
Note: Since solr1.1 requestHandlers requires a valid content
|
978
|
+
type header if posted in the body. For example, curl now
|
979
|
+
requires: -H 'Content-type:text/xml; charset=utf-8'
|
980
|
+
|
981
|
+
To override the request content type and force a specific
|
982
|
+
Content-type, use the request parameter:
|
983
|
+
?update.contentType=text/csv
|
984
|
+
|
985
|
+
This handler will pick a response format to match the input
|
986
|
+
if the 'wt' parameter is not explicit
|
987
|
+
-->
|
988
|
+
<requestHandler name="/update" class="solr.UpdateRequestHandler">
|
989
|
+
<!-- See below for information on defining
|
990
|
+
updateRequestProcessorChains that can be used by name
|
991
|
+
on each Update Request
|
992
|
+
-->
|
993
|
+
<!--
|
994
|
+
<lst name="defaults">
|
995
|
+
<str name="update.chain">dedupe</str>
|
996
|
+
</lst>
|
997
|
+
-->
|
998
|
+
</requestHandler>
|
999
|
+
|
1000
|
+
<!-- for back compat with clients using /update/json and /update/csv -->
|
1001
|
+
<requestHandler name="/update/json" class="solr.UpdateRequestHandler">
|
1002
|
+
<lst name="defaults">
|
1003
|
+
<str name="stream.contentType">application/json</str>
|
1004
|
+
<str name="wt">json</str>
|
1005
|
+
</lst>
|
1006
|
+
</requestHandler>
|
1007
|
+
<requestHandler name="/update/csv" class="solr.UpdateRequestHandler">
|
1008
|
+
<lst name="defaults">
|
1009
|
+
<str name="stream.contentType">application/csv</str>
|
1010
|
+
</lst>
|
1011
|
+
</requestHandler>
|
1012
|
+
|
1013
|
+
<!-- Solr Cell Update Request Handler
|
1014
|
+
|
1015
|
+
http://wiki.apache.org/solr/ExtractingRequestHandler
|
1016
|
+
|
1017
|
+
-->
|
1018
|
+
<requestHandler name="/update/extract"
|
1019
|
+
startup="lazy"
|
1020
|
+
class="solr.extraction.ExtractingRequestHandler">
|
1021
|
+
<lst name="defaults">
|
1022
|
+
<str name="lowernames">true</str>
|
1023
|
+
<str name="uprefix">ignored_</str>
|
1024
|
+
|
1025
|
+
<!-- capture link hrefs but ignore div attributes -->
|
1026
|
+
<str name="captureAttr">true</str>
|
1027
|
+
<str name="fmap.a">links</str>
|
1028
|
+
<str name="fmap.div">ignored_</str>
|
1029
|
+
</lst>
|
1030
|
+
</requestHandler>
|
1031
|
+
|
1032
|
+
|
1033
|
+
<!-- Field Analysis Request Handler
|
1034
|
+
|
1035
|
+
RequestHandler that provides much the same functionality as
|
1036
|
+
analysis.jsp. Provides the ability to specify multiple field
|
1037
|
+
types and field names in the same request and outputs
|
1038
|
+
index-time and query-time analysis for each of them.
|
1039
|
+
|
1040
|
+
Request parameters are:
|
1041
|
+
analysis.fieldname - field name whose analyzers are to be used
|
1042
|
+
|
1043
|
+
analysis.fieldtype - field type whose analyzers are to be used
|
1044
|
+
analysis.fieldvalue - text for index-time analysis
|
1045
|
+
q (or analysis.q) - text for query time analysis
|
1046
|
+
analysis.showmatch (true|false) - When set to true and when
|
1047
|
+
query analysis is performed, the produced tokens of the
|
1048
|
+
field value analysis will be marked as "matched" for every
|
1049
|
+
token that is produces by the query analysis
|
1050
|
+
-->
|
1051
|
+
<requestHandler name="/analysis/field"
|
1052
|
+
startup="lazy"
|
1053
|
+
class="solr.FieldAnalysisRequestHandler"/>
|
1054
|
+
|
1055
|
+
|
1056
|
+
<!-- Document Analysis Handler
|
1057
|
+
|
1058
|
+
http://wiki.apache.org/solr/AnalysisRequestHandler
|
1059
|
+
|
1060
|
+
An analysis handler that provides a breakdown of the analysis
|
1061
|
+
process of provided documents. This handler expects a (single)
|
1062
|
+
content stream with the following format:
|
1063
|
+
|
1064
|
+
<docs>
|
1065
|
+
<doc>
|
1066
|
+
<field name="id">1</field>
|
1067
|
+
<field name="name">The Name</field>
|
1068
|
+
<field name="text">The Text Value</field>
|
1069
|
+
</doc>
|
1070
|
+
<doc>...</doc>
|
1071
|
+
<doc>...</doc>
|
1072
|
+
...
|
1073
|
+
</docs>
|
1074
|
+
|
1075
|
+
Note: Each document must contain a field which serves as the
|
1076
|
+
unique key. This key is used in the returned response to associate
|
1077
|
+
an analysis breakdown to the analyzed document.
|
1078
|
+
|
1079
|
+
Like the FieldAnalysisRequestHandler, this handler also supports
|
1080
|
+
query analysis by sending either an "analysis.query" or "q"
|
1081
|
+
request parameter that holds the query text to be analyzed. It
|
1082
|
+
also supports the "analysis.showmatch" parameter which when set to
|
1083
|
+
true, all field tokens that match the query tokens will be marked
|
1084
|
+
as a "match".
|
1085
|
+
-->
|
1086
|
+
<requestHandler name="/analysis/document"
|
1087
|
+
class="solr.DocumentAnalysisRequestHandler"
|
1088
|
+
startup="lazy"/>
|
1089
|
+
|
1090
|
+
<!-- Admin Handlers
|
1091
|
+
|
1092
|
+
Admin Handlers - This will register all the standard admin
|
1093
|
+
RequestHandlers.
|
1094
|
+
-->
|
1095
|
+
<requestHandler name="/admin/"
|
1096
|
+
class="solr.admin.AdminHandlers"/>
|
1097
|
+
<!-- This single handler is equivalent to the following... -->
|
1098
|
+
<!--
|
1099
|
+
<requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
|
1100
|
+
<requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
|
1101
|
+
<requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
|
1102
|
+
<requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
|
1103
|
+
<requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
|
1104
|
+
<requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
|
1105
|
+
-->
|
1106
|
+
<!-- If you wish to hide files under ${solr.home}/conf, explicitly
|
1107
|
+
register the ShowFileRequestHandler using the definition below.
|
1108
|
+
NOTE: The glob pattern ('*') is the only pattern supported at present, *.xml will
|
1109
|
+
not exclude all files ending in '.xml'. Use it to exclude _all_ updates
|
1110
|
+
-->
|
1111
|
+
<!--
|
1112
|
+
<requestHandler name="/admin/file"
|
1113
|
+
class="solr.admin.ShowFileRequestHandler" >
|
1114
|
+
<lst name="invariants">
|
1115
|
+
<str name="hidden">synonyms.txt</str>
|
1116
|
+
<str name="hidden">anotherfile.txt</str>
|
1117
|
+
<str name="hidden">*</str>
|
1118
|
+
</lst>
|
1119
|
+
</requestHandler>
|
1120
|
+
-->
|
1121
|
+
|
1122
|
+
<!-- ping/healthcheck -->
|
1123
|
+
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
|
1124
|
+
<lst name="invariants">
|
1125
|
+
<str name="q">solrpingquery</str>
|
1126
|
+
</lst>
|
1127
|
+
<lst name="defaults">
|
1128
|
+
<str name="echoParams">all</str>
|
1129
|
+
</lst>
|
1130
|
+
<!-- An optional feature of the PingRequestHandler is to configure the
|
1131
|
+
handler with a "healthcheckFile" which can be used to enable/disable
|
1132
|
+
the PingRequestHandler.
|
1133
|
+
relative paths are resolved against the data dir
|
1134
|
+
-->
|
1135
|
+
<!-- <str name="healthcheckFile">server-enabled.txt</str> -->
|
1136
|
+
</requestHandler>
|
1137
|
+
|
1138
|
+
<!-- Echo the request contents back to the client -->
|
1139
|
+
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler">
|
1140
|
+
<lst name="defaults">
|
1141
|
+
<str name="echoParams">explicit</str>
|
1142
|
+
<str name="echoHandler">true</str>
|
1143
|
+
</lst>
|
1144
|
+
</requestHandler>
|
1145
|
+
|
1146
|
+
<!-- Solr Replication
|
1147
|
+
|
1148
|
+
The SolrReplicationHandler supports replicating indexes from a
|
1149
|
+
"master" used for indexing and "slaves" used for queries.
|
1150
|
+
|
1151
|
+
http://wiki.apache.org/solr/SolrReplication
|
1152
|
+
|
1153
|
+
It is also necessary for SolrCloud to function (in Cloud mode, the
|
1154
|
+
replication handler is used to bulk transfer segments when nodes
|
1155
|
+
are added or need to recover).
|
1156
|
+
|
1157
|
+
https://wiki.apache.org/solr/SolrCloud/
|
1158
|
+
-->
|
1159
|
+
<requestHandler name="/replication" class="solr.ReplicationHandler">
|
1160
|
+
<!--
|
1161
|
+
To enable simple master/slave replication, uncomment one of the
|
1162
|
+
sections below, depending on whether this solr instance should be
|
1163
|
+
the "master" or a "slave". If this instance is a "slave" you will
|
1164
|
+
also need to fill in the masterUrl to point to a real machine.
|
1165
|
+
-->
|
1166
|
+
<!--
|
1167
|
+
<lst name="master">
|
1168
|
+
<str name="replicateAfter">commit</str>
|
1169
|
+
<str name="replicateAfter">startup</str>
|
1170
|
+
<str name="confFiles">schema.xml,stopwords.txt</str>
|
1171
|
+
</lst>
|
1172
|
+
-->
|
1173
|
+
<!--
|
1174
|
+
<lst name="slave">
|
1175
|
+
<str name="masterUrl">http://your-master-hostname:8983/solr</str>
|
1176
|
+
<str name="pollInterval">00:00:60</str>
|
1177
|
+
</lst>
|
1178
|
+
-->
|
1179
|
+
</requestHandler>
|
1180
|
+
|
1181
|
+
<!-- Search Components
|
1182
|
+
|
1183
|
+
Search components are registered to SolrCore and used by
|
1184
|
+
instances of SearchHandler (which can access them by name)
|
1185
|
+
|
1186
|
+
By default, the following components are available:
|
1187
|
+
|
1188
|
+
<searchComponent name="query" class="solr.QueryComponent" />
|
1189
|
+
<searchComponent name="facet" class="solr.FacetComponent" />
|
1190
|
+
<searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
|
1191
|
+
<searchComponent name="highlight" class="solr.HighlightComponent" />
|
1192
|
+
<searchComponent name="stats" class="solr.StatsComponent" />
|
1193
|
+
<searchComponent name="debug" class="solr.DebugComponent" />
|
1194
|
+
|
1195
|
+
Default configuration in a requestHandler would look like:
|
1196
|
+
|
1197
|
+
<arr name="components">
|
1198
|
+
<str>query</str>
|
1199
|
+
<str>facet</str>
|
1200
|
+
<str>mlt</str>
|
1201
|
+
<str>highlight</str>
|
1202
|
+
<str>stats</str>
|
1203
|
+
<str>debug</str>
|
1204
|
+
</arr>
|
1205
|
+
|
1206
|
+
If you register a searchComponent to one of the standard names,
|
1207
|
+
that will be used instead of the default.
|
1208
|
+
|
1209
|
+
To insert components before or after the 'standard' components, use:
|
1210
|
+
|
1211
|
+
<arr name="first-components">
|
1212
|
+
<str>myFirstComponentName</str>
|
1213
|
+
</arr>
|
1214
|
+
|
1215
|
+
<arr name="last-components">
|
1216
|
+
<str>myLastComponentName</str>
|
1217
|
+
</arr>
|
1218
|
+
|
1219
|
+
NOTE: The component registered with the name "debug" will
|
1220
|
+
always be executed after the "last-components"
|
1221
|
+
|
1222
|
+
-->
|
1223
|
+
|
1224
|
+
<!-- Spell Check
|
1225
|
+
|
1226
|
+
The spell check component can return a list of alternative spelling
|
1227
|
+
suggestions.
|
1228
|
+
|
1229
|
+
http://wiki.apache.org/solr/SpellCheckComponent
|
1230
|
+
-->
|
1231
|
+
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
1232
|
+
|
1233
|
+
<str name="queryAnalyzerFieldType">text_general</str>
|
1234
|
+
|
1235
|
+
<!-- Multiple "Spell Checkers" can be declared and used by this
|
1236
|
+
component
|
1237
|
+
-->
|
1238
|
+
|
1239
|
+
<!-- a spellchecker built from a field of the main index -->
|
1240
|
+
<lst name="spellchecker">
|
1241
|
+
<str name="name">default</str>
|
1242
|
+
<str name="field">text</str>
|
1243
|
+
<str name="classname">solr.DirectSolrSpellChecker</str>
|
1244
|
+
<!-- the spellcheck distance measure used, the default is the internal levenshtein -->
|
1245
|
+
<str name="distanceMeasure">internal</str>
|
1246
|
+
<!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
|
1247
|
+
<float name="accuracy">0.5</float>
|
1248
|
+
<!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
|
1249
|
+
<int name="maxEdits">2</int>
|
1250
|
+
<!-- the minimum shared prefix when enumerating terms -->
|
1251
|
+
<int name="minPrefix">1</int>
|
1252
|
+
<!-- maximum number of inspections per result. -->
|
1253
|
+
<int name="maxInspections">5</int>
|
1254
|
+
<!-- minimum length of a query term to be considered for correction -->
|
1255
|
+
<int name="minQueryLength">4</int>
|
1256
|
+
<!-- maximum threshold of documents a query term can appear to be considered for correction -->
|
1257
|
+
<float name="maxQueryFrequency">0.01</float>
|
1258
|
+
<!-- uncomment this to require suggestions to occur in 1% of the documents
|
1259
|
+
<float name="thresholdTokenFrequency">.01</float>
|
1260
|
+
-->
|
1261
|
+
</lst>
|
1262
|
+
|
1263
|
+
<!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
|
1264
|
+
<lst name="spellchecker">
|
1265
|
+
<str name="name">wordbreak</str>
|
1266
|
+
<str name="classname">solr.WordBreakSolrSpellChecker</str>
|
1267
|
+
<str name="field">name</str>
|
1268
|
+
<str name="combineWords">true</str>
|
1269
|
+
<str name="breakWords">true</str>
|
1270
|
+
<int name="maxChanges">10</int>
|
1271
|
+
</lst>
|
1272
|
+
|
1273
|
+
<!-- a spellchecker that uses a different distance measure -->
|
1274
|
+
<!--
|
1275
|
+
<lst name="spellchecker">
|
1276
|
+
<str name="name">jarowinkler</str>
|
1277
|
+
<str name="field">spell</str>
|
1278
|
+
<str name="classname">solr.DirectSolrSpellChecker</str>
|
1279
|
+
<str name="distanceMeasure">
|
1280
|
+
org.apache.lucene.search.spell.JaroWinklerDistance
|
1281
|
+
</str>
|
1282
|
+
</lst>
|
1283
|
+
-->
|
1284
|
+
|
1285
|
+
<!-- a spellchecker that use an alternate comparator
|
1286
|
+
|
1287
|
+
comparatorClass be one of:
|
1288
|
+
1. score (default)
|
1289
|
+
2. freq (Frequency first, then score)
|
1290
|
+
3. A fully qualified class name
|
1291
|
+
-->
|
1292
|
+
<!--
|
1293
|
+
<lst name="spellchecker">
|
1294
|
+
<str name="name">freq</str>
|
1295
|
+
<str name="field">lowerfilt</str>
|
1296
|
+
<str name="classname">solr.DirectSolrSpellChecker</str>
|
1297
|
+
<str name="comparatorClass">freq</str>
|
1298
|
+
-->
|
1299
|
+
|
1300
|
+
<!-- A spellchecker that reads the list of words from a file -->
|
1301
|
+
<!--
|
1302
|
+
<lst name="spellchecker">
|
1303
|
+
<str name="classname">solr.FileBasedSpellChecker</str>
|
1304
|
+
<str name="name">file</str>
|
1305
|
+
<str name="sourceLocation">spellings.txt</str>
|
1306
|
+
<str name="characterEncoding">UTF-8</str>
|
1307
|
+
<str name="spellcheckIndexDir">spellcheckerFile</str>
|
1308
|
+
</lst>
|
1309
|
+
-->
|
1310
|
+
</searchComponent>
|
1311
|
+
|
1312
|
+
<!-- A request handler for demonstrating the spellcheck component.
|
1313
|
+
|
1314
|
+
NOTE: This is purely as an example. The whole purpose of the
|
1315
|
+
SpellCheckComponent is to hook it into the request handler that
|
1316
|
+
handles your normal user queries so that a separate request is
|
1317
|
+
not needed to get suggestions.
|
1318
|
+
|
1319
|
+
IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
|
1320
|
+
NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
|
1321
|
+
|
1322
|
+
See http://wiki.apache.org/solr/SpellCheckComponent for details
|
1323
|
+
on the request parameters.
|
1324
|
+
-->
|
1325
|
+
<requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
|
1326
|
+
<lst name="defaults">
|
1327
|
+
<str name="df">allfields</str>
|
1328
|
+
<!-- Solr will use suggestions from both the 'default' spellchecker
|
1329
|
+
and from the 'wordbreak' spellchecker and combine them.
|
1330
|
+
collations (re-written queries) can include a combination of
|
1331
|
+
corrections from both spellcheckers -->
|
1332
|
+
<str name="spellcheck.dictionary">default</str>
|
1333
|
+
<str name="spellcheck.dictionary">wordbreak</str>
|
1334
|
+
<str name="spellcheck">on</str>
|
1335
|
+
<str name="spellcheck.extendedResults">true</str>
|
1336
|
+
<str name="spellcheck.count">10</str>
|
1337
|
+
<str name="spellcheck.alternativeTermCount">5</str>
|
1338
|
+
<str name="spellcheck.maxResultsForSuggest">5</str>
|
1339
|
+
<str name="spellcheck.collate">true</str>
|
1340
|
+
<str name="spellcheck.collateExtendedResults">true</str>
|
1341
|
+
<str name="spellcheck.maxCollationTries">10</str>
|
1342
|
+
<str name="spellcheck.maxCollations">5</str>
|
1343
|
+
</lst>
|
1344
|
+
<arr name="last-components">
|
1345
|
+
<str>spellcheck</str>
|
1346
|
+
</arr>
|
1347
|
+
</requestHandler>
|
1348
|
+
|
1349
|
+
<searchComponent name="suggest" class="solr.SuggestComponent">
|
1350
|
+
<lst name="suggester">
|
1351
|
+
<str name="name">mySuggester</str>
|
1352
|
+
<str name="lookupImpl">FuzzyLookupFactory</str>
|
1353
|
+
<!-- org.apache.solr.spelling.suggest.fst -->
|
1354
|
+
<str name="dictionaryImpl">DocumentDictionaryFactory</str>
|
1355
|
+
<!-- org.apache.solr.spelling.suggest.HighFrequencyDictionaryFactory -->
|
1356
|
+
<str name="field">cat</str>
|
1357
|
+
<str name="weightField">price</str>
|
1358
|
+
<str name="suggestAnalyzerFieldType">string</str>
|
1359
|
+
</lst>
|
1360
|
+
</searchComponent>
|
1361
|
+
|
1362
|
+
<requestHandler name="/suggest" class="solr.SearchHandler"
|
1363
|
+
startup="lazy">
|
1364
|
+
<lst name="defaults">
|
1365
|
+
<str name="suggest">true</str>
|
1366
|
+
<str name="suggest.count">10</str>
|
1367
|
+
</lst>
|
1368
|
+
<arr name="components">
|
1369
|
+
<str>suggest</str>
|
1370
|
+
</arr>
|
1371
|
+
</requestHandler>
|
1372
|
+
<!-- Term Vector Component
|
1373
|
+
|
1374
|
+
http://wiki.apache.org/solr/TermVectorComponent
|
1375
|
+
-->
|
1376
|
+
<searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
|
1377
|
+
|
1378
|
+
<!-- A request handler for demonstrating the term vector component
|
1379
|
+
|
1380
|
+
This is purely as an example.
|
1381
|
+
|
1382
|
+
In reality you will likely want to add the component to your
|
1383
|
+
already specified request handlers.
|
1384
|
+
-->
|
1385
|
+
<requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
|
1386
|
+
<lst name="defaults">
|
1387
|
+
<str name="df">allfields</str>
|
1388
|
+
<bool name="tv">true</bool>
|
1389
|
+
</lst>
|
1390
|
+
<arr name="last-components">
|
1391
|
+
<str>tvComponent</str>
|
1392
|
+
</arr>
|
1393
|
+
</requestHandler>
|
1394
|
+
|
1395
|
+
<!-- Clustering Component
|
1396
|
+
|
1397
|
+
You'll need to set the solr.clustering.enabled system property
|
1398
|
+
when running solr to run with clustering enabled:
|
1399
|
+
|
1400
|
+
java -Dsolr.clustering.enabled=true -jar start.jar
|
1401
|
+
|
1402
|
+
http://wiki.apache.org/solr/ClusteringComponent
|
1403
|
+
http://carrot2.github.io/solr-integration-strategies/
|
1404
|
+
-->
|
1405
|
+
<searchComponent name="clustering"
|
1406
|
+
enable="${solr.clustering.enabled:false}"
|
1407
|
+
class="solr.clustering.ClusteringComponent">
|
1408
|
+
<lst name="engine">
|
1409
|
+
<str name="name">lingo</str>
|
1410
|
+
|
1411
|
+
<!-- Class name of a clustering algorithm compatible with the Carrot2 framework.
|
1412
|
+
|
1413
|
+
Currently available open source algorithms are:
|
1414
|
+
* org.carrot2.clustering.lingo.LingoClusteringAlgorithm
|
1415
|
+
* org.carrot2.clustering.stc.STCClusteringAlgorithm
|
1416
|
+
* org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
|
1417
|
+
|
1418
|
+
See http://project.carrot2.org/algorithms.html for more information.
|
1419
|
+
|
1420
|
+
A commercial algorithm Lingo3G (needs to be installed separately) is defined as:
|
1421
|
+
* com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm
|
1422
|
+
-->
|
1423
|
+
<str name="carrot.algorithm">
|
1424
|
+
org.carrot2.clustering.lingo.LingoClusteringAlgorithm
|
1425
|
+
</str>
|
1426
|
+
|
1427
|
+
<!-- Override location of the clustering algorithm's resources
|
1428
|
+
(attribute definitions and lexical resources).
|
1429
|
+
|
1430
|
+
A directory from which to load algorithm-specific stop words,
|
1431
|
+
stop labels and attribute definition XMLs.
|
1432
|
+
|
1433
|
+
For an overview of Carrot2 lexical resources, see:
|
1434
|
+
http://download.carrot2.org/head/manual/#chapter.lexical-resources
|
1435
|
+
|
1436
|
+
For an overview of Lingo3G lexical resources, see:
|
1437
|
+
http://download.carrotsearch.com/lingo3g/manual/#chapter.lexical-resources
|
1438
|
+
-->
|
1439
|
+
<str name="carrot.resourcesDir">clustering/carrot2</str>
|
1440
|
+
</lst>
|
1441
|
+
|
1442
|
+
<!-- An example definition for the STC clustering algorithm. -->
|
1443
|
+
<lst name="engine">
|
1444
|
+
<str name="name">stc</str>
|
1445
|
+
<str name="carrot.algorithm">
|
1446
|
+
org.carrot2.clustering.stc.STCClusteringAlgorithm
|
1447
|
+
</str>
|
1448
|
+
</lst>
|
1449
|
+
|
1450
|
+
<!-- An example definition for the bisecting kmeans clustering algorithm. -->
|
1451
|
+
<lst name="engine">
|
1452
|
+
<str name="name">kmeans</str>
|
1453
|
+
<str name="carrot.algorithm">
|
1454
|
+
org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
|
1455
|
+
</str>
|
1456
|
+
</lst>
|
1457
|
+
</searchComponent>
|
1458
|
+
|
1459
|
+
<!-- A request handler for demonstrating the clustering component
|
1460
|
+
|
1461
|
+
This is purely as an example.
|
1462
|
+
|
1463
|
+
In reality you will likely want to add the component to your
|
1464
|
+
already specified request handlers.
|
1465
|
+
-->
|
1466
|
+
<requestHandler name="/clustering"
|
1467
|
+
startup="lazy"
|
1468
|
+
enable="${solr.clustering.enabled:false}"
|
1469
|
+
class="solr.SearchHandler">
|
1470
|
+
<lst name="defaults">
|
1471
|
+
<bool name="clustering">true</bool>
|
1472
|
+
<bool name="clustering.results">true</bool>
|
1473
|
+
<!-- Field name with the logical "title" of a each document (optional) -->
|
1474
|
+
<str name="carrot.title">name</str>
|
1475
|
+
<!-- Field name with the logical "URL" of a each document (optional) -->
|
1476
|
+
<str name="carrot.url">id</str>
|
1477
|
+
<!-- Field name with the logical "content" of a each document (optional) -->
|
1478
|
+
<str name="carrot.snippet">features</str>
|
1479
|
+
<!-- Apply highlighter to the title/ content and use this for clustering. -->
|
1480
|
+
<bool name="carrot.produceSummary">true</bool>
|
1481
|
+
<!-- the maximum number of labels per cluster -->
|
1482
|
+
<!--<int name="carrot.numDescriptions">5</int>-->
|
1483
|
+
<!-- produce sub clusters -->
|
1484
|
+
<bool name="carrot.outputSubClusters">false</bool>
|
1485
|
+
|
1486
|
+
<!-- Configure the remaining request handler parameters. -->
|
1487
|
+
<str name="defType">edismax</str>
|
1488
|
+
<str name="qf">
|
1489
|
+
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1
|
1490
|
+
cat^1.4
|
1491
|
+
</str>
|
1492
|
+
<str name="q.alt">*:*</str>
|
1493
|
+
<str name="rows">10</str>
|
1494
|
+
<str name="fl">*,score</str>
|
1495
|
+
</lst>
|
1496
|
+
<arr name="last-components">
|
1497
|
+
<str>clustering</str>
|
1498
|
+
</arr>
|
1499
|
+
</requestHandler>
|
1500
|
+
|
1501
|
+
<!-- Terms Component
|
1502
|
+
|
1503
|
+
http://wiki.apache.org/solr/TermsComponent
|
1504
|
+
|
1505
|
+
A component to return terms and document frequency of those
|
1506
|
+
terms
|
1507
|
+
-->
|
1508
|
+
<searchComponent name="terms" class="solr.TermsComponent"/>
|
1509
|
+
|
1510
|
+
<!-- A request handler for demonstrating the terms component -->
|
1511
|
+
<requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
|
1512
|
+
<lst name="defaults">
|
1513
|
+
<bool name="terms">true</bool>
|
1514
|
+
<bool name="distrib">false</bool>
|
1515
|
+
</lst>
|
1516
|
+
<arr name="components">
|
1517
|
+
<str>terms</str>
|
1518
|
+
</arr>
|
1519
|
+
</requestHandler>
|
1520
|
+
|
1521
|
+
|
1522
|
+
<!-- Update Processors
|
1523
|
+
|
1524
|
+
Chains of Update Processor Factories for dealing with Update
|
1525
|
+
Requests can be declared, and then used by name in Update
|
1526
|
+
Request Processors
|
1527
|
+
|
1528
|
+
http://wiki.apache.org/solr/UpdateRequestProcessor
|
1529
|
+
|
1530
|
+
-->
|
1531
|
+
<!-- Deduplication
|
1532
|
+
|
1533
|
+
An example dedup update processor that creates the "id" field
|
1534
|
+
on the fly based on the hash code of some other fields. This
|
1535
|
+
example has overwriteDupes set to false since we are using the
|
1536
|
+
id field as the signatureField and Solr will maintain
|
1537
|
+
uniqueness based on that anyway.
|
1538
|
+
|
1539
|
+
-->
|
1540
|
+
<!--
|
1541
|
+
<updateRequestProcessorChain name="dedupe">
|
1542
|
+
<processor class="solr.processor.SignatureUpdateProcessorFactory">
|
1543
|
+
<bool name="enabled">true</bool>
|
1544
|
+
<str name="signatureField">id</str>
|
1545
|
+
<bool name="overwriteDupes">false</bool>
|
1546
|
+
<str name="fields">name,features,cat</str>
|
1547
|
+
<str name="signatureClass">solr.processor.Lookup3Signature</str>
|
1548
|
+
</processor>
|
1549
|
+
<processor class="solr.LogUpdateProcessorFactory" />
|
1550
|
+
<processor class="solr.RunUpdateProcessorFactory" />
|
1551
|
+
</updateRequestProcessorChain>
|
1552
|
+
-->
|
1553
|
+
|
1554
|
+
<!-- Language identification
|
1555
|
+
|
1556
|
+
This example update chain identifies the language of the incoming
|
1557
|
+
documents using the langid contrib. The detected language is
|
1558
|
+
written to field language_s. No field name mapping is done.
|
1559
|
+
The fields used for detection are text, title, subject and description,
|
1560
|
+
making this example suitable for detecting languages form full-text
|
1561
|
+
rich documents injected via ExtractingRequestHandler.
|
1562
|
+
See more about langId at http://wiki.apache.org/solr/LanguageDetection
|
1563
|
+
-->
|
1564
|
+
<!--
|
1565
|
+
<updateRequestProcessorChain name="langid">
|
1566
|
+
<processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
|
1567
|
+
<str name="langid.fl">text,title,subject,description</str>
|
1568
|
+
<str name="langid.langField">language_s</str>
|
1569
|
+
<str name="langid.fallback">en</str>
|
1570
|
+
</processor>
|
1571
|
+
<processor class="solr.LogUpdateProcessorFactory" />
|
1572
|
+
<processor class="solr.RunUpdateProcessorFactory" />
|
1573
|
+
</updateRequestProcessorChain>
|
1574
|
+
-->
|
1575
|
+
|
1576
|
+
<!-- Script update processor
|
1577
|
+
|
1578
|
+
This example hooks in an update processor implemented using JavaScript.
|
1579
|
+
|
1580
|
+
See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
|
1581
|
+
-->
|
1582
|
+
<!--
|
1583
|
+
<updateRequestProcessorChain name="script">
|
1584
|
+
<processor class="solr.StatelessScriptUpdateProcessorFactory">
|
1585
|
+
<str name="script">update-script.js</str>
|
1586
|
+
<lst name="params">
|
1587
|
+
<str name="config_param">example config parameter</str>
|
1588
|
+
</lst>
|
1589
|
+
</processor>
|
1590
|
+
<processor class="solr.RunUpdateProcessorFactory" />
|
1591
|
+
</updateRequestProcessorChain>
|
1592
|
+
-->
|
1593
|
+
|
1594
|
+
<!-- Response Writers
|
1595
|
+
|
1596
|
+
http://wiki.apache.org/solr/QueryResponseWriter
|
1597
|
+
|
1598
|
+
Request responses will be written using the writer specified by
|
1599
|
+
the 'wt' request parameter matching the name of a registered
|
1600
|
+
writer.
|
1601
|
+
|
1602
|
+
The "default" writer is the default and will be used if 'wt' is
|
1603
|
+
not specified in the request.
|
1604
|
+
-->
|
1605
|
+
<!-- The following response writers are implicitly configured unless
|
1606
|
+
overridden...
|
1607
|
+
-->
|
1608
|
+
<!--
|
1609
|
+
<queryResponseWriter name="xml"
|
1610
|
+
default="true"
|
1611
|
+
class="solr.XMLResponseWriter" />
|
1612
|
+
<queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
|
1613
|
+
<queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
|
1614
|
+
<queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
|
1615
|
+
<queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
|
1616
|
+
<queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
|
1617
|
+
<queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
|
1618
|
+
<queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
|
1619
|
+
-->
|
1620
|
+
|
1621
|
+
<queryResponseWriter name="json" default="true"
|
1622
|
+
class="solr.JSONResponseWriter">
|
1623
|
+
<!-- For the purposes of the tutorial, JSON responses are written as
|
1624
|
+
plain text so that they are easy to read in *any* browser.
|
1625
|
+
If you expect a MIME type of "application/json" just remove this override.
|
1626
|
+
-->
|
1627
|
+
<str name="content-type">text/plain; charset=UTF-8</str>
|
1628
|
+
</queryResponseWriter>
|
1629
|
+
|
1630
|
+
<!--
|
1631
|
+
Custom response writers can be declared as needed...
|
1632
|
+
-->
|
1633
|
+
<queryResponseWriter name="velocity" class="solr.VelocityResponseWriter"
|
1634
|
+
startup="lazy"/>
|
1635
|
+
|
1636
|
+
|
1637
|
+
<!-- XSLT response writer transforms the XML output by any xslt file found
|
1638
|
+
in Solr's conf/xslt directory. Changes to xslt files are checked for
|
1639
|
+
every xsltCacheLifetimeSeconds.
|
1640
|
+
-->
|
1641
|
+
<queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
|
1642
|
+
<int name="xsltCacheLifetimeSeconds">5</int>
|
1643
|
+
</queryResponseWriter>
|
1644
|
+
|
1645
|
+
<!-- Query Parsers
|
1646
|
+
|
1647
|
+
http://wiki.apache.org/solr/SolrQuerySyntax
|
1648
|
+
|
1649
|
+
Multiple QParserPlugins can be registered by name, and then
|
1650
|
+
used in either the "defType" param for the QueryComponent (used
|
1651
|
+
by SearchHandler) or in LocalParams
|
1652
|
+
-->
|
1653
|
+
<!-- example of registering a query parser -->
|
1654
|
+
<!--
|
1655
|
+
<queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
|
1656
|
+
-->
|
1657
|
+
|
1658
|
+
<!-- Function Parsers
|
1659
|
+
|
1660
|
+
http://wiki.apache.org/solr/FunctionQuery
|
1661
|
+
|
1662
|
+
Multiple ValueSourceParsers can be registered by name, and then
|
1663
|
+
used as function names when using the "func" QParser.
|
1664
|
+
-->
|
1665
|
+
<!-- example of registering a custom function parser -->
|
1666
|
+
<!--
|
1667
|
+
<valueSourceParser name="myfunc"
|
1668
|
+
class="com.mycompany.MyValueSourceParser" />
|
1669
|
+
-->
|
1670
|
+
|
1671
|
+
|
1672
|
+
<!-- Document Transformers
|
1673
|
+
http://wiki.apache.org/solr/DocTransformers
|
1674
|
+
-->
|
1675
|
+
<!--
|
1676
|
+
Could be something like:
|
1677
|
+
<transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
|
1678
|
+
<int name="connection">jdbc://....</int>
|
1679
|
+
</transformer>
|
1680
|
+
|
1681
|
+
To add a constant value to all docs, use:
|
1682
|
+
<transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
|
1683
|
+
<int name="value">5</int>
|
1684
|
+
</transformer>
|
1685
|
+
|
1686
|
+
If you want the user to still be able to change it with _value:something_ use this:
|
1687
|
+
<transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
|
1688
|
+
<double name="defaultValue">5</double>
|
1689
|
+
</transformer>
|
1690
|
+
|
1691
|
+
If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The
|
1692
|
+
EditorialMarkerFactory will do exactly that:
|
1693
|
+
<transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
|
1694
|
+
-->
|
1695
|
+
|
1696
|
+
|
1697
|
+
<!-- Legacy config for the admin interface -->
|
1698
|
+
<admin>
|
1699
|
+
<defaultQuery>*:*</defaultQuery>
|
1700
|
+
</admin>
|
1701
|
+
|
1702
|
+
</config>
|