Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8" ?>
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
	<xsl:output omit-xml-declaration="yes" indent="yes"/>
4

    
5
	<xsl:template match="/FIELDS">
6

    
7
		<xsl:param name="textFieldType" select="string('text_common')"/>
8
		<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'"/>
9
		<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
10

    
11
		<!--
12
		D-Net index schema template
13

    
14
		CHANGELOG
15

    
16
		0.1 : first release
17
		0.2 : added preserveOriginal="1" for text field type in the index analyzer and catenateWords="1" for the query analyzer
18
		0.3 : changed language for SnowballPorterFilterFactory to language="German2" (index/query) in the text field type
19
		0.4 : added solr.ASCIIFoldingFilterFactory filter (index/query) in the text field type
20
		0.5 : added long_keyword field type, to be used for objIdentifiers
21
		0.6 : added field types for spellchecking
22
		0.7 : added parameter for text field type
23
		0.8 : added field _version_, needed by Solr 4.0.0 for the transaction log
24
		0.9   : added type: text_en_splitting
25
		0.91  : added type: ngramtext
26
		0.92  : added schema optimizations, removing unnecessary stored fields
27
		0.93  : added attribute preserveOriginal="1" to fieldtype ngramtext (query analysis) to improve matches
28
		0.94  : updated and simplified ngramtext fieldtype
29
		0.95  : update to solr 4.4, removed attribute "compress" from field definition, ngramfield doesn't support NGramFilterFactory anymore
30
		0.96  : update to solr 4.9
31
		0.97  : introduced field type string_ci supporting case insensitivity.
32
		1.0   : updated to solr 7.2.0
33
		 -->
34
		<schema name="dnet" version="1.0">
35

    
36
			<!-- Valid attributes for fields:
37
			 name: mandatory - the name for the field
38
			 type: mandatory - the name of a field type from the
39
			   fieldTypes section
40
			 indexed: true if this field should be indexed (searchable or sortable)
41
			 stored: true if this field should be retrievable
42
			 docValues: true if this field should have doc values. Doc values are
43
			   useful (required, if you are using *Point fields) for faceting,
44
			   grouping, sorting and function queries. Doc values will make the index
45
			   faster to load, more NRT-friendly and more memory-efficient.
46
			   They however come with some limitations: they are currently only
47
			   supported by StrField, UUIDField, all Trie*Fields and *PointFields,
48
			   and depending on the field type, they might require the field to be
