source: gs3-extensions/solr/trunk/src/conf/schema.xml.in

Last change on this file was 33368, checked in by kjdon, 5 years ago

sort fields cannot be multivalued. Facet fields need to be. SO have separated these. by* are for sorting, fc* are for facets

File size: 61.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8" ?>
2<!--
3 Licensed to the Apache Software Foundation (ASF) under one or more
4 contributor license agreements. See the NOTICE file distributed with
5 this work for additional information regarding copyright ownership.
6 The ASF licenses this file to You under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with
8 the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17-->
18
19<!--
20 This is the Solr schema file. This file should be named "schema.xml" and
21 should be in the conf directory under the solr home
22 (i.e. ./solr/conf/schema.xml by default)
23 or located where the classloader for the Solr webapp can find it.
24
25 This example schema is the recommended starting point for users.
26 It should be kept correct and concise, usable out-of-the-box.
27
28 For more information, on how to customize this file, please see
29 http://wiki.apache.org/solr/SchemaXml
30
31 PERFORMANCE NOTE: this schema includes many optional features and should not
32 be used for benchmarking. To improve performance one could
33 - set stored="false" for all fields possible (esp large fields) when you
34 only need to search on the field but don't need to return the original
35 value.
36 - set indexed="false" if you don't need to search on the field, but only
37 return the field as a result of searching on other indexed fields.
38 - remove all unneeded copyField statements
39 - for best index size and searching performance, set "index" to false
40 for all general text fields, use copyField to copy them to the
41 catchall "text" field, and use that for searching.
42 - For maximum indexing performance, use the StreamingUpdateSolrServer
43 java client.
44 - Remember to run the JVM in server mode, and use a higher logging level
45 that avoids logging every request
46-->
47
48<schema name="example" version="1.5">
49 <!-- attribute "name" is the name of this schema and is only used for display purposes.
50 version="x.y" is Solr's version number for the schema syntax and
51 semantics. It should not normally be changed by applications.
52
53 1.0: multiValued attribute did not exist, all fields are multiValued
54 by nature
55 1.1: multiValued attribute introduced, false by default
56 1.2: omitTermFreqAndPositions attribute introduced, true by default
57 except for text fields.
58 1.3: removed optional field compress feature
59 1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser
60 behavior when a single string produces multiple tokens. Defaults
61 to off for version >= 1.4
62 1.5: omitNorms defaults to true for primitive field types
63 (int, float, boolean, string...)
64 -->
65
66<fields>
67 <!-- Valid attributes for fields:
68 name: mandatory - the name for the field
69 type: mandatory - the name of a field type from the
70 <types> fieldType section
71 indexed: true if this field should be indexed (searchable or sortable)
72 stored: true if this field should be retrievable
73 docValues: true if this field should have doc values. Doc values are
74 useful for faceting, grouping, sorting and function queries. Although not
75 required, doc values will make the index faster to load, more
76 NRT-friendly and more memory-efficient. They however come with some
77 limitations: they are currently only supported by StrField, UUIDField
78 and all Trie*Fields, and depending on the field type, they might
79 require the field to be single-valued, be required or have a default
80 value (check the documentation of the field type you're interested in
81 for more information)
82 multiValued: true if this field may contain multiple values per document
83 omitNorms: (expert) set to true to omit the norms associated with
84 this field (this disables length normalization and index-time
85 boosting for the field, and saves some memory). Only full-text
86 fields or fields that need an index-time boost need norms.
87 Norms are omitted for primitive (non-analyzed) types by default.
88 termVectors: [false] set to true to store the term vector for a
89 given field.
90 When using MoreLikeThis, fields used for similarity should be
91 stored for best performance.
92 termPositions: Store position information with the term vector.
93 This will increase storage costs.
94 termOffsets: Store offset information with the term vector. This
95 will increase storage costs.
96 required: The field is required. It will throw an error if the
97 value does not exist
98 default: a value that should be used if no value is specified
99 when adding a document.
100 -->
101
102 <!-- field names should consist of alphanumeric or underscore characters only and
103 not start with a digit. This is not currently strictly enforced,
104 but other field names will not have first class support from all components
105 and back compatibility is not guaranteed. Names with both leading and
106 trailing underscores (e.g. _version_) are reserved.
107 -->
108
109 <!-- If you remove this field, you must _also_ disable the update log in solrconfig.xml
110 or Solr won't start. _version_ and update log are required for SolrCloud
111 -->
112
113 <field name="docOID" type="string" indexed="true" stored="true" required="true" />
114
115 <!-- ##GREENSTONE-FIELDS## -->
116
117
118 <field name="_version_" type="long" indexed="true" stored="true"/>
119
120 <!-- points to the root document of a block of nested documents. Required for nested
121 document support, may be removed otherwise
122 -->
123 <field name="_root_" type="string" indexed="true" stored="false"/>
124
125 <!-- Only remove the "id" field if you have a very good reason to. While not strictly
126 required, it is highly recommended. A <uniqueKey> is present in almost all Solr
127 installations. See the <uniqueKey> declaration below where <uniqueKey> is set to "id".
128 -->
129<!--
130 <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
131-->
132
133<!--
134 <field name="sku" type="text_en_splitting_tight" indexed="true" stored="true" omitNorms="true"/>
135 <field name="name" type="text_general" indexed="true" stored="true"/>
136 <field name="manu" type="text_general" indexed="true" stored="true" omitNorms="true"/>
137 <field name="cat" type="string" indexed="true" stored="true" multiValued="true"/>
138 <field name="features" type="text_general" indexed="true" stored="true" multiValued="true"/>
139 <field name="includes" type="text_general" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true" />
140
141 <field name="weight" type="float" indexed="true" stored="true"/>
142 <field name="price" type="float" indexed="true" stored="true"/>
143 <field name="popularity" type="int" indexed="true" stored="true" />
144 <field name="inStock" type="boolean" indexed="true" stored="true" />
145-->
146 <field name="store" type="location" indexed="true" stored="true"/>
147
148 <!-- Common metadata fields, named specifically to match up with
149 SolrCell metadata when parsing rich documents such as Word, PDF.
150 Some fields are multiValued only because Tika currently may return
151 multiple values for them. Some metadata is parsed from the documents,
152 but there are some which come from the client context:
153 "content_type": From the HTTP headers of incoming stream
154 "resourcename": From SolrCell request param resource.name
155 -->
156
157<!--
158 <field name="title" type="text_general" indexed="true" stored="true" multiValued="true"/>
159 <field name="subject" type="text_general" indexed="true" stored="true"/>
160 <field name="description" type="text_general" indexed="true" stored="true"/>
161 <field name="comments" type="text_general" indexed="true" stored="true"/>
162 <field name="author" type="text_general" indexed="true" stored="true"/>
163 <field name="keywords" type="text_general" indexed="true" stored="true"/>
164 <field name="category" type="text_general" indexed="true" stored="true"/>
165 <field name="resourcename" type="text_general" indexed="true" stored="true"/>
166 <field name="url" type="text_general" indexed="true" stored="true"/>
167 <field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/>
168 <field name="last_modified" type="date" indexed="true" stored="true"/>
169 <field name="links" type="string" indexed="true" stored="true" multiValued="true"/>
170-->
171
172 <!-- Main body of document extracted by SolrCell.
173 NOTE: This field is not indexed by default, since it is also copied to "text"
174 using copyField below. This is to save space. Use this field for returning and
175 highlighting document content. Use the "text" field to search the content. -->
176 <field name="content" type="text_general" indexed="false" stored="true" multiValued="true"/>
177
178
179 <!-- catchall field, containing all other searchable text fields (implemented
180 via copyField further on in this schema -->
181 <field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>
182
183 <!-- catchall text field that indexes tokens both normally and in reverse for efficient
184 leading wildcard queries. -->
185 <field name="text_rev" type="text_general_rev" indexed="true" stored="false" multiValued="true"/>
186
187 <!-- non-tokenized version of manufacturer to make it easier to sort or group
188 results by manufacturer. copied from "manu" via copyField -->
189 <field name="manu_exact" type="string" indexed="true" stored="false"/>
190
191 <field name="payloads" type="payloads" indexed="true" stored="true"/>
192
193
194 <!--
195 Some fields such as popularity and manu_exact could be modified to
196 leverage doc values:
197 <field name="popularity" type="int" indexed="true" stored="true" docValues="true" />
198 <field name="manu_exact" type="string" indexed="false" stored="false" docValues="true" />
199 <field name="cat" type="string" indexed="true" stored="true" docValues="true" multiValued="true"/>
200
201
202 Although it would make indexing slightly slower and the index bigger, it
203 would also make the index faster to load, more memory-efficient and more
204 NRT-friendly.
205 -->
206
207 <!-- Dynamic field definitions allow using convention over configuration
208 for fields via the specification of patterns to match field names.
209 EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i)
210 RESTRICTION: the glob-like pattern in the name attribute must have
211 a "*" only at the start or the end. -->
212
213 <dynamicField name="*_i" type="int" indexed="true" stored="true"/>
214 <dynamicField name="*_is" type="int" indexed="true" stored="true" multiValued="true"/>
215 <dynamicField name="*_s" type="string" indexed="true" stored="true" />
216 <dynamicField name="*_ss" type="string" indexed="true" stored="true" multiValued="true"/>
217 <dynamicField name="*_l" type="long" indexed="true" stored="true"/>
218 <dynamicField name="*_ls" type="long" indexed="true" stored="true" multiValued="true"/>
219 <dynamicField name="*_t" type="text_general" indexed="true" stored="true"/>
220 <dynamicField name="*_txt" type="text_general" indexed="true" stored="true" multiValued="true"/>
221 <dynamicField name="*_en" type="text_en" indexed="true" stored="true" multiValued="true"/>
222 <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
223 <dynamicField name="*_bs" type="boolean" indexed="true" stored="true" multiValued="true"/>
224 <dynamicField name="*_f" type="float" indexed="true" stored="true"/>
225 <dynamicField name="*_fs" type="float" indexed="true" stored="true" multiValued="true"/>
226 <dynamicField name="*_d" type="double" indexed="true" stored="true"/>
227 <dynamicField name="*_ds" type="double" indexed="true" stored="true" multiValued="true"/>
228
229 <!-- Type used to index the lat and lon components for the "location" FieldType -->
230 <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false" />
231
232 <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
233 <dynamicField name="*_dts" type="date" indexed="true" stored="true" multiValued="true"/>
234 <dynamicField name="*_p" type="location" indexed="true" stored="true"/>
235
236 <!-- some trie-coded dynamic fields for faster range queries -->
237 <dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>
238 <dynamicField name="*_tl" type="tlong" indexed="true" stored="true"/>
239 <dynamicField name="*_tf" type="tfloat" indexed="true" stored="true"/>
240 <dynamicField name="*_td" type="tdouble" indexed="true" stored="true"/>
241 <dynamicField name="*_tdt" type="tdate" indexed="true" stored="true"/>
242
243 <dynamicField name="*_pi" type="pint" indexed="true" stored="true"/>
244 <dynamicField name="*_c" type="currency" indexed="true" stored="true"/>
245
246 <dynamicField name="ignored_*" type="ignored" multiValued="true"/>
247 <dynamicField name="attr_*" type="text_general" indexed="true" stored="true" multiValued="true"/>
248
249 <dynamicField name="random_*" type="random" />
250
251 <!-- dynamic field for sort/facet fields, which are strings by default. ie not tokenised -->
252 <dynamicField name="by*" type="string" indexed="true" stored="false" multiValued="false" />
253 <dynamicField name="fc*" type="string" indexed="true" stored="false" multiValued="true" />
254
255 <!-- uncomment the following to ignore any fields that don't already match an existing
256 field name or dynamic field, rather than reporting them as an error.
257 alternately, change the type="ignored" to some other type e.g. "text" if you want
258 unknown fields indexed and/or stored by default -->
259 <!--dynamicField name="*" type="ignored" multiValued="true" /-->
260
261 </fields>
262
263
264 <!-- Field to use to determine and enforce document uniqueness.
265 Unless this field is marked with required="false", it will be a required field
266 -->
267 <uniqueKey>docOID</uniqueKey>
268
269 <!-- DEPRECATED: The defaultSearchField is consulted by various query parsers when
270 parsing a query string that isn't explicit about the field. Machine (non-user)
271 generated queries are best made explicit, or they can use the "df" request parameter
272 which takes precedence over this.
273 Note: Un-commenting defaultSearchField will be insufficient if your request handler
274 in solrconfig.xml defines "df", which takes precedence. That would need to be removed.
275 <defaultSearchField>text</defaultSearchField> -->
276
277 <!-- DEPRECATED: The defaultOperator (AND|OR) is consulted by various query parsers
278 when parsing a query string to determine if a clause of the query should be marked as
279 required or optional, assuming the clause isn't already marked by some operator.
280 The default is OR, which is generally assumed so it is not a good idea to change it
281 globally here. The "q.op" request parameter takes precedence over this.
282 <solrQueryParser defaultOperator="OR"/> -->
283
284 <!-- copyField commands copy one field to another at the time a document
285 is added to the index. It's used either to index the same field differently,
286 or to add multiple fields to the same field for easier/faster searching. -->
287<!--
288 <copyField source="cat" dest="text"/>
289 <copyField source="name" dest="text"/>
290 <copyField source="manu" dest="text"/>
291 <copyField source="features" dest="text"/>
292 <copyField source="includes" dest="text"/>
293 <copyField source="manu" dest="manu_exact"/>
294-->
295
296 <!-- Copy the price into a currency enabled field (default USD) -->
297<!--
298 <copyField source="price" dest="price_c"/>
299-->
300
301 <!-- Text fields from SolrCell to search by default in our catch-all field -->
302<!--
303 <copyField source="title" dest="text"/>
304 <copyField source="author" dest="text"/>
305 <copyField source="description" dest="text"/>
306 <copyField source="keywords" dest="text"/>
307 <copyField source="content" dest="text"/>
308 <copyField source="content_type" dest="text"/>
309 <copyField source="resourcename" dest="text"/>
310 <copyField source="url" dest="text"/>
311-->
312
313 <!-- Create a string version of author for faceting -->
314<!--
315 <copyField source="author" dest="author_s"/>
316-->
317
318 <!-- Above, multiple source fields are copied to the [text] field.
319 Another way to map multiple source fields to the same
320 destination field is to use the dynamic field syntax.
321 copyField also supports a maxChars to copy setting. -->
322
323 <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->
324
325 <!-- copy name to alphaNameSort, a field designed for sorting by name -->
326 <!-- <copyField source="name" dest="alphaNameSort"/> -->
327
328 <types>
329 <!-- field type definitions. The "name" attribute is
330 just a label to be used by field definitions. The "class"
331 attribute and any other attributes determine the real
332 behavior of the fieldType.
333 Class names starting with "solr" refer to java classes in a
334 standard package such as org.apache.solr.analysis
335 -->
336
337 <!-- The StrField type is not analyzed, but indexed/stored verbatim.
338 It supports doc values but in that case the field needs to be
339 single-valued and either required or have a default value.
340 -->
341 <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
342
343 <!-- boolean type: "true" or "false" -->
344 <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
345
346 <!-- sortMissingLast and sortMissingFirst attributes are optional attributes are
347 currently supported on types that are sorted internally as strings
348 and on numeric types.
349 This includes "string","boolean", and, as of 3.5 (and 4.x),
350 int, float, long, date, double, including the "Trie" variants.
351 - If sortMissingLast="true", then a sort on this field will cause documents
352 without the field to come after documents with the field,
353 regardless of the requested sort order (asc or desc).
354 - If sortMissingFirst="true", then a sort on this field will cause documents
355 without the field to come before documents with the field,
356 regardless of the requested sort order.
357 - If sortMissingLast="false" and sortMissingFirst="false" (the default),
358 then default lucene sorting will be used which places docs without the
359 field first in an ascending sort and last in a descending sort.
360 -->
361
362 <!--
363 Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
364
365 These fields support doc values, but they require the field to be
366 single-valued and either be required or have a default value.
367 -->
368 <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
369 <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>
370 <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
371 <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>
372
373 <!--
374 Numeric field types that index each value at various levels of precision
375 to accelerate range queries when the number of values between the range
376 endpoints is large. See the javadoc for NumericRangeQuery for internal
377 implementation details.
378
379 Smaller precisionStep values (specified in bits) will lead to more tokens
380 indexed per value, slightly larger index size, and faster range queries.
381 A precisionStep of 0 disables indexing at different precision levels.
382 -->
383 <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>
384 <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>
385 <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>
386 <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>
387
388 <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
389 is a more restricted form of the canonical representation of dateTime
390 http://www.w3.org/TR/xmlschema-2/#dateTime
391 The trailing "Z" designates UTC time and is mandatory.
392 Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
393 All other components are mandatory.
394
395 Expressions can also be used to denote calculations that should be
396 performed relative to "NOW" to determine the value, ie...
397
398 NOW/HOUR
399 ... Round to the start of the current hour
400 NOW-1DAY
401 ... Exactly 1 day prior to now
402 NOW/DAY+6MONTHS+3DAYS
403 ... 6 months and 3 days in the future from the start of
404 the current day
405
406 Consult the DateField javadocs for more information.
407
408 Note: For faster range queries, consider the tdate type
409 -->
410 <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
411
412 <!-- A Trie based date field for faster date range queries and date faceting. -->
413 <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
414
415
416 <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
417 <fieldtype name="binary" class="solr.BinaryField"/>
418
419 <!--
420 Note:
421 These should only be used for compatibility with existing indexes (created with lucene or older Solr versions).
422 Use Trie based fields instead. As of Solr 3.5 and 4.x, Trie based fields support sortMissingFirst/Last
423
424 Plain numeric field types that store and index the text
425 value verbatim (and hence don't correctly support range queries, since the
426 lexicographic ordering isn't equal to the numeric ordering)
427 -->
428 <fieldType name="pint" class="solr.IntField"/>
429 <fieldType name="plong" class="solr.LongField"/>
430 <fieldType name="pfloat" class="solr.FloatField"/>
431 <fieldType name="pdouble" class="solr.DoubleField"/>
432 <fieldType name="pdate" class="solr.DateField" sortMissingLast="true"/>
433
434 <!-- The "RandomSortField" is not used to store or search any
435 data. You can declare fields of this type it in your schema
436 to generate pseudo-random orderings of your docs for sorting
437 or function purposes. The ordering is generated based on the field
438 name and the version of the index. As long as the index version
439 remains unchanged, and the same field name is reused,
440 the ordering of the docs will be consistent.
441 If you want different psuedo-random orderings of documents,
442 for the same version of the index, use a dynamicField and
443 change the field name in the request.
444 -->
445 <fieldType name="random" class="solr.RandomSortField" indexed="true" />
446
447 <!-- solr.TextField allows the specification of custom text analyzers
448 specified as a tokenizer and a list of token filters. Different
449 analyzers may be specified for indexing and querying.
450
451 The optional positionIncrementGap puts space between multiple fields of
452 this type on the same document, with the purpose of preventing false phrase
453 matching across fields.
454
455 For more info on customizing your analyzer chain, please see
456 http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
457 -->
458
459 <!-- One can also specify an existing Analyzer class that has a
460 default constructor via the class attribute on the analyzer element.
461 Example:
462 <fieldType name="text_greek" class="solr.TextField">
463 <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
464 </fieldType>
465 -->
466
467 <!-- A text field that only splits on whitespace for exact matching of words -->
468 <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
469 <analyzer>
470 <tokenizer class="solr.WhitespaceTokenizerFactory"/>
471 </analyzer>
472 </fieldType>
473
474 <!-- A general text field that has reasonable, generic
475 cross-language defaults: it tokenizes with StandardTokenizer,
476 removes stop words from case-insensitive "stopwords.txt"
477 (empty by default), and down cases. At query time only, it
478 also applies synonyms. -->
479 <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
480 <analyzer type="index">
481 <charFilter class="solr.HTMLStripCharFilterFactory"/>
482 <tokenizer class="solr.StandardTokenizerFactory"/>
483 <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
484 <!-- in this example, we will only use synonyms at query time
485 <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
486 -->
487 <filter class="solr.LowerCaseFilterFactory"/>
488 </analyzer>
489 <analyzer type="query">
490 <tokenizer class="solr.StandardTokenizerFactory"/>
491 <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
492 <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
493 <filter class="solr.LowerCaseFilterFactory"/>
494 </analyzer>
495 </fieldType>
496
497 <!-- A text field with defaults appropriate for English: it
498 tokenizes with StandardTokenizer, removes English stop words
499 (lang/stopwords_en.txt), down cases, protects words from protwords.txt, and
500 finally applies Porter's stemming. The query time analyzer
501 also applies synonyms from synonyms.txt. -->
502 <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
503 <analyzer type="index">
504 <charFilter class="solr.HTMLStripCharFilterFactory"/>
505 <tokenizer class="solr.StandardTokenizerFactory"/>
506 <!-- in this example, we will only use synonyms at query time
507 <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
508 -->
509 <!-- Case insensitive stop word removal.
510 -->
511 <filter class="solr.StopFilterFactory"
512 ignoreCase="true"
513 words="lang/stopwords_en.txt"
514 />
515 <filter class="solr.LowerCaseFilterFactory"/>
516 <filter class="solr.EnglishPossessiveFilterFactory"/>
517 <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
518 <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
519 <filter class="solr.EnglishMinimalStemFilterFactory"/>
520 -->
521 <!--<filter class="solr.PorterStemFilterFactory"/>-->
522 <filter class="solr.EnglishMinimalStemFilterFactory"/>
523 </analyzer>
524 <analyzer type="query">
525 <tokenizer class="solr.StandardTokenizerFactory"/>
526 <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
527 <filter class="solr.StopFilterFactory"
528 ignoreCase="true"
529 words="lang/stopwords_en.txt"
530 />
531 <filter class="solr.LowerCaseFilterFactory"/>
532 <filter class="solr.EnglishPossessiveFilterFactory"/>
533 <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
534 <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
535 <filter class="solr.EnglishMinimalStemFilterFactory"/>
536 -->
537 <!--<filter class="solr.PorterStemFilterFactory"/>-->
538 <filter class="solr.EnglishMinimalStemFilterFactory"/>
539 </analyzer>
540 </fieldType>
541
542 <!-- A text field with defaults appropriate for English, plus
543 aggressive word-splitting and autophrase features enabled.
544 This field is just like text_en, except it adds
545 WordDelimiterFilter to enable splitting and matching of
546 words on case-change, alpha numeric boundaries, and
547 non-alphanumeric chars. This means certain compound word
548 cases will work, for example query "wi fi" will match
549 document "WiFi" or "wi-fi".
550 -->
551 <fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
552 <analyzer type="index">
553 <charFilter class="solr.HTMLStripCharFilterFactory"/>
554 <tokenizer class="solr.WhitespaceTokenizerFactory"/>
555 <!-- in this example, we will only use synonyms at query time
556 <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
557 -->
558 <!-- Case insensitive stop word removal.
559 -->
560 <filter class="solr.StopFilterFactory"
561 ignoreCase="true"
562 words="lang/stopwords_en.txt"
563 />
564 <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
565 <filter class="solr.LowerCaseFilterFactory"/>
566 <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
567 <!--<filter class="solr.PorterStemFilterFactory"/>-->
568 <filter class="solr.EnglishMinimalStemFilterFactory"/>
569 </analyzer>
570 <analyzer type="query">
571 <tokenizer class="solr.WhitespaceTokenizerFactory"/>
572 <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
573 <filter class="solr.StopFilterFactory"
574 ignoreCase="true"
575 words="lang/stopwords_en.txt"
576 />
577 <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
578 <filter class="solr.LowerCaseFilterFactory"/>
579 <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
580 <!--<filter class="solr.PorterStemFilterFactory"/>-->
581 <filter class="solr.EnglishMinimalStemFilterFactory"/>
582 </analyzer>
583 </fieldType>
584
585 <!-- Less flexible matching, but less false matches. Probably not ideal for product names,
586 but may be good for SKUs. Can insert dashes in the wrong place and still match. -->
587 <fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
588 <analyzer>
589 <charFilter class="solr.HTMLStripCharFilterFactory"/>
590 <tokenizer class="solr.WhitespaceTokenizerFactory"/>
591 <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
592 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.txt"/>
593 <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
594 <filter class="solr.LowerCaseFilterFactory"/>
595 <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
596 <filter class="solr.EnglishMinimalStemFilterFactory"/>
597 <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
598 possible with WordDelimiterFilter in conjuncton with stemming. -->
599 <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
600 </analyzer>
601 </fieldType>
602
603 <!-- Just like text_general except it reverses the characters of
604 each token, to enable more efficient leading wildcard queries. -->
605 <fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100">
606 <analyzer type="index">
607 <tokenizer class="solr.StandardTokenizerFactory"/>
608 <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
609 <filter class="solr.LowerCaseFilterFactory"/>
610 <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
611 maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
612 </analyzer>
613 <analyzer type="query">
614 <tokenizer class="solr.StandardTokenizerFactory"/>
615 <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
616 <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
617 <filter class="solr.LowerCaseFilterFactory"/>
618 </analyzer>
619 </fieldType>
620
621 <!-- charFilter + WhitespaceTokenizer -->
622 <!--
623 <fieldType name="text_char_norm" class="solr.TextField" positionIncrementGap="100" >
624 <analyzer>
625 <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
626 <tokenizer class="solr.WhitespaceTokenizerFactory"/>
627 </analyzer>
628 </fieldType>
629 -->
630
631 <!-- This is an example of using the KeywordTokenizer along
632 With various TokenFilterFactories to produce a sortable field
633 that does not include some properties of the source text
634 -->
635 <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
636 <analyzer>
637 <!-- KeywordTokenizer does no actual tokenizing, so the entire
638 input string is preserved as a single token
639 -->
640 <tokenizer class="solr.KeywordTokenizerFactory"/>
641 <!-- The LowerCase TokenFilter does what you expect, which can be
642 when you want your sorting to be case insensitive
643 -->
644 <filter class="solr.LowerCaseFilterFactory" />
645 <!-- The TrimFilter removes any leading or trailing whitespace -->
646 <filter class="solr.TrimFilterFactory" />
647 <!-- The PatternReplaceFilter gives you the flexibility to use
648 Java Regular expression to replace any sequence of characters
649 matching a pattern with an arbitrary replacement string,
650 which may include back references to portions of the original
651 string matched by the pattern.
652
653 See the Java Regular Expression documentation for more
654 information on pattern and replacement string syntax.
655
656 http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html
657 -->
658 <filter class="solr.PatternReplaceFilterFactory"
659 pattern="([^a-z])" replacement="" replace="all"
660 />
661 </analyzer>
662 </fieldType>
663
664 <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
665 <analyzer>
666 <tokenizer class="solr.StandardTokenizerFactory"/>
667 <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
668 </analyzer>
669 </fieldtype>
670
671 <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
672 <analyzer>
673 <tokenizer class="solr.WhitespaceTokenizerFactory"/>
674 <!--
675 The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
676 a token of "foo|1.4" would be indexed as "foo" with a payload of 1.4f
677 Attributes of the DelimitedPayloadTokenFilterFactory :
678 "delimiter" - a one character delimiter. Default is | (pipe)
679 "encoder" - how to encode the following value into a playload
680 float -> org.apache.lucene.analysis.payloads.FloatEncoder,
681 integer -> o.a.l.a.p.IntegerEncoder
682 identity -> o.a.l.a.p.IdentityEncoder
683 Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
684 -->
685 <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
686 </analyzer>
687 </fieldtype>
688
689 <!-- lowercases the entire field value, keeping it as a single token. -->
690 <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
691 <analyzer>
692 <tokenizer class="solr.KeywordTokenizerFactory"/>
693 <filter class="solr.LowerCaseFilterFactory" />
694 </analyzer>
695 </fieldType>
696
697 <!--
698 Example of using PathHierarchyTokenizerFactory at index time, so
699 queries for paths match documents at that path, or in descendent paths
700 -->
701 <fieldType name="descendent_path" class="solr.TextField">
702 <analyzer type="index">
703 <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
704 </analyzer>
705 <analyzer type="query">
706 <tokenizer class="solr.KeywordTokenizerFactory" />
707 </analyzer>
708 </fieldType>
709 <!--
710 Example of using PathHierarchyTokenizerFactory at query time, so
711 queries for paths match documents at that path, or in ancestor paths
712 -->
713 <fieldType name="ancestor_path" class="solr.TextField">
714 <analyzer type="index">
715 <tokenizer class="solr.KeywordTokenizerFactory" />
716 </analyzer>
717 <analyzer type="query">
718 <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
719 </analyzer>
720 </fieldType>
721
722 <!-- since fields of this type are by default not stored or indexed,
723 any data added to them will be ignored outright. -->
724 <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
725
726 <!-- This point type indexes the coordinates as separate fields (subFields)
727 If subFieldType is defined, it references a type, and a dynamic field
728 definition is created matching *___<typename>. Alternately, if
729 subFieldSuffix is defined, that is used to create the subFields.
730 Example: if subFieldType="double", then the coordinates would be
731 indexed in fields myloc_0___double,myloc_1___double.
732 Example: if subFieldSuffix="_d" then the coordinates would be indexed
733 in fields myloc_0_d,myloc_1_d
734 The subFields are an implementation detail of the fieldType, and end
735 users normally should not need to know about them.
736 -->
737 <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
738
739 <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
740 <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
741
742 <!-- An alternative geospatial field type new to Solr 4. It supports multiValued and polygon shapes.
743 For more information about this and other Spatial fields new to Solr 4, see:
744 http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
745 -->
746 <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
747 geo="true" distErrPct="0.025" maxDistErr="0.000009" units="degrees" />
748
749 <!-- Money/currency field type. See http://wiki.apache.org/solr/MoneyFieldType
750 Parameters:
751 defaultCurrency: Specifies the default currency if none specified. Defaults to "USD"
752 precisionStep: Specifies the precisionStep for the TrieLong field used for the amount
753 providerClass: Lets you plug in other exchange provider backend:
754 solr.FileExchangeRateProvider is the default and takes one parameter:
755 currencyConfig: name of an xml file holding exchange rates
756 solr.OpenExchangeRatesOrgProvider uses rates from openexchangerates.org:
757 ratesFileLocation: URL or path to rates JSON file (default latest.json on the web)
758 refreshInterval: Number of minutes between each rates fetch (default: 1440, min: 60)
759 -->
760 <fieldType name="currency" class="solr.CurrencyField" precisionStep="8" defaultCurrency="USD" currencyConfig="currency.xml" />
761
762
763
764 <!-- some examples for different languages (generally ordered by ISO code) -->
765
766 <!-- Arabic -->
767 <fieldType name="text_ar" class="solr.TextField" positionIncrementGap="100">
768 <analyzer>
769 <charFilter class="solr.HTMLStripCharFilterFactory"/>
770 <tokenizer class="solr.StandardTokenizerFactory"/>
771 <!-- for any non-arabic -->
772 <filter class="solr.LowerCaseFilterFactory"/>
773 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ar.txt" />
774 <!-- normalizes ﻯ to ﻱ, etc -->
775 <filter class="solr.ArabicNormalizationFilterFactory"/>
776 <filter class="solr.ArabicStemFilterFactory"/>
777 </analyzer>
778 </fieldType>
779
780 <!-- Bulgarian -->
781 <fieldType name="text_bg" class="solr.TextField" positionIncrementGap="100">
782 <analyzer>
783 <charFilter class="solr.HTMLStripCharFilterFactory"/>
784 <tokenizer class="solr.StandardTokenizerFactory"/>
785 <filter class="solr.LowerCaseFilterFactory"/>
786 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_bg.txt" />
787 <filter class="solr.BulgarianStemFilterFactory"/>
788 </analyzer>
789 </fieldType>
790
791 <!-- Catalan -->
792 <fieldType name="text_ca" class="solr.TextField" positionIncrementGap="100">
793 <analyzer>
794 <charFilter class="solr.HTMLStripCharFilterFactory"/>
795 <tokenizer class="solr.StandardTokenizerFactory"/>
796 <!-- removes l', etc -->
797 <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_ca.txt"/>
798 <filter class="solr.LowerCaseFilterFactory"/>
799 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ca.txt" />
800 <filter class="solr.SnowballPorterFilterFactory" language="Catalan"/>
801 </analyzer>
802 </fieldType>
803
804 <!-- CJK bigram (see text_ja for a Japanese configuration using morphological analysis) -->
805 <fieldType name="text_cjk" class="solr.TextField" positionIncrementGap="100">
806 <analyzer>
807 <charFilter class="solr.HTMLStripCharFilterFactory"/>
808 <tokenizer class="solr.StandardTokenizerFactory"/>
809 <!-- normalize width before bigram, as e.g. half-width dakuten combine -->
810 <filter class="solr.CJKWidthFilterFactory"/>
811 <!-- for any non-CJK -->
812 <filter class="solr.LowerCaseFilterFactory"/>
813 <filter class="solr.CJKBigramFilterFactory"/>
814 </analyzer>
815 </fieldType>
816
817 <!-- Kurdish -->
818 <fieldType name="text_ckb" class="solr.TextField" positionIncrementGap="100">
819 <analyzer>
820 <charFilter class="solr.HTMLStripCharFilterFactory"/>
821 <tokenizer class="solr.StandardTokenizerFactory"/>
822 <filter class="solr.SoraniNormalizationFilterFactory"/>
823 <!-- for any latin text -->
824 <filter class="solr.LowerCaseFilterFactory"/>
825 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ckb.txt"/>
826 <filter class="solr.SoraniStemFilterFactory"/>
827 </analyzer>
828 </fieldType>
829
830 <!-- Czech -->
831 <fieldType name="text_cz" class="solr.TextField" positionIncrementGap="100">
832 <analyzer>
833 <charFilter class="solr.HTMLStripCharFilterFactory"/>
834 <tokenizer class="solr.StandardTokenizerFactory"/>
835 <filter class="solr.LowerCaseFilterFactory"/>
836 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_cz.txt" />
837 <filter class="solr.CzechStemFilterFactory"/>
838 </analyzer>
839 </fieldType>
840
841 <!-- Danish -->
842 <fieldType name="text_da" class="solr.TextField" positionIncrementGap="100">
843 <analyzer>
844 <charFilter class="solr.HTMLStripCharFilterFactory"/>
845 <tokenizer class="solr.StandardTokenizerFactory"/>
846 <filter class="solr.LowerCaseFilterFactory"/>
847 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_da.txt" format="snowball" />
848 <filter class="solr.SnowballPorterFilterFactory" language="Danish"/>
849 </analyzer>
850 </fieldType>
851
852 <!-- German -->
853 <fieldType name="text_de" class="solr.TextField" positionIncrementGap="100">
854 <analyzer>
855 <charFilter class="solr.HTMLStripCharFilterFactory"/>
856 <tokenizer class="solr.StandardTokenizerFactory"/>
857 <filter class="solr.LowerCaseFilterFactory"/>
858 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_de.txt" format="snowball" />
859 <filter class="solr.GermanNormalizationFilterFactory"/>
860 <filter class="solr.GermanLightStemFilterFactory"/>
861 <!-- less aggressive: <filter class="solr.GermanMinimalStemFilterFactory"/> -->
862 <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="German2"/> -->
863 </analyzer>
864 </fieldType>
865
866 <!-- Greek -->
867 <fieldType name="text_el" class="solr.TextField" positionIncrementGap="100">
868 <analyzer>
869 <charFilter class="solr.HTMLStripCharFilterFactory"/>
870 <tokenizer class="solr.StandardTokenizerFactory"/>
871 <!-- greek specific lowercase for sigma -->
872 <filter class="solr.GreekLowerCaseFilterFactory"/>
873 <filter class="solr.StopFilterFactory" ignoreCase="false" words="lang/stopwords_el.txt" />
874 <filter class="solr.GreekStemFilterFactory"/>
875 </analyzer>
876 </fieldType>
877
878 <!-- Spanish -->
879 <fieldType name="text_es" class="solr.TextField" positionIncrementGap="100">
880 <analyzer>
881 <charFilter class="solr.HTMLStripCharFilterFactory"/>
882 <tokenizer class="solr.StandardTokenizerFactory"/>
883 <filter class="solr.LowerCaseFilterFactory"/>
884 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_es.txt" format="snowball" />
885 <filter class="solr.SpanishLightStemFilterFactory"/>
886 <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Spanish"/> -->
887 </analyzer>
888 </fieldType>
889
890 <!-- Basque -->
891 <fieldType name="text_eu" class="solr.TextField" positionIncrementGap="100">
892 <analyzer>
893 <charFilter class="solr.HTMLStripCharFilterFactory"/>
894 <tokenizer class="solr.StandardTokenizerFactory"/>
895 <filter class="solr.LowerCaseFilterFactory"/>
896 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_eu.txt" />
897 <filter class="solr.SnowballPorterFilterFactory" language="Basque"/>
898 </analyzer>
899 </fieldType>
900
901 <!-- Persian -->
902 <fieldType name="text_fa" class="solr.TextField" positionIncrementGap="100">
903 <analyzer>
904 <!-- for ZWNJ -->
905 <charFilter class="solr.HTMLStripCharFilterFactory"/>
906 <charFilter class="solr.PersianCharFilterFactory"/>
907 <tokenizer class="solr.StandardTokenizerFactory"/>
908 <filter class="solr.LowerCaseFilterFactory"/>
909 <filter class="solr.ArabicNormalizationFilterFactory"/>
910 <filter class="solr.PersianNormalizationFilterFactory"/>
911 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fa.txt" />
912 </analyzer>
913 </fieldType>
914
915 <!-- Finnish -->
916 <fieldType name="text_fi" class="solr.TextField" positionIncrementGap="100">
917 <analyzer>
918 <charFilter class="solr.HTMLStripCharFilterFactory"/>
919 <tokenizer class="solr.StandardTokenizerFactory"/>
920 <filter class="solr.LowerCaseFilterFactory"/>
921 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fi.txt" format="snowball" />
922 <filter class="solr.SnowballPorterFilterFactory" language="Finnish"/>
923 <!-- less aggressive: <filter class="solr.FinnishLightStemFilterFactory"/> -->
924 </analyzer>
925 </fieldType>
926
927 <!-- French -->
928 <fieldType name="text_fr" class="solr.TextField" positionIncrementGap="100">
929 <analyzer>
930 <charFilter class="solr.HTMLStripCharFilterFactory"/>
931 <tokenizer class="solr.StandardTokenizerFactory"/>
932 <!-- removes l', etc -->
933 <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_fr.txt"/>
934 <filter class="solr.LowerCaseFilterFactory"/>
935 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fr.txt" format="snowball" />
936 <filter class="solr.FrenchLightStemFilterFactory"/>
937 <!-- less aggressive: <filter class="solr.FrenchMinimalStemFilterFactory"/> -->
938 <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="French"/> -->
939 </analyzer>
940 </fieldType>
941
942 <!-- Irish -->
943 <fieldType name="text_ga" class="solr.TextField" positionIncrementGap="100">
944 <analyzer>
945 <charFilter class="solr.HTMLStripCharFilterFactory"/>
946 <tokenizer class="solr.StandardTokenizerFactory"/>
947 <!-- removes d', etc -->
948 <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_ga.txt"/>
949 <!-- removes n-, etc. position increments is intentionally false! -->
950 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/hyphenations_ga.txt"/>
951 <filter class="solr.IrishLowerCaseFilterFactory"/>
952 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ga.txt"/>
953 <filter class="solr.SnowballPorterFilterFactory" language="Irish"/>
954 </analyzer>
955 </fieldType>
956
957 <!-- Galician -->
958 <fieldType name="text_gl" class="solr.TextField" positionIncrementGap="100">
959 <analyzer>
960 <charFilter class="solr.HTMLStripCharFilterFactory"/>
961 <tokenizer class="solr.StandardTokenizerFactory"/>
962 <filter class="solr.LowerCaseFilterFactory"/>
963 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_gl.txt" />
964 <filter class="solr.GalicianStemFilterFactory"/>
965 <!-- less aggressive: <filter class="solr.GalicianMinimalStemFilterFactory"/> -->
966 </analyzer>
967 </fieldType>
968
969 <!-- Hindi -->
970 <fieldType name="text_hi" class="solr.TextField" positionIncrementGap="100">
971 <analyzer>
972 <charFilter class="solr.HTMLStripCharFilterFactory"/>
973 <tokenizer class="solr.StandardTokenizerFactory"/>
974 <filter class="solr.LowerCaseFilterFactory"/>
975 <!-- normalizes unicode representation -->
976 <filter class="solr.IndicNormalizationFilterFactory"/>
977 <!-- normalizes variation in spelling -->
978 <filter class="solr.HindiNormalizationFilterFactory"/>
979 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hi.txt" />
980 <filter class="solr.HindiStemFilterFactory"/>
981 </analyzer>
982 </fieldType>
983
984 <!-- Hungarian -->
985 <fieldType name="text_hu" class="solr.TextField" positionIncrementGap="100">
986 <analyzer>
987 <charFilter class="solr.HTMLStripCharFilterFactory"/>
988 <tokenizer class="solr.StandardTokenizerFactory"/>
989 <filter class="solr.LowerCaseFilterFactory"/>
990 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hu.txt" format="snowball" />
991 <filter class="solr.SnowballPorterFilterFactory" language="Hungarian"/>
992 <!-- less aggressive: <filter class="solr.HungarianLightStemFilterFactory"/> -->
993 </analyzer>
994 </fieldType>
995
996 <!-- Armenian -->
997 <fieldType name="text_hy" class="solr.TextField" positionIncrementGap="100">
998 <analyzer>
999 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1000 <tokenizer class="solr.StandardTokenizerFactory"/>
1001 <filter class="solr.LowerCaseFilterFactory"/>
1002 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hy.txt" />
1003 <filter class="solr.SnowballPorterFilterFactory" language="Armenian"/>
1004 </analyzer>
1005 </fieldType>
1006
1007 <!-- Indonesian -->
1008 <fieldType name="text_id" class="solr.TextField" positionIncrementGap="100">
1009 <analyzer>
1010 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1011 <tokenizer class="solr.StandardTokenizerFactory"/>
1012 <filter class="solr.LowerCaseFilterFactory"/>
1013 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_id.txt" />
1014 <!-- for a less aggressive approach (only inflectional suffixes), set stemDerivational to false -->
1015 <filter class="solr.IndonesianStemFilterFactory" stemDerivational="true"/>
1016 </analyzer>
1017 </fieldType>
1018
1019 <!-- Italian -->
1020 <fieldType name="text_it" class="solr.TextField" positionIncrementGap="100">
1021 <analyzer>
1022 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1023 <tokenizer class="solr.StandardTokenizerFactory"/>
1024 <!-- removes l', etc -->
1025 <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_it.txt"/>
1026 <filter class="solr.LowerCaseFilterFactory"/>
1027 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_it.txt" format="snowball" />
1028 <filter class="solr.ItalianLightStemFilterFactory"/>
1029 <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Italian"/> -->
1030 </analyzer>
1031 </fieldType>
1032
1033 <!-- Japanese using morphological analysis (see text_cjk for a configuration using bigramming)
1034
1035 NOTE: If you want to optimize search for precision, use default operator AND in your query
1036 parser config with <solrQueryParser defaultOperator="AND"/> further down in this file. Use
1037 OR if you would like to optimize for recall (default).
1038 -->
1039 <fieldType name="text_ja" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="false">
1040 <analyzer>
1041 <!-- Kuromoji Japanese morphological analyzer/tokenizer (JapaneseTokenizer)
1042
1043 Kuromoji has a search mode (default) that does segmentation useful for search. A heuristic
1044 is used to segment compounds into its parts and the compound itself is kept as synonym.
1045
1046 Valid values for attribute mode are:
1047 normal: regular segmentation
1048 search: segmentation useful for search with synonyms compounds (default)
1049 extended: same as search mode, but unigrams unknown words (experimental)
1050
1051 For some applications it might be good to use search mode for indexing and normal mode for
1052 queries to reduce recall and prevent parts of compounds from being matched and highlighted.
1053 Use <analyzer type="index"> and <analyzer type="query"> for this and mode normal in query.
1054
1055 Kuromoji also has a convenient user dictionary feature that allows overriding the statistical
1056 model with your own entries for segmentation, part-of-speech tags and readings without a need
1057 to specify weights. Notice that user dictionaries have not been subject to extensive testing.
1058
1059 User dictionary attributes are:
1060 userDictionary: user dictionary filename
1061 userDictionaryEncoding: user dictionary encoding (default is UTF-8)
1062
1063 See lang/userdict_ja.txt for a sample user dictionary file.
1064
1065 Punctuation characters are discarded by default. Use discardPunctuation="false" to keep them.
1066
1067 See http://wiki.apache.org/solr/JapaneseLanguageSupport for more on Japanese language support.
1068 -->
1069 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1070 <tokenizer class="solr.JapaneseTokenizerFactory" mode="search"/>
1071 <!--<tokenizer class="solr.JapaneseTokenizerFactory" mode="search" userDictionary="lang/userdict_ja.txt"/>-->
1072 <!-- Reduces inflected verbs and adjectives to their base/dictionary forms (蟞曞圢) -->
1073 <filter class="solr.JapaneseBaseFormFilterFactory"/>
1074 <!-- Removes tokens with certain part-of-speech tags -->
1075 <filter class="solr.JapanesePartOfSpeechStopFilterFactory" tags="lang/stoptags_ja.txt" />
1076 <!-- Normalizes full-width romaji to half-width and half-width kana to full-width (Unicode NFKC subset) -->
1077 <filter class="solr.CJKWidthFilterFactory"/>
1078 <!-- Removes common tokens typically not useful for search, but have a negative effect on ranking -->
1079 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ja.txt" />
1080 <!-- Normalizes common katakana spelling variations by removing any last long sound character (U+30FC) -->
1081 <filter class="solr.JapaneseKatakanaStemFilterFactory" minimumLength="4"/>
1082 <!-- Lower-cases romaji characters -->
1083 <filter class="solr.LowerCaseFilterFactory"/>
1084 </analyzer>
1085 </fieldType>
1086
1087 <!-- Latvian -->
1088 <fieldType name="text_lv" class="solr.TextField" positionIncrementGap="100">
1089 <analyzer>
1090 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1091 <tokenizer class="solr.StandardTokenizerFactory"/>
1092 <filter class="solr.LowerCaseFilterFactory"/>
1093 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_lv.txt" />
1094 <filter class="solr.LatvianStemFilterFactory"/>
1095 </analyzer>
1096 </fieldType>
1097
1098 <!-- Dutch -->
1099 <fieldType name="text_nl" class="solr.TextField" positionIncrementGap="100">
1100 <analyzer>
1101 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1102 <tokenizer class="solr.StandardTokenizerFactory"/>
1103 <filter class="solr.LowerCaseFilterFactory"/>
1104 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_nl.txt" format="snowball" />
1105 <filter class="solr.StemmerOverrideFilterFactory" dictionary="lang/stemdict_nl.txt" ignoreCase="false"/>
1106 <filter class="solr.SnowballPorterFilterFactory" language="Dutch"/>
1107 </analyzer>
1108 </fieldType>
1109
1110 <!-- Norwegian -->
1111 <fieldType name="text_no" class="solr.TextField" positionIncrementGap="100">
1112 <analyzer>
1113 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1114 <tokenizer class="solr.StandardTokenizerFactory"/>
1115 <filter class="solr.LowerCaseFilterFactory"/>
1116 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_no.txt" format="snowball" />
1117 <filter class="solr.SnowballPorterFilterFactory" language="Norwegian"/>
1118 <!-- less aggressive: <filter class="solr.NorwegianLightStemFilterFactory" variant="nb"/> -->
1119 <!-- singular/plural: <filter class="solr.NorwegianMinimalStemFilterFactory" variant="nb"/> -->
1120 <!-- The "light" and "minimal" stemmers support variants: nb=Bokmål, nn=Nynorsk, no=Both -->
1121 </analyzer>
1122 </fieldType>
1123
1124 <!-- Portuguese -->
1125 <fieldType name="text_pt" class="solr.TextField" positionIncrementGap="100">
1126 <analyzer>
1127 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1128 <tokenizer class="solr.StandardTokenizerFactory"/>
1129 <filter class="solr.LowerCaseFilterFactory"/>
1130 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_pt.txt" format="snowball" />
1131 <filter class="solr.PortugueseLightStemFilterFactory"/>
1132 <!-- less aggressive: <filter class="solr.PortugueseMinimalStemFilterFactory"/> -->
1133 <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Portuguese"/> -->
1134 <!-- most aggressive: <filter class="solr.PortugueseStemFilterFactory"/> -->
1135 </analyzer>
1136 </fieldType>
1137
1138 <!-- Romanian -->
1139 <fieldType name="text_ro" class="solr.TextField" positionIncrementGap="100">
1140 <analyzer>
1141 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1142 <tokenizer class="solr.StandardTokenizerFactory"/>
1143 <filter class="solr.LowerCaseFilterFactory"/>
1144 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ro.txt" />
1145 <filter class="solr.SnowballPorterFilterFactory" language="Romanian"/>
1146 </analyzer>
1147 </fieldType>
1148
1149 <!-- Russian -->
1150 <fieldType name="text_ru" class="solr.TextField" positionIncrementGap="100">
1151 <analyzer>
1152 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1153 <tokenizer class="solr.StandardTokenizerFactory"/>
1154 <filter class="solr.LowerCaseFilterFactory"/>
1155 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ru.txt" format="snowball" />
1156 <filter class="solr.SnowballPorterFilterFactory" language="Russian"/>
1157 <!-- less aggressive: <filter class="solr.RussianLightStemFilterFactory"/> -->
1158 </analyzer>
1159 </fieldType>
1160 <!-- Russian with morphology-->
1161 <fieldType name="text_ru_morph" class="solr.TextField" positionIncrementGap="100">
1162 <analyzer>
1163 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1164 <tokenizer class="solr.StandardTokenizerFactory"/>
1165 <filter class="solr.LowerCaseFilterFactory"/>
1166 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ru.txt" format="snowball" />
1167 <filter class="company.evo.jmorphy2.lucene.Jmorphy2StemFilterFactory" dict="lang/pymorphy2_dicts"/>
1168 </analyzer>
1169 </fieldType>
1170
1171 <!-- Swedish -->
1172 <fieldType name="text_sv" class="solr.TextField" positionIncrementGap="100">
1173 <analyzer>
1174 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1175 <tokenizer class="solr.StandardTokenizerFactory"/>
1176 <filter class="solr.LowerCaseFilterFactory"/>
1177 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_sv.txt" format="snowball" />
1178 <filter class="solr.SnowballPorterFilterFactory" language="Swedish"/>
1179 <!-- less aggressive: <filter class="solr.SwedishLightStemFilterFactory"/> -->
1180 </analyzer>
1181 </fieldType>
1182
1183 <!-- Thai -->
1184 <fieldType name="text_th" class="solr.TextField" positionIncrementGap="100">
1185 <analyzer>
1186 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1187 <tokenizer class="solr.StandardTokenizerFactory"/>
1188 <filter class="solr.LowerCaseFilterFactory"/>
1189 <filter class="solr.ThaiWordFilterFactory"/>
1190 <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_th.txt" />
1191 </analyzer>
1192 </fieldType>
1193
1194 <!-- Turkish -->
1195 <fieldType name="text_tr" class="solr.TextField" positionIncrementGap="100">
1196 <analyzer>
1197 <charFilter class="solr.HTMLStripCharFilterFactory"/>
1198 <tokenizer class="solr.StandardTokenizerFactory"/>
1199 <filter class="solr.TurkishLowerCaseFilterFactory"/>
1200 <filter class="solr.StopFilterFactory" ignoreCase="false" words="lang/stopwords_tr.txt" />
1201 <filter class="solr.SnowballPorterFilterFactory" language="Turkish"/>
1202 </analyzer>
1203 </fieldType>
1204
1205 </types>
1206
1207 <!-- Similarity is the scoring routine for each document vs. a query.
1208 A custom Similarity or SimilarityFactory may be specified here, but
1209 the default is fine for most applications.
1210 For more info: http://wiki.apache.org/solr/SchemaXml#Similarity
1211 -->
1212 <!--
1213 <similarity class="com.example.solr.CustomSimilarityFactory">
1214 <str name="paramkey">param value</str>
1215 </similarity>
1216 -->
1217
1218</schema>
Note: See TracBrowser for help on using the repository browser.