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

Last change on this file since 33685 was 33685, checked in by davidb, 4 years ago

Upstream change related to Solr ext

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