49
			   single-valued, be required or have a default value (check the
50
			   documentation of the field type you're interested in for more information)
51
			 multiValued: true if this field may contain multiple values per document
52
			 omitNorms: (expert) set to true to omit the norms associated with
53
			   this field (this disables length normalization and index-time
54
			   boosting for the field, and saves some memory).  Only full-text
55
			   fields or fields that need an index-time boost need norms.
56
			   Norms are omitted for primitive (non-analyzed) types by default.
57
			 termVectors: [false] set to true to store the term vector for a
58
			   given field.
59
			   When using MoreLikeThis, fields used for similarity should be
60
			   stored for best performance.
61
			 termPositions: Store position information with the term vector.
62
			   This will increase storage costs.
63
			 termOffsets: Store offset information with the term vector. This
64
			   will increase storage costs.
65
			 required: The field is required.  It will throw an error if the
66
			   value does not exist
67
			 default: a value that should be used if no value is specified
68
			   when adding a document.
69
			-->
70

    
71
			<!-- field names should consist of alphanumeric or underscore characters only and
72
			  not start with a digit.  This is not currently strictly enforced,
73
			  but other field names will not have first class support from all components
74
			  and back compatibility is not guaranteed.  Names with both leading and
75
			  trailing underscores (e.g. _version_) are reserved.
76
			-->
77

    
78
			<xsl:for-each select="./FIELD[@indexable = 'true' or @result = 'false']">
79
				<xsl:variable name="fieldname" select="translate(@name, $uppercase, $smallcase)"/>
80
				<xsl:variable name="fieldtype">
81
					<xsl:choose>
82
						<xsl:when test="@type"><xsl:value-of select="@type"/></xsl:when>
83
						<!-- this comment is here as a reference,
84
							once the MDFormat profile will be updated, remove the old type mappings
85

    
86
						<xsl:when test="@type='int'">pint</xsl:when>
87
						<xsl:when test="@type='date'">pdate</xsl:when>
88
						<xsl:when test="@type='ngramtext'">ngramtext</xsl:when>
89
						<xsl:when test="@type='string_ci'">string_ci</xsl:when>
90
						-->
91
						<xsl:when test="@tokenizable='false'">string</xsl:when>
92
						<xsl:otherwise>
93
							<xsl:value-of select="$textFieldType"/>
94
						</xsl:otherwise>
95
					</xsl:choose>
96
				</xsl:variable>
97
				<xsl:variable name="isMultivalued">
98
					<xsl:choose>
99
						<xsl:when test="@multivalued='false'">false</xsl:when>
100
						<xsl:otherwise>true</xsl:otherwise>
101
					</xsl:choose>
102
				</xsl:variable>
103
				<xsl:variable name="isStored">
104
					<xsl:choose>
105
						<xsl:when test="@stored='true'">true</xsl:when>
106
						<xsl:otherwise>false</xsl:otherwise>
107
					</xsl:choose>
108
				</xsl:variable>
109

    
110
				<field name="{$fieldname}" type="{$fieldtype}" indexed="{@indexable}" stored="{normalize-space($isStored)}" multiValued="{normalize-space($isMultivalued)}"/>
111
			</xsl:for-each>
112

    
113
			<field name="__indexrecordidentifier" type="string" indexed="true" stored="true" multiValued="false" required="true"/>
114

    
115
			<field name="__dsid" type="string" indexed="true" stored="true" omitNorms="true" omitTermFreqAndPositions="true"/>
116

    
117
			<field name="__dsversion" type="pdate" indexed="true" stored="true" omitNorms="true" omitTermFreqAndPositions="true"/>
118

    
119
			<field name="__result" type="string" indexed="false" stored="true" multiValued="false" docValues="false"/>
120

    
121
			<field name="__all" type="{$textFieldType}" indexed="true" stored="false" multiValued="true"/>
122

    
123
			<field name="_version_" type="long" indexed="true" stored="true" multiValued="false" />
124

    
125
			<field name="_root_" type="string" indexed="true" stored="false" docValues="false" />
126

    
127
			<!-- field for ping -->
128
			<field name="text" type="{$textFieldType}" indexed="false" stored="false"/>
129

    
130
			<!-- Field to use to determine and enforce document uniqueness.
131
				 Unless this field is marked with required="false", it will be a required field
132
			  -->
133
			<uniqueKey>__indexrecordidentifier</uniqueKey>
134

    
135
			<xsl:for-each select="./FIELD[(@type = 'ngramtext' or not(@type)) and not(@tokenizable = 'false')]">
136
				<xsl:variable name="fieldname" select="translate(@name, $uppercase, $smallcase)"/>
137
				<copyField source="{$fieldname}" dest="__all"/>
138
			</xsl:for-each>
139

    
140
			<!-- copyField commands copy one field to another at the time a document
141
			   is added to the index.  It's used either to index the same field differently,
142
			   or to add multiple fields to the same field for easier/faster searching.
143

    
144
			<copyField source="sourceFieldName" dest="destinationFieldName"/>
145
			-->
146

    
147
			<!-- field type definitions. The "name" attribute is
148
			   just a label to be used by field definitions.  The "class"
149
			   attribute and any other attributes determine the real
150
			   behavior of the fieldType.
151
				 Class names starting with "solr" refer to java classes in a
152
			   standard package such as org.apache.solr.analysis
153
			-->
154

    
155
			<!-- The StrField type is not analyzed, but indexed/stored verbatim.
156
			   It supports doc values but in that case the field needs to be
157
			   single-valued and either required or have a default value.
158
			  -->
159
			<fieldType name="string" class="solr.StrField" sortMissingLast="true" docValues="true" />
160
			<fieldType name="strings" class="solr.StrField" sortMissingLast="true" multiValued="true" docValues="true" />
161

    
162
			<!-- boolean type: "true" or "false" -->
163
			<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
164

    
165
			<fieldType name="booleans" class="solr.BoolField" sortMissingLast="true" multiValued="true"/>
166

    
167
			<!-- sortMissingLast and sortMissingFirst attributes are optional attributes are
168
				 currently supported on types that are sorted internally as strings
169
				 and on numeric types.
170
				 This includes "string","boolean", "int", "float", "long", "date", "double",
171
				 including the "Trie" and "Point" variants.
172
			   - If sortMissingLast="true", then a sort on this field will cause documents
173
				 without the field to come after documents with the field,
174
				 regardless of the requested sort order (asc or desc).
175
			   - If sortMissingFirst="true", then a sort on this field will cause documents
176
				 without the field to come before documents with the field,
177
				 regardless of the requested sort order.
178
			   - If sortMissingLast="false" and sortMissingFirst="false" (the default),
179
				 then default lucene sorting will be used which places docs without the
180
				 field first in an ascending sort and last in a descending sort.
181
			-->
182

    
183
			<!--
184
			  Numeric field types that index values using KD-trees. *Point fields are faster and more efficient than Trie* fields both, at
185
			  search time and at index time, but some features are still not supported.
186
			  Point fields don't support FieldCache, so they must have docValues="true" if needed for sorting, faceting, functions, etc.
187
			-->
188
			<fieldType name="pint" class="solr.IntPointField" docValues="true"/>
189
			<fieldType name="pfloat" class="solr.FloatPointField" docValues="true"/>
190
			<fieldType name="plong" class="solr.LongPointField" docValues="true"/>
191
			<fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>
192

    
193
			<fieldType name="pints" class="solr.IntPointField" docValues="true" multiValued="true"/>
194
			<fieldType name="pfloats" class="solr.FloatPointField" docValues="true" multiValued="true"/>
195
			<fieldType name="plongs" class="solr.LongPointField" docValues="true" multiValued="true"/>
196
			<fieldType name="pdoubles" class="solr.DoublePointField" docValues="true" multiValued="true"/>
197

    
198
			<!--
199
			  Default numeric field types. For faster range queries, consider *PointFields (pint/pfloat/plong/pdouble), or the
200
			  tint/tfloat/tlong/tdouble types.
201
			-->
202
			<fieldType name="int" class="solr.TrieIntField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
203
			<fieldType name="float" class="solr.TrieFloatField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
204
			<fieldType name="long" class="solr.TrieLongField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
205
			<fieldType name="double" class="solr.TrieDoubleField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
206

    
207
			<fieldType name="ints" class="solr.TrieIntField" docValues="true" precisionStep="0" positionIncrementGap="0" multiValued="true"/>
208
			<fieldType name="floats" class="solr.TrieFloatField" docValues="true" precisionStep="0" positionIncrementGap="0" multiValued="true"/>
209
			<fieldType name="longs" class="solr.TrieLongField" docValues="true" precisionStep="0" positionIncrementGap="0" multiValued="true"/>
210
			<fieldType name="doubles" class="solr.TrieDoubleField" docValues="true" precisionStep="0" positionIncrementGap="0" multiValued="true"/>
211

    
212
			<!--
213
			 Numeric field types that index each value at various levels of precision
214
			 to accelerate range queries when the number of values between the range
215
			 endpoints is large. See the javadoc for NumericRangeQuery for internal
216
			 implementation details.
217

    
218
			 Smaller precisionStep values (specified in bits) will lead to more tokens
219
			 indexed per value, slightly larger index size, and faster range queries.
220
			 A precisionStep of 0 disables indexing at different precision levels.
221

    
222
			 Consider using pint/pfloat/plong/pdouble instead of Trie* fields if possible
223
			-->
224
			<fieldType name="tint" class="solr.TrieIntField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
225
			<fieldType name="tfloat" class="solr.TrieFloatField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
226
			<fieldType name="tlong" class="solr.TrieLongField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
227
			<fieldType name="tdouble" class="solr.TrieDoubleField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
228

    
229
			<fieldType name="tints" class="solr.TrieIntField" docValues="true" precisionStep="8" positionIncrementGap="0" multiValued="true"/>
230
			<fieldType name="tfloats" class="solr.TrieFloatField" docValues="true" precisionStep="8" positionIncrementGap="0" multiValued="true"/>
231
			<fieldType name="tlongs" class="solr.TrieLongField" docValues="true" precisionStep="8" positionIncrementGap="0" multiValued="true"/>
232
			<fieldType name="tdoubles" class="solr.TrieDoubleField" docValues="true" precisionStep="8" positionIncrementGap="0" multiValued="true"/>
233

    
234
			<!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
235
				 is a more restricted form of the canonical representation of dateTime
236
				 http://www.w3.org/TR/xmlschema-2/#dateTime
237
				 The trailing "Z" designates UTC time and is mandatory.
238
				 Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
239
				 All other components are mandatory.
240

    
241
				 Expressions can also be used to denote calculations that should be
242
				 performed relative to "NOW" to determine the value, ie...
243

    
244
					   NOW/HOUR
245
						  ... Round to the start of the current hour
246
					   NOW-1DAY
247
						  ... Exactly 1 day prior to now
248
					   NOW/DAY+6MONTHS+3DAYS
249
						  ... 6 months and 3 days in the future from the start of
250
							  the current day
251

    
252
				 Consult the TrieDateField javadocs for more information.
253
			  -->
254
			<!-- KD-tree versions of date fields -->
255
			<fieldType name="pdate" class="solr.DatePointField" docValues="true"/>
256
			<fieldType name="pdates" class="solr.DatePointField" docValues="true" multiValued="true"/>
257

    
258
			<fieldType name="date" class="solr.TrieDateField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
259
			<fieldType name="dates" class="solr.TrieDateField" docValues="true" precisionStep="0" positionIncrementGap="0" multiValued="true"/>
260

    
261
			<fieldType name="tdate" class="solr.TrieDateField" docValues="true" precisionStep="6" positionIncrementGap="0"/>
262
			<fieldType name="tdates" class="solr.TrieDateField" docValues="true" precisionStep="6" positionIncrementGap="0" multiValued="true"/>
263

    
264

    
265
			<!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
266
			<fieldType name="binary" class="solr.BinaryField"/>
267

    
268
			<!-- The "RandomSortField" is not used to store or search any
269
				 data.  You can declare fields of this type it in your schema
270
				 to generate pseudo-random orderings of your docs for sorting
271
				 or function purposes.  The ordering is generated based on the field
272
				 name and the version of the index. As long as the index version
273
				 remains unchanged, and the same field name is reused,
274
				 the ordering of the docs will be consistent.
275
				 If you want different psuedo-random orderings of documents,
276
				 for the same version of the index, use a dynamicField and
277
				 change the field name in the request.
278
			 -->
279
			<fieldType name="random" class="solr.RandomSortField" indexed="true" />
280

    
281
			<!-- solr.TextField allows the specification of custom text analyzers
282
				 specified as a tokenizer and a list of token filters. Different
283
				 analyzers may be specified for indexing and querying.
284

    
285
				 The optional positionIncrementGap puts space between multiple fields of
286
				 this type on the same document, with the purpose of preventing false phrase
287
				 matching across fields.
288

    
289
				 For more info on customizing your analyzer chain, please see
290
				 http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
291
			 -->
292

    
293
			<!-- One can also specify an existing Analyzer class that has a
294
				 default constructor via the class attribute on the analyzer element.
295
				 Example:
296
			<fieldType name="text_greek" class="solr.TextField">
297
			  <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
298
			</fieldType>
299
			-->
300

    
301
			<!-- A text field that only splits on whitespace for exact matching of words -->
302
			<!-- <dynamicField name="*_ws" type="text_ws"  indexed="true"  stored="true"/> -->
303

    
304
			<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
305
				<analyzer>
306
					<tokenizer class="solr.WhitespaceTokenizerFactory"/>
307
				</analyzer>
308
			</fieldType>
309

    
310
			<fieldType name="ngramtext" class="solr.TextField">
311
				<analyzer type="index">
312
					<tokenizer class="solr.KeywordTokenizerFactory"/>
313
					<filter class="solr.LowerCaseFilterFactory"/>
314
					<filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="25"/>
315
					<filter class="solr.TrimFilterFactory"/>
316
					<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
317
				</analyzer>
318
				<analyzer type="query">
319
					<tokenizer class="solr.KeywordTokenizerFactory"/>
320
					<filter class="solr.LowerCaseFilterFactory"/>
321
				</analyzer>
322
			</fieldType>
323

    
324

    
325
			<fieldType name="personName" class="solr.TextField"  positionIncrementGap="100">
326
				<analyzer>
327
					<tokenizer class="solr.StandardTokenizerFactory" />
328
					<filter class="solr.LowerCaseFilterFactory" />
329
				</analyzer>
330
			</fieldType>
331

    
332
			<fieldType name="personNamePrefix" class="solr.TextField"  positionIncrementGap="100">
333
				<analyzer type="index">
334
					<tokenizer class="solr.StandardTokenizerFactory"/>
335
					<filter class="solr.LowerCaseFilterFactory" />
336
					<filter class="solr.NGramFilterFactory" minGramSize="1" maxGramSize="30" />
337
				</analyzer>
338
				<analyzer type="query">
339
					<tokenizer class="solr.StandardTokenizerFactory"/>
340
					<filter class="solr.LowerCaseFilterFactory" />
341
				</analyzer>
342
			</fieldType>
343

    
344

    
345
			<!-- A general text field that has reasonable, generic
346
				 cross-language defaults: it tokenizes with StandardTokenizer,
347
				   removes stop words from case-insensitive "stopwords.txt"
348
				   (empty by default), and down cases.  At query time only, it
349
				   also applies synonyms.
350
			  -->
351
			<fieldType name="text_common" class="solr.TextField" positionIncrementGap="100" multiValued="true">
352
				<analyzer type="index">
353
					<tokenizer class="solr.StandardTokenizerFactory"/>
354
					<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
355
					<!-- in this example, we will only use synonyms at query time
356
					<filter class="solr.SynonymGraphFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
357
					<filter class="solr.FlattenGraphFilterFactory"/>
358
					-->
359
					<filter class="solr.LowerCaseFilterFactory"/>
360
				</analyzer>
361
				<analyzer type="query">
362
					<tokenizer class="solr.StandardTokenizerFactory"/>
363
					<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
364
					<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
365
					<filter class="solr.LowerCaseFilterFactory"/>
366
				</analyzer>
367
			</fieldType>
368

    
369
			<!-- A text field with defaults appropriate for English: it
370
				 tokenizes with StandardTokenizer, removes English stop words
371
				 (stopwords_en.txt), down cases, protects words from protwords.txt, and
372
				 finally applies Porter's stemming.  The query time analyzer
373
				 also applies synonyms from synonyms.txt. -->
374
			<!-- <dynamicField name="*_txt_en" type="text_en"  indexed="true"  stored="true"/> -->
375

    
376
			<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
377
				<analyzer type="index">
378
					<tokenizer class="solr.StandardTokenizerFactory"/>
379
					<!-- in this example, we will only use synonyms at query time
380
					<filter class="solr.SynonymGraphFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
381
					<filter class="solr.FlattenGraphFilterFactory"/>
382
					-->
383
					<!-- Case insensitive stop word removal.
384
					-->
385
					<filter class="solr.StopFilterFactory"
386
					        ignoreCase="true"
387
					        words="stopwords.txt"
388
					/>
389
					<filter class="solr.LowerCaseFilterFactory"/>
390
					<filter class="solr.EnglishPossessiveFilterFactory"/>
391
					<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
392
					<!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
393
					<filter class="solr.EnglishMinimalStemFilterFactory"/>
394
					  -->
395
					<filter class="solr.PorterStemFilterFactory"/>
396
				</analyzer>
397
				<analyzer type="query">
398
					<tokenizer class="solr.StandardTokenizerFactory"/>
399
					<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
400
					<filter class="solr.StopFilterFactory"
401
					        ignoreCase="true"
402
					        words="stopwords.txt"
403
					/>
404
					<filter class="solr.LowerCaseFilterFactory"/>
405
					<filter class="solr.EnglishPossessiveFilterFactory"/>
406
					<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
407
					<!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
408
					<filter class="solr.EnglishMinimalStemFilterFactory"/>
409
					  -->
410
					<filter class="solr.PorterStemFilterFactory"/>
411
				</analyzer>
412
			</fieldType>
413

    
414
			<!-- A text field with defaults appropriate for English, plus
415
				 aggressive word-splitting and autophrase features enabled.
416
				 This field is just like text_en, except it adds
417
				 WordDelimiterGraphFilter to enable splitting and matching of
418
				 words on case-change, alpha numeric boundaries, and
419
				 non-alphanumeric chars.  This means certain compound word
420
				 cases will work, for example query "wi fi" will match
421
				 document "WiFi" or "wi-fi".
422
			-->
423
			<!-- <dynamicField name="*_txt_en_split" type="text_en_splitting"  indexed="true"  stored="true"/> -->
424
			<fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
425
				<analyzer type="index">
426
					<tokenizer class="solr.WhitespaceTokenizerFactory"/>
427
					<!-- in this example, we will only use synonyms at query time
428
					<filter class="solr.SynonymGraphFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
429
					-->
430
					<!-- Case insensitive stop word removal.
431
					-->
432
					<filter class="solr.StopFilterFactory"
433
					        ignoreCase="true"
434
					        words="stopwords.txt"
435
					/>
436
					<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
437
					<filter class="solr.LowerCaseFilterFactory"/>
438
					<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
439
					<filter class="solr.PorterStemFilterFactory"/>
440
					<filter class="solr.FlattenGraphFilterFactory" />
441
				</analyzer>
442
				<analyzer type="query">
443
					<tokenizer class="solr.WhitespaceTokenizerFactory"/>
444
					<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
445
					<filter class="solr.StopFilterFactory"
446
					        ignoreCase="true"
447
					        words="stopwords.txt"
448
					/>
449
					<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
450
					<filter class="solr.LowerCaseFilterFactory"/>
451
					<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
452
					<filter class="solr.PorterStemFilterFactory"/>
453
				</analyzer>
454
			</fieldType>
455

    
456
			<!-- Less flexible matching, but less false matches.  Probably not ideal for product names,
457
				 but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
458
			<!-- <dynamicField name="*_txt_en_split_tight" type="text_en_splitting_tight"  indexed="true"  stored="true"/> -->
459
			<fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
460
				<analyzer type="index">
461
					<tokenizer class="solr.WhitespaceTokenizerFactory"/>
462
					<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
463
					<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
464
					<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
465
					<filter class="solr.LowerCaseFilterFactory"/>
466
					<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
467
					<filter class="solr.EnglishMinimalStemFilterFactory"/>
468
					<!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
469
						 possible with WordDelimiterGraphFilter in conjuncton with stemming. -->
470
					<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
471
					<filter class="solr.FlattenGraphFilterFactory" />
472
				</analyzer>
473
				<analyzer type="query">
474
					<tokenizer class="solr.WhitespaceTokenizerFactory"/>
475
					<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
476
					<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
477
					<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
478
					<filter class="solr.LowerCaseFilterFactory"/>
479
					<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
480
					<filter class="solr.EnglishMinimalStemFilterFactory"/>
481
					<!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
482
						 possible with WordDelimiterGraphFilter in conjuncton with stemming. -->
483
					<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
484
				</analyzer>
485
			</fieldType>
486

    
487
			<!-- Just like text_common except it reverses the characters of
488
				   each token, to enable more efficient leading wildcard queries.
489
			-->
490
			<!-- <dynamicField name="*_txt_rev" type="text_common_rev"  indexed="true"  stored="true"/> -->
491
			<fieldType name="text_rev" class="solr.TextField" positionIncrementGap="100">
492
				<analyzer type="index">
493
					<tokenizer class="solr.StandardTokenizerFactory"/>
494
					<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
495
					<filter class="solr.LowerCaseFilterFactory"/>
496
					<filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
497
					        maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
498
				</analyzer>
499
				<analyzer type="query">
500
					<tokenizer class="solr.StandardTokenizerFactory"/>
501
					<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
502
					<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
503
					<filter class="solr.LowerCaseFilterFactory"/>
504
				</analyzer>
505
			</fieldType>
506

    
507
			<!-- <dynamicField name="*_phon_en" type="phonetic_en"  indexed="true"  stored="true"/> -->
508
			<fieldType name="phonetic_en" stored="false" indexed="true" class="solr.TextField" >
509
				<analyzer>
510
					<tokenizer class="solr.StandardTokenizerFactory"/>
511
					<filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
512
				</analyzer>
513
			</fieldType>
514

    
515
			<fieldType name="string_ci" class="solr.TextField" sortMissingLast="true" omitNorms="true">
516
				<analyzer type="query">
517
					<tokenizer class="solr.KeywordTokenizerFactory"/>
518
					<filter class="solr.LowerCaseFilterFactory"/>
519
				</analyzer>
520
			</fieldType>
521

    
522
			<!--
523
			  Example of using PathHierarchyTokenizerFactory at index time, so
524
			  queries for paths match documents at that path, or in descendent paths
525
			-->
526
			<!-- <dynamicField name="*_descendent_path" type="descendent_path"  indexed="true"  stored="true"/> -->
527
			<fieldType name="descendent_path" class="solr.TextField">
528
				<analyzer type="index">
529
					<tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
530
				</analyzer>
531
				<analyzer type="query">
532
					<tokenizer class="solr.KeywordTokenizerFactory" />
533
				</analyzer>
534
			</fieldType>
535

    
536
			<!--
537
			  Example of using PathHierarchyTokenizerFactory at query time, so
538
			  queries for paths match documents at that path, or in ancestor paths
539
			-->
540
			<!-- <dynamicField name="*_ancestor_path" type="ancestor_path"  indexed="true"  stored="true"/> -->
541
			<fieldType name="ancestor_path" class="solr.TextField">
542
				<analyzer type="index">
543
					<tokenizer class="solr.KeywordTokenizerFactory" />
544
				</analyzer>
545
				<analyzer type="query">
546
					<tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
547
				</analyzer>
548
			</fieldType>
549

    
550
			<!-- since fields of this type are by default not stored or indexed,
551
				 any data added to them will be ignored outright.  -->
552
			<fieldType name="ignored" stored="false" indexed="false" docValues="false" multiValued="true" class="solr.StrField" />
553

    
554
			<!-- This point type indexes the coordinates as separate fields (subFields)
555
			  If subFieldType is defined, it references a type, and a dynamic field
556
			  definition is created matching *___<typename>.  Alternately, if
557
			  subFieldSuffix is defined, that is used to create the subFields.
558
			  Example: if subFieldType="double", then the coordinates would be
559
				indexed in fields myloc_0___double,myloc_1___double.
560
			  Example: if subFieldSuffix="_d" then the coordinates would be indexed
561
				in fields myloc_0_d,myloc_1_d
562
			  The subFields are an implementation detail of the fieldType, and end
563
			  users normally should not need to know about them.
564
			 -->
565
			<!-- <dynamicField name="*_point" type="point"  indexed="true"  stored="true"/> -->
566
			<fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
567

    
568
			<!-- A specialized field for geospatial search filters and distance sorting. -->
569
			<fieldType name="location" class="solr.LatLonPointSpatialField" docValues="true"/>
570

    
571
			<!-- An alternative geospatial field type new to Solr 4.  It supports multiValued and polygon shapes.
572
			  For more information about this and other Spatial fields new to Solr 4, see:
573
			  http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
574
			-->
575
			<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
576
			           geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers" />
577

    
578
		</schema>
579
	</xsl:template>
580
</xsl:stylesheet>
(1-1/2)