-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.xml
388 lines (297 loc) · 20.8 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
<?xml version="1.0" encoding="UTF-8"?>
<schema name="Hydra" version="1.5">
<!-- NOTE: various comments and unused configuration possibilities have been purged
from this file. Please refer to http://wiki.apache.org/solr/SchemaXml,
as well as the default schema file included with Solr -->
<uniqueKey>id</uniqueKey>
<fields>
<field name="id" type="string" stored="true" indexed="true" multiValued="false" required="true"/>
<field name="format" type="string" stored="true" indexed="true" multiValued="true" />
<field name="_version_" type="long" indexed="true" stored="true"/>
<field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
<field name="lat" type="tdouble" stored="true" indexed="true" multiValued="false"/>
<field name="lng" type="tdouble" stored="true" indexed="true" multiValued="false"/>
<!-- NOTE: not all possible Solr field types are represented in the dynamic fields -->
<!-- text (_t...) -->
<dynamicField name="*_ti" type="text" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_tim" type="text" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_ts" type="text" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_tsm" type="text" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_tsi" type="text" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_tsim" type="text" stored="true" indexed="true" multiValued="true"/>
<dynamicField name="*_tiv" type="text" stored="false" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
<dynamicField name="*_timv" type="text" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
<dynamicField name="*_tsiv" type="text" stored="true" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
<dynamicField name="*_tsimv" type="text" stored="true" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
<!-- English text (_te...) -->
<dynamicField name="*_tei" type="text_en" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_teim" type="text_en" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_tes" type="text_en" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_tesm" type="text_en" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_tesi" type="text_en" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_tesim" type="text_en" stored="true" indexed="true" multiValued="true"/>
<dynamicField name="*_teiv" type="text_en" stored="false" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
<dynamicField name="*_teimv" type="text_en" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
<dynamicField name="*_tesiv" type="text_en" stored="true" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
<dynamicField name="*_tesimv" type="text_en" stored="true" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
<!-- string (_s...) -->
<dynamicField name="*_si" type="string" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_sim" type="string" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_ss" type="string" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_ssm" type="string" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_ssi" type="string" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_ssim" type="string" stored="true" indexed="true" multiValued="true"/>
<dynamicField name="*_ssort" type="alphaSort" stored="false" indexed="true" multiValued="false"/>
<!-- integer (_i...) -->
<dynamicField name="*_ii" type="int" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_iim" type="int" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_is" type="int" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_ism" type="int" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_isi" type="int" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_isim" type="int" stored="true" indexed="true" multiValued="true"/>
<!-- IntegerPointField (_it...) (for faster range queries) -->
<dynamicField name="*_iti" type="tint" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_itim" type="tint" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_its" type="tint" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_itsm" type="tint" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_itsi" type="tint" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_itsim" type="tint" stored="true" indexed="true" multiValued="true"/>
<!-- date (_dt...) -->
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z
Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z -->
<dynamicField name="*_dti" type="date" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_dtim" type="date" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_dts" type="date" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_dtsm" type="date" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_dtsi" type="date" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_dtsim" type="date" stored="true" indexed="true" multiValued="true"/>
<!-- DatePointField (_dtt...) (for faster range queries) -->
<dynamicField name="*_dtti" type="tdate" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_dttim" type="tdate" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_dtts" type="tdate" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_dttsm" type="tdate" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_dttsi" type="tdate" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_dttsim" type="tdate" stored="true" indexed="true" multiValued="true"/>
<!-- long (_l...) -->
<dynamicField name="*_li" type="long" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_lim" type="long" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_ls" type="long" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_lsm" type="long" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_lsi" type="long" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_lsim" type="long" stored="true" indexed="true" multiValued="true"/>
<!-- LongPointField (_lt...) (for faster range queries) -->
<dynamicField name="*_lti" type="tlong" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_ltim" type="tlong" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_lts" type="tlong" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_ltsm" type="tlong" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_ltsi" type="tlong" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_ltsim" type="tlong" stored="true" indexed="true" multiValued="true"/>
<!-- double (_db...) -->
<dynamicField name="*_dbi" type="double" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_dbim" type="double" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_dbs" type="double" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_dbsm" type="double" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_dbsi" type="double" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_dbsim" type="double" stored="true" indexed="true" multiValued="true"/>
<!-- DoublePointField (_dbt...) (for faster range queries) -->
<dynamicField name="*_dbti" type="tdouble" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_dbtim" type="tdouble" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_dbts" type="tdouble" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_dbtsm" type="tdouble" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_dbtsi" type="tdouble" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_dbtsim" type="tdouble" stored="true" indexed="true" multiValued="true"/>
<!-- float (_f...) -->
<dynamicField name="*_fi" type="float" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_fim" type="float" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_fs" type="float" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_fsm" type="float" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_fsi" type="float" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_fsim" type="float" stored="true" indexed="true" multiValued="true"/>
<!-- FloatPointField (_ft...) (for faster range queries) -->
<dynamicField name="*_fti" type="tfloat" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_ftim" type="tfloat" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_fts" type="tfloat" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_ftsm" type="tfloat" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_ftsi" type="tfloat" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_ftsim" type="tfloat" stored="true" indexed="true" multiValued="true"/>
<!-- boolean (_b...) -->
<dynamicField name="*_bi" type="boolean" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_bs" type="boolean" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_bsi" type="boolean" stored="true" indexed="true" multiValued="false"/>
<!-- Type used to index the lat and lon components for the "location" FieldType -->
<dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false" />
<!-- location (_ll...) -->
<dynamicField name="*_lli" type="location" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*_llim" type="location" stored="false" indexed="true" multiValued="true"/>
<dynamicField name="*_lls" type="location" stored="true" indexed="false" multiValued="false"/>
<dynamicField name="*_llsm" type="location" stored="true" indexed="false" multiValued="true"/>
<dynamicField name="*_llsi" type="location" stored="true" indexed="true" multiValued="false"/>
<dynamicField name="*_llsim" type="location" stored="true" indexed="true" multiValued="true"/>
<dynamicField name="*_srpt" type="location_rpt" stored="true" indexed="true" multiValued="true" />
<dynamicField name="*_bbox" type="bbox" stored="true" indexed="true" />
<!-- suggest and spelling -->
<dynamicField name="*spell" type="textSpell" indexed="true" stored="false" multiValued="true" />
<dynamicField name="*suggest" type="textSuggest" indexed="true" stored="false" multiValued="true" />
<!-- you must define copyField source and dest fields explicity or schemaBrowser doesn't work -->
<field name="all_text_timv" type="text" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
</fields>
<!-- Above, multiple source fields are copied to the [text] field.
Another way to map multiple source fields to the same
destination field is to use the dynamic field syntax.
copyField also supports a maxChars to copy setting. -->
<copyField source="*_tsim" dest="all_text_timv" maxChars="3000"/>
<copyField source="*_tesim" dest="all_text_timv" maxChars="3000"/>
<copyField source="*_ssim" dest="all_text_timv" maxChars="3000"/>
<copyField source="*_si" dest="all_text_timv" maxChars="3000"/>
<copyField source="*_tsim" dest="suggest"/>
<copyField source="*_tesim" dest="suggest"/>
<copyField source="*_ssim" dest="suggest"/>
<copyField source="*_si" dest="suggest"/>
<!-- TODO: Look into if these are actually being used. -->
<copyField source="*_tsim" dest="spell"/>
<copyField source="*_tesim" dest="spell"/>
<copyField source="*_ssim" dest="spell"/>
<copyField source="*_si" dest="spell"/>
<copyField source="creator_tsim" dest="creator_spell"/>
<copyField source="subject_ssim" dest="subject_spell"/>
<copyField source="title_tsim" dest="title_spell"/>
<types>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" />
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
<fieldType name="rand" class="solr.RandomSortField" omitNorms="true"/>
<!-- Default numeric field types. -->
<fieldType name="int" class="solr.IntPointField" docValues="true"/>
<fieldType name="float" class="solr.FloatPointField" docValues="true"/>
<fieldType name="long" class="solr.LongPointField" docValues="true"/>
<fieldType name="double" class="solr.DoublePointField" docValues="true"/>
<!-- PointField numeric field types for faster range queries -->
<fieldType name="tint" class="solr.IntPointField" docValues="true"/>
<fieldType name="tfloat" class="solr.FloatPointField" docValues="true"/>
<fieldType name="tlong" class="solr.LongPointField" docValues="true"/>
<fieldType name="tdouble" class="solr.DoublePointField" docValues="true"/>
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z
Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
-->
<fieldType name="date" class="solr.DatePointField" docValues="true"/>
<!-- A PointField based date field for faster date range queries and date faceting. -->
<fieldType name="tdate" class="solr.DatePointField" docValues="true"/>
<!-- This point type indexes the coordinates as separate fields (subFields)
If subFieldType is defined, it references a type, and a dynamic field
definition is created matching *___<typename>. Alternately, if
subFieldSuffix is defined, that is used to create the subFields.
Example: if subFieldType="double", then the coordinates would be
indexed in fields myloc_0___double,myloc_1___double.
Example: if subFieldSuffix="_d" then the coordinates would be indexed
in fields myloc_0_d,myloc_1_d
The subFields are an implementation detail of the fieldType, and end
users normally should not need to know about them.
-->
<fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
<!-- A specialized field for geospatial search filters and distance sorting. -->
<fieldType name="location" class="solr.LatLonPointSpatialField" docValues="true"/>
<!-- An alternative geospatial field type new to Solr 4. It supports multiValued and polygon shapes.
For more information about this and other Spatial fields new to Solr 4, see:
http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
-->
<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers"/>
<field name="bbox" type="bbox" />
<fieldType name="bbox" class="solr.BBoxField"
geo="true" distanceUnits="kilometers" numberType="_bbox_coord" storeSubFields="false"/>
<fieldType name="_bbox_coord" class="solr.DoublePointField" docValues="true" stored="false"/>
<fieldType name="text" class="solr.TextField" omitNorms="false">
<analyzer>
<tokenizer class="solr.ICUTokenizerFactory"/>
<filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
<filter class="solr.TrimFilterFactory"/>
</analyzer>
</fieldType>
<!-- A text field that only splits on whitespace for exact matching of words -->
<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.TrimFilterFactory"/>
</analyzer>
</fieldType>
<!-- single token analyzed text, for sorting. Punctuation is significant. -->
<fieldtype name="alphaSort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory" />
<filter class="solr.ICUFoldingFilterFactory"/>
<filter class="solr.TrimFilterFactory" />
</analyzer>
</fieldtype>
<!-- A text field with defaults appropriate for English -->
<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.ICUTokenizerFactory"/>
<filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
<filter class="solr.EnglishPossessiveFilterFactory"/>
<!-- EnglishMinimalStemFilterFactory is less aggressive than PorterStemFilterFactory: -->
<filter class="solr.EnglishMinimalStemFilterFactory"/>
<!--
<filter class="solr.PorterStemFilterFactory"/>
-->
<filter class="solr.TrimFilterFactory"/>
</analyzer>
</fieldType>
<!-- A text field with defaults appropriate for English an NGrams -->
<fieldType name="text_en_ng" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.ICUTokenizerFactory"/>
<filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
<filter class="solr.EnglishPossessiveFilterFactory"/>
<!-- EnglishMinimalStemFilterFactory is less aggressive than PorterStemFilterFactory: -->
<filter class="solr.EnglishMinimalStemFilterFactory"/>
<filter class="solr.TrimFilterFactory"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="15" />
</analyzer>
<analyzer type="index">
<tokenizer class="solr.ICUTokenizerFactory"/>
<filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
<filter class="solr.EnglishPossessiveFilterFactory"/>
<!-- EnglishMinimalStemFilterFactory is less aggressive than PorterStemFilterFactory: -->
<filter class="solr.EnglishMinimalStemFilterFactory"/>
<filter class="solr.TrimFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="pid_text" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
</analyzer>
</fieldType>
<fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100" >
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="textSuggest" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
<!-- queries for paths match documents at that path, or in descendent paths -->
<fieldType name="descendent_path" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory" />
</analyzer>
</fieldType>
<!-- queries for paths match documents at that path, or in ancestor paths -->
<fieldType name="ancestor_path" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
</analyzer>
</fieldType>
</types>
</schema>