source: main/trunk/model-sites-dev/heritage-nz/collect/pdf-reports/etc/conf/schema.xml@ 33160

Last change on this file since 33160 was 33160, checked in by davidb, 5 years ago

Sorting out new-line difference resulting from removing XML mime-type property

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