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 6.6.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">
79
				<xsl:variable name="fieldname" select="translate(@name, $uppercase, $smallcase)"/>
80
				<xsl:variable name="fieldtype">
81
					<xsl:choose>
82
						<xsl:when test="@type='int'">pint</xsl:when>
83
						<xsl:when test="@type='date'">pdate</xsl:when>
84
						<xsl:when test="@type='ngramtext'">ngramtext</xsl:when>
85
						<xsl:when test="@type='string_ci'">string_ci</xsl:when>
86
						<xsl:when test="@tokenizable='false'">string</xsl:when>
87
						<xsl:otherwise>
88
							<xsl:value-of select="$textFieldType"/>
89
						</xsl:otherwise>
90
					</xsl:choose>
91
				</xsl:variable>
92
				<xsl:variable name="isMultivalued">
93
					<xsl:choose>
94
						<xsl:when test="@multivalued='false'">false</xsl:when>
95
						<xsl:otherwise>true</xsl:otherwise>
96
					</xsl:choose>
97
				</xsl:variable>
98
				<xsl:variable name="isStored">
99
					<xsl:choose>
100
						<xsl:when test="@stored='true'">true</xsl:when>
101
						<xsl:otherwise>false</xsl:otherwise>
102
					</xsl:choose>
103
				</xsl:variable>
104

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

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

    
110
			<field name="__deleted" type="boolean" indexed="true" stored="false" default="false" omitNorms="true" omitTermFreqAndPositions="true"/>
111

    
112
			<field name="__dsid" type="string" indexed="true" stored="true" omitNorms="true" omitTermFreqAndPositions="true"/>
113

    
114
			<field name="__dsversion" type="pdate" indexed="true" stored="true" omitNorms="true" omitTermFreqAndPositions="true"/>
115

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

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

    
120
			<field name="_version_" type="long" indexed="true" stored="true" multiValued="false" />
121

    
122
			<field name="_root_" type="string" indexed="true" stored="false" docValues="false" />
123

    
124
			<!-- field for ping -->
125
			<field name="text" type="{$textFieldType}" indexed="false" stored="false"/>
126

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

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

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

    
141
			<copyField source="sourceFieldName" dest="destinationFieldName"/>
142
			-->
143

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

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

    
159
			<!-- boolean type: "true" or "false" -->
160
			<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
161

    
162
			<fieldType name="booleans" class="solr.BoolField" sortMissingLast="true" multiValued="true"/>
163

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

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

    
190
			<fieldType name="pints" class="solr.IntPointField" docValues="true" multiValued="true"/>
191
			<fieldType name="pfloats" class="solr.FloatPointField" docValues="true" multiValued="true"/>
192
			<fieldType name="plongs" class="solr.LongPointField" docValues="true" multiValued="true"/>
193
			<fieldType name="pdoubles" class="solr.DoublePointField" docValues="true" multiValued="true"/>
194

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

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

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

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

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

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

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

    
238
				 Expressions can also be used to denote calculations that should be
239
				 performed relative to "NOW" to determine the value, ie...
240

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

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

    
255
			<fieldType name="date" class="solr.TrieDateField" docValues="true" precisionStep="0" positionIncrementGap="0"/>
256
			<fieldType name="dates" class="solr.TrieDateField" docValues="true" precisionStep="0" positionIncrementGap="0" multiValued="true"/>
257

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

    
261

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

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

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

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

    
286
				 For more info on customizing your analyzer chain, please see
287
				 http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
288
			 -->
289

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

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

    
301
			<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
302
				<analyzer>
303
					<tokenizer class="solr.WhitespaceTokenizerFactory"/>
304
				</analyzer>
305
			</fieldType>
306

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

    
321
			<!-- A general text field that has reasonable, generic
322
				 cross-language defaults: it tokenizes with StandardTokenizer,
323
				   removes stop words from case-insensitive "stopwords.txt"
324
				   (empty by default), and down cases.  At query time only, it
325
				   also applies synonyms.
326
			  -->
327
			<fieldType name="text_common" class="solr.TextField" positionIncrementGap="100" multiValued="true">
328
				<analyzer type="index">
329
					<tokenizer class="solr.StandardTokenizerFactory"/>
330
					<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
331
					<!-- in this example, we will only use synonyms at query time
332
					<filter class="solr.SynonymGraphFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
333
					<filter class="solr.FlattenGraphFilterFactory"/>
334
					-->
335
					<filter class="solr.LowerCaseFilterFactory"/>
336
				</analyzer>
