-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.xml
421 lines (347 loc) · 17.9 KB
/
schema.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="exclusively" version="1.5">
<types>
<fieldType name="string" class="solr.StrField"
sortMissingLast="true" />
<fieldType name="boolean" class="solr.BoolField"
sortMissingLast="true" />
<fieldType name="int" class="solr.TrieIntField"
precisionStep="0" positionIncrementGap="0" />
<fieldType name="float" class="solr.TrieFloatField"
precisionStep="0" positionIncrementGap="0" />
<fieldType name="long" class="solr.TrieLongField"
precisionStep="0" positionIncrementGap="0" />
<fieldType name="double" class="solr.TrieDoubleField"
precisionStep="0" positionIncrementGap="0" />
<fieldType name="tint" class="solr.TrieIntField"
precisionStep="8" positionIncrementGap="0" />
<fieldType name="tfloat" class="solr.TrieFloatField"
precisionStep="8" positionIncrementGap="0" />
<fieldType name="tlong" class="solr.TrieLongField"
precisionStep="8" positionIncrementGap="0" />
<fieldType name="tdouble" class="solr.TrieDoubleField"
precisionStep="8" positionIncrementGap="0" />
<fieldType name="date" class="solr.TrieDateField"
precisionStep="0" positionIncrementGap="0" sortMissingLast="true" />
<!-- Doc value fields -->
<fieldType name="string_dv" class="solr.StrField"
sortMissingLast="true" omitNorms="true" omitTermFreqAndPositions="true"
docValues="true" />
<fieldType name="long_dv" class="solr.TrieLongField"
omitNorms="true" precisionStep="100" omitTermFreqAndPositions="true"
docValues="true" />
<fieldType name="float_dv" class="solr.TrieFloatField"
omitNorms="true" precisionStep="100" omitTermFreqAndPositions="true"
docValues="true" />
<fieldType name="float_rq_dv" class="solr.TrieFloatField"
omitNorms="true" docValues="true" />
<!-- A general text field that has reasonable, generic cross-language defaults:
it tokenizes with StandardTokenizer, removes stop words from case-insensitive
"stopwords.txt" (empty by default), and down cases. At query time only, it
also applies synonyms. -->
<fieldType name="text_general" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
<!-- in this example, we will only use synonyms at query time <filter
class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true"
expand="false"/> -->
<filter class="solr.LowerCaseFilterFactory" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true" />
<filter class="solr.LowerCaseFilterFactory" />
</analyzer>
</fieldType>
<!-- A text field with defaults appropriate for English: it tokenizes with
StandardTokenizer, removes English stop words (lang/stopwords_en.txt), down
cases, protects words from protwords.txt, and finally applies Porter's stemming.
The query time analyzer also applies synonyms from synonyms.txt. -->
<!-- <fieldType name="text_en" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory" />
in this example, we will only use synonyms at query time <filter
class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true"
expand="false"/>
Case insensitive stop word removal.
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="lang/stopwords_en.txt" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.EnglishPossessiveFilterFactory" />
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt" />
Optionally you may want to use this less aggressive stemmer instead
of PorterStemFilterFactory: <filter class="solr.EnglishMinimalStemFilterFactory"/>
<filter class="solr.PorterStemFilterFactory" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="lang/stopwords_en.txt" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.EnglishPossessiveFilterFactory" />
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt" />
Optionally you may want to use this less aggressive stemmer instead
of PorterStemFilterFactory: <filter class="solr.EnglishMinimalStemFilterFactory"/>
<filter class="solr.PorterStemFilterFactory" />
</analyzer>
</fieldType> -->
<!-- A text field with defaults appropriate for English, plus aggressive
word-splitting and autophrase features enabled. This field is just like text_en,
except it adds WordDelimiterFilter to enable splitting and matching of words
on case-change, alpha numeric boundaries, and non-alphanumeric chars. This
means certain compound word cases will work, for example query "wi fi" will
match document "WiFi" or "wi-fi". -->
<!-- <fieldType name="text_en_splitting" class="solr.TextField"
positionIncrementGap="100" autoGeneratePhraseQueries="true">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
in this example, we will only use synonyms at query time <filter
class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true"
expand="false"/>
Case insensitive stop word removal.
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="lang/stopwords_en.txt" />
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0" splitOnCaseChange="1" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt" />
<filter class="solr.PorterStemFilterFactory" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="lang/stopwords_en.txt" />
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
catenateNumbers="0" catenateAll="0" splitOnCaseChange="1" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt" />
<filter class="solr.PorterStemFilterFactory" />
</analyzer>
</fieldType> -->
<!-- Less flexible matching, but less false matches. Probably not ideal
for product names, but may be good for SKUs. Can insert dashes in the wrong
place and still match. -->
<fieldType name="text_en_splitting_tight" class="solr.TextField"
positionIncrementGap="100" autoGeneratePhraseQueries="true">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="false" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="lang/stopwords_en.txt" />
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="0" generateNumberParts="0" catenateWords="1"
catenateNumbers="1" catenateAll="0" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt" />
<filter class="solr.EnglishMinimalStemFilterFactory" />
<!-- this filter can remove any duplicate tokens that appear at the same
position - sometimes possible with WordDelimiterFilter in conjuncton with
stemming. -->
<filter class="solr.RemoveDuplicatesTokenFilterFactory" />
</analyzer>
</fieldType>
<!-- since fields of this type are by default not stored or indexed, any
data added to them will be ignored outright. -->
<fieldType name="ignored" stored="true" indexed="false"
multiValued="true" class="solr.StrField" />
<!-- Money/currency field type. See http://wiki.apache.org/solr/MoneyFieldType
Parameters: defaultCurrency: Specifies the default currency if none specified.
Defaults to "USD" precisionStep: Specifies the precisionStep for the TrieLong
field used for the amount providerClass: Lets you plug in other exchange
provider backend: solr.FileExchangeRateProvider is the default and takes
one parameter: currencyConfig: name of an xml file holding exchange rates
solr.OpenExchangeRatesOrgProvider uses rates from openexchangerates.org:
ratesFileLocation: URL or path to rates JSON file (default latest.json on
the web) refreshInterval: Number of minutes between each rates fetch (default:
1440, min: 60) -->
<fieldType name="currency" class="solr.CurrencyField"
precisionStep="8" defaultCurrency="USD" currencyConfig="currency.xml" />
<fieldType name="text_ws_sd" class="solr.TextField"
autoGeneratePhraseQueries="false" omitNorms="true">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt"
ignoreCase="true" expand="true" />
<!-- Case insensitive stop word removal. add enablePositionIncrements=true
in both the index and query analyzers to leave a 'gap' for more accurate
phrase queries. -->
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="1" splitOnCaseChange="1"
preserveOriginal="1" splitOnNumerics="0" />
<filter class="solr.LowerCaseFilterFactory" />
<!-- filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="25"
/ -->
<filter class="solr.KStemFilterFactory" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"
preserveOriginal="0" splitOnNumerics="0" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.KStemFilterFactory" />
</analyzer>
</fieldType>
<!-- <fieldType name="text_split" class="solr.TextField"
autoGeneratePhraseQueries="false" omitNorms="true">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt"
ignoreCase="true" expand="true" />
Case insensitive stop word removal. add enablePositionIncrements=true
in both the index and query analyzers to leave a 'gap' for more accurate
phrase queries.
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="1" splitOnCaseChange="1"
preserveOriginal="1" splitOnNumerics="1" />
<filter class="solr.LowerCaseFilterFactory" />
filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="25"
/
<filter class="solr.KStemFilterFactory" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
filter class="solr.WordDelimiterFilterFactory" generateWordParts="0"
generateNumberParts="0" catenateWords="0" catenateNumbers="0" catenateAll="0"
splitOnCaseChange="0" preserveOriginal="0" splitOnNumerics="0" /
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.KStemFilterFactory" />
</analyzer>
</fieldType> -->
<fieldType name="text_ws_ph" class="solr.TextField"
autoGeneratePhraseQueries="false" omitNorms="true">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms_ph.txt"
ignoreCase="true" expand="true" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0" splitOnCaseChange="1" />
<filter class="solr.LengthFilterFactory" min="2" max="100" />
<filter class="solr.LowerCaseFilterFactory" />
<!-- filter class="solr.PorterStemFilterFactory"/ -->
<filter class="solr.PhoneticFilterFactory" encoder="RefinedSoundex"
inject="false" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory" />
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"
preserveOriginal="0" />
<filter class="solr.LengthFilterFactory" min="2" max="100" />
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.PhoneticFilterFactory" encoder="RefinedSoundex"
inject="false" />
</analyzer>
</fieldType>
</types>
<fields>
<field name="_version_" type="long" indexed="true" stored="true" />
<field name="_root_" type="string" indexed="true" stored="true" />
<field name="_id" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
<field name="entity_id" type="string_dv" indexed="true" stored="true"
multiValued="false" />
<field name="pogId" type="string_dv" indexed="true" stored="true"
multiValued="false" />
<field name="sku" type="text_en_splitting_tight" indexed="true"
stored="true" omitNorms="true" />
<field name="name" type="text_ws_sd" indexed="true" stored="true" />
<field name="title" type="text_ws_sd" indexed="true" stored="true" />
<field name="designer_brand_name_label" type="string_dv"
indexed="true" stored="true" />
<field name="designer_brand_name_label_text" type="text_ws_sd"
indexed="true" stored="false" />
<field name="designer_brand_name_label_ph" type="text_ws_ph"
indexed="true" stored="false" omitNorms="true" />
<field name="product_type_all_label" type="string_dv" indexed="true"
stored="true" />
<field name="product_type_all_label_text" type="text_ws_sd"
indexed="true" stored="false" />
<field name="product_type_all_label_ph" type="text_ws_ph"
indexed="true" stored="false" omitNorms="true" />
<field name="floor_type_label" type="string_dv" indexed="true"
stored="true" />
<field name="floor_type_label_text" type="text_ws_sd" indexed="true"
stored="false" />
<field name="status" type="long" indexed="true" stored="true"
multiValued="false" />
<field name="visibility" type="long" indexed="true" stored="true"
multiValued="false" />
<field name="is_in_stock" type="long" indexed="true" stored="true"
multiValued="false" />
<field name="cod_availability" type="long" indexed="true"
stored="true" multiValued="false" />
<field name="color_label" type="string_dv" indexed="true"
stored="true" />
<field name="color_label_text" type="text_general" indexed="true"
stored="false" />
<field name="size_label" type="string_dv" indexed="true" stored="true"
multiValued="true" />
<field name="description" type="text_ws_sd" indexed="true"
stored="true" />
<field name="price" type="float_rq_dv" indexed="true" stored="true" />
<field name="discount" type="float_rq_dv" indexed="true" stored="true" />
<field name="discount_percent" type="float_dv" indexed="true"
stored="true" default="0" />
<field name="category_ids" type="long_dv" indexed="true" stored="true"
multiValued="true" />
<field name="category_names" type="text_ws_sd" indexed="true"
stored="true" multiValued="true" />
<copyField source="designer_brand_name_label" dest="designer_brand_name_label_ph" />
<copyField source="product_type_all_label" dest="product_type_all_label_ph" />
<copyField source="designer_brand_name_label" dest="designer_brand_name_label_text" />
<copyField source="product_type_all_label" dest="product_type_all_label_text" />
<copyField source="floor_type_label" dest="floor_type_label_text" />
<copyField source="color_label" dest="color_label_text" />
<field name="filters" type="text_ws_sd" indexed="true" stored="true"
multiValued="true" />
<dynamicField name="*_s" type="text_ws_sd" indexed="true"
stored="true" multiValued="true" />
<copyField source="*_s" dest="filters" />
<field name="creation_date" type="date" indexed="true" stored="true" />
<field name="popularity" type="float_rq_dv" indexed="true"
stored="true" />
<field name="rounded_price" type="float_rq_dv" indexed="true"
stored="true" />
<field name="last_modified" type="date" indexed="false" stored="true" />
<!-- debug fields -->
<field name="timestamp" type="date" indexed="true" stored="true"
default="NOW" />
</fields>
<uniqueKey>_id</uniqueKey>
</schema>