source: gs3-extensions/solr/trunk/src/collect/solr-jdbm-demo/etc/conf/schema.xml

Last change on this file was 32199, checked in by ak19, 6 years ago

Rebuilt GS3 solr demo collection as per Kathy's request, in order to add the oai-inf db to the prebuilt demo collection, so snapshots and releases will have solr demo working out of the box. The schema.xml has meanwhile also been updated by the rebuild, and now includes attributes like termVectors on <field> elements.

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