337
				<analyzer type="query">
338
					<tokenizer class="solr.StandardTokenizerFactory"/>
339
					<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
340
					<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
341
					<filter class="solr.LowerCaseFilterFactory"/>
342
				</analyzer>
343
			</fieldType>
344

    
345
			<!-- A text field with defaults appropriate for English: it
346
				 tokenizes with StandardTokenizer, removes English stop words
347
				 (stopwords_en.txt), down cases, protects words from protwords.txt, and
348
				 finally applies Porter's stemming.  The query time analyzer
349
				 also applies synonyms from synonyms.txt. -->
350
			<!-- <dynamicField name="*_txt_en" type="text_en"  indexed="true"  stored="true"/> -->
351

    
352
			<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
353
				<analyzer type="index">
354
					<tokenizer class="solr.StandardTokenizerFactory"/>
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
					<!-- Case insensitive stop word removal.
360
					-->
361
					<filter class="solr.StopFilterFactory"
362
					        ignoreCase="true"
363
					        words="stopwords.txt"
364
					/>
365
					<filter class="solr.LowerCaseFilterFactory"/>
366
					<filter class="solr.EnglishPossessiveFilterFactory"/>
367
					<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
368
					<!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
369
					<filter class="solr.EnglishMinimalStemFilterFactory"/>
370
					  -->
371
					<filter class="solr.PorterStemFilterFactory"/>
372
				</analyzer>
373
				<analyzer type="query">
374
					<tokenizer class="solr.StandardTokenizerFactory"/>
375
					<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
376
					<filter class="solr.StopFilterFactory"
377
					        ignoreCase="true"
378
					        words="stopwords.txt"
379
					/>
380
					<filter class="solr.LowerCaseFilterFactory"/>
381
					<filter class="solr.EnglishPossessiveFilterFactory"/>
382
					<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
383
					<!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
384
					<filter class="solr.EnglishMinimalStemFilterFactory"/>
385
					  -->
386
					<filter class="solr.PorterStemFilterFactory"/>
387
				</analyzer>
388
			</fieldType>
389

    
390
			<!-- A text field with defaults appropriate for English, plus
391
				 aggressive word-splitting and autophrase features enabled.
392
				 This field is just like text_en, except it adds
393
				 WordDelimiterGraphFilter to enable splitting and matching of
394
				 words on case-change, alpha numeric boundaries, and
395
				 non-alphanumeric chars.  This means certain compound word
396
				 cases will work, for example query "wi fi" will match
397
				 document "WiFi" or "wi-fi".
398
			-->
399
			<!-- <dynamicField name="*_txt_en_split" type="text_en_splitting"  indexed="true"  stored="true"/> -->
400
			<fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
401
				<analyzer type="index">
402
					<tokenizer class="solr.WhitespaceTokenizerFactory"/>
403
					<!-- in this example, we will only use synonyms at query time
404
					<filter class="solr.SynonymGraphFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
405
					-->
406
					<!-- Case insensitive stop word removal.
407
					-->
408
					<filter class="solr.StopFilterFactory"
409
					        ignoreCase="true"
410
					        words="stopwords.txt"
411
					/>
412
					<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
413
					<filter class="solr.LowerCaseFilterFactory"/>
414
					<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
415
					<filter class="solr.PorterStemFilterFactory"/>
416
					<filter class="solr.FlattenGraphFilterFactory" />
417
				</analyzer>
418
				<analyzer type="query">
419
					<tokenizer class="solr.WhitespaceTokenizerFactory"/>
420
					<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
421
					<filter class="solr.StopFilterFactory"
422
					        ignoreCase="true"
423
					        words="stopwords.txt"
424
					/>
425
					<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
426
					<filter class="solr.LowerCaseFilterFactory"/>
427
					<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
428
					<filter class="solr.PorterStemFilterFactory"/>
429
				</analyzer>
430
			</fieldType>
431

    
432
			<!-- Less flexible matching, but less false matches.  Probably not ideal for product names,
433
				 but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
434
			<!-- <dynamicField name="*_txt_en_split_tight" type="text_en_splitting_tight"  indexed="true"  stored="true"/> -->
435
			<fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
436
				<analyzer type="index">
437
					<tokenizer class="solr.WhitespaceTokenizerFactory"/>
438
					<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
439
					<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
440
					<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
441
					<filter class="solr.LowerCaseFilterFactory"/>
442
					<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
443
					<filter class="solr.EnglishMinimalStemFilterFactory"/>
444
					<!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
445
						 possible with WordDelimiterGraphFilter in conjuncton with stemming. -->
