-
Notifications
You must be signed in to change notification settings - Fork 2
/
solr-base.cfg
226 lines (206 loc) · 9.27 KB
/
solr-base.cfg
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
# Do not extend from this configuration directly.
# Extend one of:
# - solr.cfg
# - plone-development-solr.cfg
[solr]
# We cannot add a [buildout] secion in this file because it is
# an indirect, 3rd level extends and declaring a [buildout]
# part will break / reset values. Thanks buildout.
parts =
solr-download
solr-instance
# Increment this value, if you change solr related configs in this file.
# This makes the solr recipe detect a change and perform a reinstall.
config-version = 4
[solr-settings]
# port =
host = 127.0.0.1
base = /solr
solr-major-version = 4
solr-dist-version = 4.10.4
solr-dist-md5sum = 8ae107a760b3fc1ec7358a303886ca06
solr-cores = solr-default-plone-core
solr-default-core = solr-default-plone-core
# Do not move this to buildout:zcml-additional-fragments in this file
# because buildout is buggy when using += and nested extends.
zcml =
<configure xmlns:solr="http://namespaces.plone.org/solr">
<solr:connection host="${solr-settings:host}"
port="${solr-settings:port}"
base="${solr-settings:base}"/>
</configure>
[solr-download]
recipe = hexagonit.recipe.download
url = https://archive.apache.org/dist/lucene/solr/${solr-settings:solr-dist-version}/solr-${solr-settings:solr-dist-version}.tgz
md5sum = ${solr-settings:solr-dist-md5sum}
strip-top-level-dir = true
mode = 664
[solr-instance]
recipe = collective.recipe.solrinstance:mc
solr-location = ${solr-download:location}
host = ${solr-settings:host}
port = ${solr-settings:port}
basepath = ${solr-settings:base}
solr-version = ${solr-settings:solr-major-version}
# The config version is not used by the recipe but its purpose is to change
# the config of this buildout part so that it gets reinstalled when incremented.
config-version = ${solr:config-version}
java_opts =
-server
-Xms256M
-Xmx1024M
cores = ${solr-settings:solr-cores}
default-core-name = ${solr-settings:solr-default-core}
[solr-default-plone-core]
<= solr-core-template
[solr-core-template]
max-num-results = 1000
section-name = SOLR
unique-key = UID
logdir = ${buildout:directory}/var/solr
default-search-field = SearchableText
unique-key = UID
spellcheckField = SearchableText
default-operator = AND
updateLog = true
requestParsers-enableRemoteStreaming = true
solrconfig-shards =
extra-field-types =
<fieldType name="text_de" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.WordDelimiterFilterFactory"
splitOnCaseChange="1"
splitOnNumerics="1"
stemEnglishPossessive="1"
generateWordParts="1"
generateNumberParts="1"
catenateWords="1"
catenateNumbers="1"
catenateAll="0"
preserveOriginal="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
maxPosAsterisk="2" maxPosQuestion="1" minTrailing="2" maxFractionAsterisk="0"/>
</analyzer>
<analyzer type="query">
<charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.WordDelimiterFilterFactory"
splitOnCaseChange="1"
splitOnNumerics="1"
stemEnglishPossessive="1"
generateWordParts="1"
generateNumberParts="1"
catenateWords="0"
catenateNumbers="0"
catenateAll="0"
preserveOriginal="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="text_snippets" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
<!-- Field type for spell checking -->
<fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100" >
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
additional-solrconfig =
<!-- Request handler for search results with highlighting aka snippets -->
<requestHandler name="/hlsearch" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
<int name="rows">10</int>
<!-- spellchecker -->
<str name="spellcheck.dictionary">default</str>
<str name="spellcheck">on</str>
<str name="spellcheck.extendedResults">true</str>
<str name="spellcheck.count">10</str>
<str name="spellcheck.alternativeTermCount">5</str>
<str name="spellcheck.maxResultsForSuggest">5</str>
<str name="spellcheck.collate">true</str>
<str name="spellcheck.collateExtendedResults">true</str>
<str name="spellcheck.maxCollationTries">10</str>
<str name="spellcheck.maxCollations">5</str>
<!-- snippets (aka highlighting) -->
<bool name="hl">true</bool>
<bool name="hl.useFastVectorHighlighter">true</bool>
<str name="hl.fl">snippetText</str>
<int name="hl.fragsize">200</int>
<str name="hl.alternateField">snippetText</str>
<int name="hl.maxAlternateFieldLength">200</int>
<int name="hl.snippets">3</int>
<!-- facet queries -->
<str name="facet.query">modified:[NOW/DAY TO *]</str>
<str name="facet.query">modified:[NOW/DAY-1DAY TO NOW/DAY]</str>
<str name="facet.query">modified:[NOW/DAY-7DAYS TO *]</str>
<str name="facet.query">modified:[NOW/DAY-1MONTH TO *]</str>
<str name="facet.query">modified:[NOW/DAY-1YEAR TO *]</str>
<str name="facet.query">modified:[* TO NOW/DAY-1YEAR]</str>
<!-- distributed searching: include external sites -->
${:solrconfig-shards}
</lst>
<lst name="invariants">
<str name="fl">Creator Title Description modified portal_type path_string getIcon UID getRemoteUrl</str>
</lst>
<arr name="last-components">
<str>spellcheck</str>
</arr>
</requestHandler>
<!-- Request handler for Live Search.
Limit the returned fields to a minimum for maximum speed.-->
<requestHandler name="/livesearch" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
<int name="rows">1000</int>
</lst>
<lst name="invariants">
<str name="fl">Title Description portal_type path_string getIcon getRemoteUrl Type</str>
</lst>
</requestHandler>
index =
name:allowedRolesAndUsers type:string stored:true multivalued:true
name:created type:date stored:true
name:Creator type:string stored:true
name:Date type:date stored:true
name:Description type:text stored:true
name:effective type:date stored:true
name:exclude_from_nav type:boolean indexed:false stored:true
name:expires type:date stored:true
name:getIcon type:string indexed:false stored:true
name:getId type:string indexed:false stored:true
name:getRemoteUrl type:string indexed:false stored:true
name:is_folderish type:boolean stored:true
name:Language type:string stored:true
name:modified type:date stored:true
name:object_provides type:string stored:true multivalued:true
name:path_depth type:integer indexed:true stored:true
name:path_parents type:string indexed:true stored:true multivalued:true
name:path_string type:string indexed:true stored:true
name:portal_type type:string stored:true
name:review_state type:string stored:true
name:SearchableText type:text_de stored:true
name:searchwords type:string stored:true multivalued:true
name:showinsearch type:boolean stored:true
name:site_area type:string stored:true
name:site_section type:string stored:true
name:snippetText type:text_snippets stored:true termVectors:true termPositions:true termOffsets:true
name:Subject type:string stored:true multivalued:true
name:Title type:text stored:true
name:Type type:string stored:true
name:UID type:string stored:true required:true
name:crawler_site_id type:string stored:true
name:trashed type:boolean stored:true