446
					<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
447
					<filter class="solr.FlattenGraphFilterFactory" />
448
				</analyzer>
449
				<analyzer type="query">
450
					<tokenizer class="solr.WhitespaceTokenizerFactory"/>
451
					<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
452
					<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
453
					<filter class="solr.WordDelimiterGraphFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
454
					<filter class="solr.LowerCaseFilterFactory"/>
455
					<filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
456
					<filter class="solr.EnglishMinimalStemFilterFactory"/>
457
					<!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
458
						 possible with WordDelimiterGraphFilter in conjuncton with stemming. -->
459
					<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
460
				</analyzer>
461
			</fieldType>
462

    
463
			<!-- Just like text_common except it reverses the characters of
464
				   each token, to enable more efficient leading wildcard queries.
465
			-->
466
			<!-- <dynamicField name="*_txt_rev" type="text_common_rev"  indexed="true"  stored="true"/> -->
467
			<fieldType name="text_rev" class="solr.TextField" positionIncrementGap="100">
468
				<analyzer type="index">
469
					<tokenizer class="solr.StandardTokenizerFactory"/>
470
					<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
471
					<filter class="solr.LowerCaseFilterFactory"/>
472
					<filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
473
					        maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
474
				</analyzer>
475
				<analyzer type="query">
476
					<tokenizer class="solr.StandardTokenizerFactory"/>
477
					<filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
478
					<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
479
					<filter class="solr.LowerCaseFilterFactory"/>
480
				</analyzer>
481
			</fieldType>
482

    
483
			<!-- <dynamicField name="*_phon_en" type="phonetic_en"  indexed="true"  stored="true"/> -->
484
			<fieldType name="phonetic_en" stored="false" indexed="true" class="solr.TextField" >
485
				<analyzer>
486
					<tokenizer class="solr.StandardTokenizerFactory"/>
487
					<filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
488
				</analyzer>
489
			</fieldType>
490

    
491
			<!-- lowercases the entire field value, keeping it as a single token.  -->
492
			<!-- <dynamicField name="*_s_lower" type="lowercase"  indexed="true"  stored="true"/> -->
493
			<fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
494
				<analyzer>
495
					<tokenizer class="solr.KeywordTokenizerFactory" />
496
					<filter class="solr.LowerCaseFilterFactory" />
497
				</analyzer>
498
			</fieldType>
499

    
500
			<fieldType name="string_ci" class="solr.TextField" sortMissingLast="true" omitNorms="true">
501
				<analyzer type="query">
502
					<tokenizer class="solr.KeywordTokenizerFactory"/>
503
					<filter class="solr.LowerCaseFilterFactory"/>
504
				</analyzer>
505
			</fieldType>
506

    
507
			<!--
508
			  Example of using PathHierarchyTokenizerFactory at index time, so
509
			  queries for paths match documents at that path, or in descendent paths
510
			-->
511
			<!-- <dynamicField name="*_descendent_path" type="descendent_path"  indexed="true"  stored="true"/> -->
512
			<fieldType name="descendent_path" class="solr.TextField">
513
				<analyzer type="index">
514
					<tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
515
				</analyzer>
516
				<analyzer type="query">
517
					<tokenizer class="solr.KeywordTokenizerFactory" />
518
				</analyzer>
519
			</fieldType>
520

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

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

    
539
			<!-- This point type indexes the coordinates as separate fields (subFields)
540
			  If subFieldType is defined, it references a type, and a dynamic field
541
			  definition is created matching *___<typename>.  Alternately, if
542
			  subFieldSuffix is defined, that is used to create the subFields.
543
			  Example: if subFieldType="double", then the coordinates would be
544
				indexed in fields myloc_0___double,myloc_1___double.
545
			  Example: if subFieldSuffix="_d" then the coordinates would be indexed
546
				in fields myloc_0_d,myloc_1_d
547
			  The subFields are an implementation detail of the fieldType, and end
548
			  users normally should not need to know about them.
549
			 -->
550
			<!-- <dynamicField name="*_point" type="point"  indexed="true"  stored="true"/> -->
551
			<fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
552

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

    
556
			<!-- An alternative geospatial field type new to Solr 4.  It supports multiValued and polygon shapes.
557
			  For more information about this and other Spatial fields new to Solr 4, see:
558
			  http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
559
			-->
560
			<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
561
			           geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers" />
562

    
563
		</schema>
564
	</xsl:template>
565
</xsl:stylesheet>
(1-1/2)