schema.xml 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932
  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. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!--
  17. This is the Solr schema file. This file should be named "schema.xml" and
  18. should be in the conf directory under the solr home
  19. (i.e. ./solr/conf/schema.xml by default)
  20. or located where the classloader for the Solr webapp can find it.
  21. This example schema is the recommended starting point for users.
  22. It should be kept correct and concise, usable out-of-the-box.
  23. For more information, on how to customize this file, please see
  24. http://wiki.apache.org/solr/SchemaXml
  25. PERFORMANCE NOTE: this schema includes many optional features and should not
  26. be used for benchmarking. To improve performance one could
  27. - set stored="false" for all fields possible (esp large fields) when you
  28. only need to search on the field but don't need to return the original
  29. value.
  30. - set indexed="false" if you don't need to search on the field, but only
  31. return the field as a result of searching on other indexed fields.
  32. - remove all unneeded copyField statements
  33. - for best index size and searching performance, set "index" to false
  34. for all general text fields, use copyField to copy them to the
  35. catchall "text" field, and use that for searching.
  36. - For maximum indexing performance, use the StreamingUpdateSolrServer
  37. java client.
  38. - Remember to run the JVM in server mode, and use a higher logging level
  39. that avoids logging every request
  40. -->
  41. <schema name="example" version="1.5">
  42. <!-- attribute "name" is the name of this schema and is only used for display purposes.
  43. version="x.y" is Solr's version number for the schema syntax and
  44. semantics. It should not normally be changed by applications.
  45. 1.0: multiValued attribute did not exist, all fields are multiValued
  46. by nature
  47. 1.1: multiValued attribute introduced, false by default
  48. 1.2: omitTermFreqAndPositions attribute introduced, true by default
  49. except for text fields.
  50. 1.3: removed optional field compress feature
  51. 1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser
  52. behavior when a single string produces multiple tokens. Defaults
  53. to off for version >= 1.4
  54. 1.5: omitNorms defaults to true for primitive field types
  55. (int, float, boolean, string...)
  56. -->
  57. <fields>
  58. <!-- Valid attributes for fields:
  59. name: mandatory - the name for the field
  60. type: mandatory - the name of a field type from the
  61. <types> fieldType section
  62. indexed: true if this field should be indexed (searchable or sortable)
  63. stored: true if this field should be retrievable
  64. docValues: true if this field should have doc values. Doc values are
  65. useful for faceting, grouping, sorting and function queries. Although not
  66. required, doc values will make the index faster to load, more
  67. NRT-friendly and more memory-efficient. They however come with some
  68. limitations: they are currently only supported by StrField, UUIDField
  69. and all Trie*Fields, and depending on the field type, they might
  70. require the field to be single-valued, be required or have a default
  71. value (check the documentation of the field type you're interested in
  72. for more information)
  73. multiValued: true if this field may contain multiple values per document
  74. omitNorms: (expert) set to true to omit the norms associated with
  75. this field (this disables length normalization and index-time
  76. boosting for the field, and saves some memory). Only full-text
  77. fields or fields that need an index-time boost need norms.
  78. Norms are omitted for primitive (non-analyzed) types by default.
  79. termVectors: [false] set to true to store the term vector for a
  80. given field.
  81. When using MoreLikeThis, fields used for similarity should be
  82. stored for best performance.
  83. termPositions: Store position information with the term vector.
  84. This will increase storage costs.
  85. termOffsets: Store offset information with the term vector. This
  86. will increase storage costs.
  87. required: The field is required. It will throw an error if the
  88. value does not exist
  89. default: a value that should be used if no value is specified
  90. when adding a document.
  91. -->
  92. <!-- field names should consist of alphanumeric or underscore characters only and
  93. not start with a digit. This is not currently strictly enforced,
  94. but other field names will not have first class support from all components
  95. and back compatibility is not guaranteed. Names with both leading and
  96. trailing underscores (e.g. _version_) are reserved.
  97. -->
  98. <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
  99. <field name="timestamp" type="tdate" indexed="true" stored="true" />
  100. <field name="host" type="string" indexed="true" stored="true" />
  101. <field name="status" type="string" indexed="true" stored="true" />
  102. <field name="log_content" type="text_general" indexed="true" stored="true" />
  103. <!-- tika metadata -->
  104. <field name="content_type" type="lowercase" indexed="true" stored="true" />
  105. <field name="_version_" type="long" indexed="true" stored="true"/>
  106. <dynamicField name="ignored_*" type="ignored"/>
  107. </fields>
  108. <!-- Field to use to determine and enforce document uniqueness.
  109. Unless this field is marked with required="false", it will be a required field
  110. -->
  111. <uniqueKey>id</uniqueKey>
  112. <!-- DEPRECATED: The defaultSearchField is consulted by various query parsers when
  113. parsing a query string that isn't explicit about the field. Machine (non-user)
  114. generated queries are best made explicit, or they can use the "df" request parameter
  115. which takes precedence over this.
  116. Note: Un-commenting defaultSearchField will be insufficient if your request handler
  117. in solrconfig.xml defines "df", which takes precedence. That would need to be removed.
  118. <defaultSearchField>text</defaultSearchField> -->
  119. <!-- DEPRECATED: The defaultOperator (AND|OR) is consulted by various query parsers
  120. when parsing a query string to determine if a clause of the query should be marked as
  121. required or optional, assuming the clause isn't already marked by some operator.
  122. The default is OR, which is generally assumed so it is not a good idea to change it
  123. globally here. The "q.op" request parameter takes precedence over this.
  124. <solrQueryParser defaultOperator="OR"/> -->
  125. <!-- copyField commands copy one field to another at the time a document
  126. is added to the index. It's used either to index the same field differently,
  127. or to add multiple fields to the same field for easier/faster searching. -->
  128. <types>
  129. <!-- field type definitions. The "name" attribute is
  130. just a label to be used by field definitions. The "class"
  131. attribute and any other attributes determine the real
  132. behavior of the fieldType.
  133. Class names starting with "solr" refer to java classes in a
  134. standard package such as org.apache.solr.analysis
  135. -->
  136. <!-- The StrField type is not analyzed, but indexed/stored verbatim.
  137. It supports doc values but in that case the field needs to be
  138. single-valued and either required or have a default value.
  139. -->
  140. <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
  141. <!-- boolean type: "true" or "false" -->
  142. <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
  143. <!-- sortMissingLast and sortMissingFirst attributes are optional attributes are
  144. currently supported on types that are sorted internally as strings
  145. and on numeric types.
  146. This includes "string","boolean", and, as of 3.5 (and 4.x),
  147. int, float, long, date, double, including the "Trie" variants.
  148. - If sortMissingLast="true", then a sort on this field will cause documents
  149. without the field to come after documents with the field,
  150. regardless of the requested sort order (asc or desc).
  151. - If sortMissingFirst="true", then a sort on this field will cause documents
  152. without the field to come before documents with the field,
  153. regardless of the requested sort order.
  154. - If sortMissingLast="false" and sortMissingFirst="false" (the default),
  155. then default lucene sorting will be used which places docs without the
  156. field first in an ascending sort and last in a descending sort.
  157. -->
  158. <!--
  159. Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
  160. These fields support doc values, but they require the field to be
  161. single-valued and either be required or have a default value.
  162. -->
  163. <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
  164. <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>
  165. <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
  166. <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>
  167. <!--
  168. Numeric field types that index each value at various levels of precision
  169. to accelerate range queries when the number of values between the range
  170. endpoints is large. See the javadoc for NumericRangeQuery for internal
  171. implementation details.
  172. Smaller precisionStep values (specified in bits) will lead to more tokens
  173. indexed per value, slightly larger index size, and faster range queries.
  174. A precisionStep of 0 disables indexing at different precision levels.
  175. -->
  176. <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>
  177. <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>
  178. <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>
  179. <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>
  180. <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
  181. is a more restricted form of the canonical representation of dateTime
  182. http://www.w3.org/TR/xmlschema-2/#dateTime
  183. The trailing "Z" designates UTC time and is mandatory.
  184. Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
  185. All other components are mandatory.
  186. Expressions can also be used to denote calculations that should be
  187. performed relative to "NOW" to determine the value, ie...
  188. NOW/HOUR
  189. ... Round to the start of the current hour
  190. NOW-1DAY
  191. ... Exactly 1 day prior to now
  192. NOW/DAY+6MONTHS+3DAYS
  193. ... 6 months and 3 days in the future from the start of
  194. the current day
  195. Consult the DateField javadocs for more information.
  196. Note: For faster range queries, consider the tdate type
  197. -->
  198. <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
  199. <!-- A Trie based date field for faster date range queries and date faceting. -->
  200. <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
  201. <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
  202. <fieldtype name="binary" class="solr.BinaryField"/>
  203. <!--
  204. Note:
  205. These should only be used for compatibility with existing indexes (created with lucene or older Solr versions).
  206. Use Trie based fields instead. As of Solr 3.5 and 4.x, Trie based fields support sortMissingFirst/Last
  207. Plain numeric field types that store and index the text
  208. value verbatim (and hence don't correctly support range queries, since the
  209. lexicographic ordering isn't equal to the numeric ordering)
  210. -->
  211. <fieldType name="pint" class="solr.IntField"/>
  212. <fieldType name="plong" class="solr.LongField"/>
  213. <fieldType name="pfloat" class="solr.FloatField"/>
  214. <fieldType name="pdouble" class="solr.DoubleField"/>
  215. <fieldType name="pdate" class="solr.DateField" sortMissingLast="true"/>
  216. <!-- The "RandomSortField" is not used to store or search any
  217. data. You can declare fields of this type it in your schema
  218. to generate pseudo-random orderings of your docs for sorting
  219. or function purposes. The ordering is generated based on the field
  220. name and the version of the index. As long as the index version
  221. remains unchanged, and the same field name is reused,
  222. the ordering of the docs will be consistent.
  223. If you want different psuedo-random orderings of documents,
  224. for the same version of the index, use a dynamicField and
  225. change the field name in the request.
  226. -->
  227. <fieldType name="random" class="solr.RandomSortField" indexed="true" />
  228. <!-- solr.TextField allows the specification of custom text analyzers
  229. specified as a tokenizer and a list of token filters. Different
  230. analyzers may be specified for indexing and querying.
  231. The optional positionIncrementGap puts space between multiple fields of
  232. this type on the same document, with the purpose of preventing false phrase
  233. matching across fields.
  234. For more info on customizing your analyzer chain, please see
  235. http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
  236. -->
  237. <!-- One can also specify an existing Analyzer class that has a
  238. default constructor via the class attribute on the analyzer element.
  239. Example:
  240. <fieldType name="text_greek" class="solr.TextField">
  241. <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
  242. </fieldType>
  243. -->
  244. <!-- A text field that only splits on whitespace for exact matching of words -->
  245. <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
  246. <analyzer>
  247. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  248. </analyzer>
  249. </fieldType>
  250. <!-- A general text field that has reasonable, generic
  251. cross-language defaults: it tokenizes with StandardTokenizer,
  252. removes stop words from case-insensitive "stopwords.txt"
  253. (empty by default), and down cases. At query time only, it
  254. also applies synonyms. -->
  255. <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
  256. <analyzer type="index">
  257. <tokenizer class="solr.StandardTokenizerFactory"/>
  258. <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
  259. <!-- in this example, we will only use synonyms at query time
  260. <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
  261. -->
  262. <filter class="solr.LowerCaseFilterFactory"/>
  263. </analyzer>
  264. <analyzer type="query">
  265. <tokenizer class="solr.StandardTokenizerFactory"/>
  266. <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
  267. <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  268. <filter class="solr.LowerCaseFilterFactory"/>
  269. </analyzer>
  270. </fieldType>
  271. <!-- A text field with defaults appropriate for English: it
  272. tokenizes with StandardTokenizer, removes English stop words
  273. (lang/stopwords_en.txt), down cases, protects words from protwords.txt, and
  274. finally applies Porter's stemming. The query time analyzer
  275. also applies synonyms from synonyms.txt. -->
  276. <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
  277. <analyzer type="index">
  278. <tokenizer class="solr.StandardTokenizerFactory"/>
  279. <!-- in this example, we will only use synonyms at query time
  280. <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
  281. -->
  282. <!-- Case insensitive stop word removal.
  283. add enablePositionIncrements=true in both the index and query
  284. analyzers to leave a 'gap' for more accurate phrase queries.
  285. -->
  286. <filter class="solr.StopFilterFactory"
  287. ignoreCase="true"
  288. words="lang/stopwords_en.txt"
  289. enablePositionIncrements="true"
  290. />
  291. <filter class="solr.LowerCaseFilterFactory"/>
  292. <filter class="solr.EnglishPossessiveFilterFactory"/>
  293. <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  294. <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
  295. <filter class="solr.EnglishMinimalStemFilterFactory"/>
  296. -->
  297. <filter class="solr.PorterStemFilterFactory"/>
  298. </analyzer>
  299. <analyzer type="query">
  300. <tokenizer class="solr.StandardTokenizerFactory"/>
  301. <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  302. <filter class="solr.StopFilterFactory"
  303. ignoreCase="true"
  304. words="lang/stopwords_en.txt"
  305. enablePositionIncrements="true"
  306. />
  307. <filter class="solr.LowerCaseFilterFactory"/>
  308. <filter class="solr.EnglishPossessiveFilterFactory"/>
  309. <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  310. <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
  311. <filter class="solr.EnglishMinimalStemFilterFactory"/>
  312. -->
  313. <filter class="solr.PorterStemFilterFactory"/>
  314. </analyzer>
  315. </fieldType>
  316. <!-- A text field with defaults appropriate for English, plus
  317. aggressive word-splitting and autophrase features enabled.
  318. This field is just like text_en, except it adds
  319. WordDelimiterFilter to enable splitting and matching of
  320. words on case-change, alpha numeric boundaries, and
  321. non-alphanumeric chars. This means certain compound word
  322. cases will work, for example query "wi fi" will match
  323. document "WiFi" or "wi-fi".
  324. -->
  325. <fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
  326. <analyzer type="index">
  327. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  328. <!-- in this example, we will only use synonyms at query time
  329. <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
  330. -->
  331. <!-- Case insensitive stop word removal.
  332. add enablePositionIncrements=true in both the index and query
  333. analyzers to leave a 'gap' for more accurate phrase queries.
  334. -->
  335. <filter class="solr.StopFilterFactory"
  336. ignoreCase="true"
  337. words="lang/stopwords_en.txt"
  338. enablePositionIncrements="true"
  339. />
  340. <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
  341. <filter class="solr.LowerCaseFilterFactory"/>
  342. <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  343. <filter class="solr.PorterStemFilterFactory"/>
  344. </analyzer>
  345. <analyzer type="query">
  346. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  347. <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  348. <filter class="solr.StopFilterFactory"
  349. ignoreCase="true"
  350. words="lang/stopwords_en.txt"
  351. enablePositionIncrements="true"
  352. />
  353. <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
  354. <filter class="solr.LowerCaseFilterFactory"/>
  355. <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  356. <filter class="solr.PorterStemFilterFactory"/>
  357. </analyzer>
  358. </fieldType>
  359. <!-- Less flexible matching, but less false matches. Probably not ideal for product names,
  360. but may be good for SKUs. Can insert dashes in the wrong place and still match. -->
  361. <fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
  362. <analyzer>
  363. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  364. <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
  365. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.txt"/>
  366. <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
  367. <filter class="solr.LowerCaseFilterFactory"/>
  368. <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
  369. <filter class="solr.EnglishMinimalStemFilterFactory"/>
  370. <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
  371. possible with WordDelimiterFilter in conjuncton with stemming. -->
  372. <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  373. </analyzer>
  374. </fieldType>
  375. <!-- Just like text_general except it reverses the characters of
  376. each token, to enable more efficient leading wildcard queries. -->
  377. <fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100">
  378. <analyzer type="index">
  379. <tokenizer class="solr.StandardTokenizerFactory"/>
  380. <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
  381. <filter class="solr.LowerCaseFilterFactory"/>
  382. <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
  383. maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
  384. </analyzer>
  385. <analyzer type="query">
  386. <tokenizer class="solr.StandardTokenizerFactory"/>
  387. <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  388. <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
  389. <filter class="solr.LowerCaseFilterFactory"/>
  390. </analyzer>
  391. </fieldType>
  392. <!-- charFilter + WhitespaceTokenizer -->
  393. <!--
  394. <fieldType name="text_char_norm" class="solr.TextField" positionIncrementGap="100" >
  395. <analyzer>
  396. <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
  397. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  398. </analyzer>
  399. </fieldType>
  400. -->
  401. <!-- This is an example of using the KeywordTokenizer along
  402. With various TokenFilterFactories to produce a sortable field
  403. that does not include some properties of the source text
  404. -->
  405. <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
  406. <analyzer>
  407. <!-- KeywordTokenizer does no actual tokenizing, so the entire
  408. input string is preserved as a single token
  409. -->
  410. <tokenizer class="solr.KeywordTokenizerFactory"/>
  411. <!-- The LowerCase TokenFilter does what you expect, which can be
  412. when you want your sorting to be case insensitive
  413. -->
  414. <filter class="solr.LowerCaseFilterFactory" />
  415. <!-- The TrimFilter removes any leading or trailing whitespace -->
  416. <filter class="solr.TrimFilterFactory" />
  417. <!-- The PatternReplaceFilter gives you the flexibility to use
  418. Java Regular expression to replace any sequence of characters
  419. matching a pattern with an arbitrary replacement string,
  420. which may include back references to portions of the original
  421. string matched by the pattern.
  422. See the Java Regular Expression documentation for more
  423. information on pattern and replacement string syntax.
  424. http://java.sun.com/j2se/1.6.0/docs/api/java/util/regex/package-summary.html
  425. -->
  426. <filter class="solr.PatternReplaceFilterFactory"
  427. pattern="([^a-z])" replacement="" replace="all"
  428. />
  429. </analyzer>
  430. </fieldType>
  431. <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
  432. <analyzer>
  433. <tokenizer class="solr.StandardTokenizerFactory"/>
  434. <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
  435. </analyzer>
  436. </fieldtype>
  437. <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
  438. <analyzer>
  439. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  440. <!--
  441. The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
  442. a token of "foo|1.4" would be indexed as "foo" with a payload of 1.4f
  443. Attributes of the DelimitedPayloadTokenFilterFactory :
  444. "delimiter" - a one character delimiter. Default is | (pipe)
  445. "encoder" - how to encode the following value into a playload
  446. float -> org.apache.lucene.analysis.payloads.FloatEncoder,
  447. integer -> o.a.l.a.p.IntegerEncoder
  448. identity -> o.a.l.a.p.IdentityEncoder
  449. Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
  450. -->
  451. <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
  452. </analyzer>
  453. </fieldtype>
  454. <!-- lowercases the entire field value, keeping it as a single token. -->
  455. <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
  456. <analyzer>
  457. <tokenizer class="solr.KeywordTokenizerFactory"/>
  458. <filter class="solr.LowerCaseFilterFactory" />
  459. </analyzer>
  460. </fieldType>
  461. <!--
  462. Example of using PathHierarchyTokenizerFactory at index time, so
  463. queries for paths match documents at that path, or in descendent paths
  464. -->
  465. <fieldType name="descendent_path" class="solr.TextField">
  466. <analyzer type="index">
  467. <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
  468. </analyzer>
  469. <analyzer type="query">
  470. <tokenizer class="solr.KeywordTokenizerFactory" />
  471. </analyzer>
  472. </fieldType>
  473. <!--
  474. Example of using PathHierarchyTokenizerFactory at query time, so
  475. queries for paths match documents at that path, or in ancestor paths
  476. -->
  477. <fieldType name="ancestor_path" class="solr.TextField">
  478. <analyzer type="index">
  479. <tokenizer class="solr.KeywordTokenizerFactory" />
  480. </analyzer>
  481. <analyzer type="query">
  482. <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
  483. </analyzer>
  484. </fieldType>
  485. <!-- since fields of this type are by default not stored or indexed,
  486. any data added to them will be ignored outright. -->
  487. <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
  488. <!-- This point type indexes the coordinates as separate fields (subFields)
  489. If subFieldType is defined, it references a type, and a dynamic field
  490. definition is created matching *___<typename>. Alternately, if
  491. subFieldSuffix is defined, that is used to create the subFields.
  492. Example: if subFieldType="double", then the coordinates would be
  493. indexed in fields myloc_0___double,myloc_1___double.
  494. Example: if subFieldSuffix="_d" then the coordinates would be indexed
  495. in fields myloc_0_d,myloc_1_d
  496. The subFields are an implementation detail of the fieldType, and end
  497. users normally should not need to know about them.
  498. -->
  499. <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
  500. <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
  501. <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
  502. <!-- An alternative geospatial field type new to Solr 4. It supports multiValued and polygon shapes.
  503. For more information about this and other Spatial fields new to Solr 4, see:
  504. http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
  505. -->
  506. <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
  507. geo="true" distErrPct="0.025" maxDistErr="0.000009" units="degrees" />
  508. <!-- Money/currency field type. See http://wiki.apache.org/solr/MoneyFieldType
  509. Parameters:
  510. defaultCurrency: Specifies the default currency if none specified. Defaults to "USD"
  511. precisionStep: Specifies the precisionStep for the TrieLong field used for the amount
  512. providerClass: Lets you plug in other exchange provider backend:
  513. solr.FileExchangeRateProvider is the default and takes one parameter:
  514. currencyConfig: name of an xml file holding exchange rates
  515. solr.OpenExchangeRatesOrgProvider uses rates from openexchangerates.org:
  516. ratesFileLocation: URL or path to rates JSON file (default latest.json on the web)
  517. refreshInterval: Number of minutes between each rates fetch (default: 1440, min: 60)
  518. -->
  519. <fieldType name="currency" class="solr.CurrencyField" precisionStep="8" defaultCurrency="USD" currencyConfig="currency.xml" />
  520. <!-- some examples for different languages (generally ordered by ISO code) -->
  521. <!-- Arabic -->
  522. <fieldType name="text_ar" class="solr.TextField" positionIncrementGap="100">
  523. <analyzer>
  524. <tokenizer class="solr.StandardTokenizerFactory"/>
  525. <!-- for any non-arabic -->
  526. <filter class="solr.LowerCaseFilterFactory"/>
  527. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ar.txt" enablePositionIncrements="true"/>
  528. <!-- normalizes ﻯ to ﻱ, etc -->
  529. <filter class="solr.ArabicNormalizationFilterFactory"/>
  530. <filter class="solr.ArabicStemFilterFactory"/>
  531. </analyzer>
  532. </fieldType>
  533. <!-- Bulgarian -->
  534. <fieldType name="text_bg" class="solr.TextField" positionIncrementGap="100">
  535. <analyzer>
  536. <tokenizer class="solr.StandardTokenizerFactory"/>
  537. <filter class="solr.LowerCaseFilterFactory"/>
  538. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_bg.txt" enablePositionIncrements="true"/>
  539. <filter class="solr.BulgarianStemFilterFactory"/>
  540. </analyzer>
  541. </fieldType>
  542. <!-- Catalan -->
  543. <fieldType name="text_ca" class="solr.TextField" positionIncrementGap="100">
  544. <analyzer>
  545. <tokenizer class="solr.StandardTokenizerFactory"/>
  546. <!-- removes l', etc -->
  547. <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_ca.txt"/>
  548. <filter class="solr.LowerCaseFilterFactory"/>
  549. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ca.txt" enablePositionIncrements="true"/>
  550. <filter class="solr.SnowballPorterFilterFactory" language="Catalan"/>
  551. </analyzer>
  552. </fieldType>
  553. <!-- CJK bigram (see text_ja for a Japanese configuration using morphological analysis) -->
  554. <fieldType name="text_cjk" class="solr.TextField" positionIncrementGap="100">
  555. <analyzer>
  556. <tokenizer class="solr.StandardTokenizerFactory"/>
  557. <!-- normalize width before bigram, as e.g. half-width dakuten combine -->
  558. <filter class="solr.CJKWidthFilterFactory"/>
  559. <!-- for any non-CJK -->
  560. <filter class="solr.LowerCaseFilterFactory"/>
  561. <filter class="solr.CJKBigramFilterFactory"/>
  562. </analyzer>
  563. </fieldType>
  564. <!-- Czech -->
  565. <fieldType name="text_cz" class="solr.TextField" positionIncrementGap="100">
  566. <analyzer>
  567. <tokenizer class="solr.StandardTokenizerFactory"/>
  568. <filter class="solr.LowerCaseFilterFactory"/>
  569. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_cz.txt" enablePositionIncrements="true"/>
  570. <filter class="solr.CzechStemFilterFactory"/>
  571. </analyzer>
  572. </fieldType>
  573. <!-- Danish -->
  574. <fieldType name="text_da" class="solr.TextField" positionIncrementGap="100">
  575. <analyzer>
  576. <tokenizer class="solr.StandardTokenizerFactory"/>
  577. <filter class="solr.LowerCaseFilterFactory"/>
  578. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_da.txt" format="snowball" enablePositionIncrements="true"/>
  579. <filter class="solr.SnowballPorterFilterFactory" language="Danish"/>
  580. </analyzer>
  581. </fieldType>
  582. <!-- German -->
  583. <fieldType name="text_de" class="solr.TextField" positionIncrementGap="100">
  584. <analyzer>
  585. <tokenizer class="solr.StandardTokenizerFactory"/>
  586. <filter class="solr.LowerCaseFilterFactory"/>
  587. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_de.txt" format="snowball" enablePositionIncrements="true"/>
  588. <filter class="solr.GermanNormalizationFilterFactory"/>
  589. <filter class="solr.GermanLightStemFilterFactory"/>
  590. <!-- less aggressive: <filter class="solr.GermanMinimalStemFilterFactory"/> -->
  591. <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="German2"/> -->
  592. </analyzer>
  593. </fieldType>
  594. <!-- Greek -->
  595. <fieldType name="text_el" class="solr.TextField" positionIncrementGap="100">
  596. <analyzer>
  597. <tokenizer class="solr.StandardTokenizerFactory"/>
  598. <!-- greek specific lowercase for sigma -->
  599. <filter class="solr.GreekLowerCaseFilterFactory"/>
  600. <filter class="solr.StopFilterFactory" ignoreCase="false" words="lang/stopwords_el.txt" enablePositionIncrements="true"/>
  601. <filter class="solr.GreekStemFilterFactory"/>
  602. </analyzer>
  603. </fieldType>
  604. <!-- Spanish -->
  605. <fieldType name="text_es" class="solr.TextField" positionIncrementGap="100">
  606. <analyzer>
  607. <tokenizer class="solr.StandardTokenizerFactory"/>
  608. <filter class="solr.LowerCaseFilterFactory"/>
  609. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_es.txt" format="snowball" enablePositionIncrements="true"/>
  610. <filter class="solr.SpanishLightStemFilterFactory"/>
  611. <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Spanish"/> -->
  612. </analyzer>
  613. </fieldType>
  614. <!-- Basque -->
  615. <fieldType name="text_eu" class="solr.TextField" positionIncrementGap="100">
  616. <analyzer>
  617. <tokenizer class="solr.StandardTokenizerFactory"/>
  618. <filter class="solr.LowerCaseFilterFactory"/>
  619. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_eu.txt" enablePositionIncrements="true"/>
  620. <filter class="solr.SnowballPorterFilterFactory" language="Basque"/>
  621. </analyzer>
  622. </fieldType>
  623. <!-- Persian -->
  624. <fieldType name="text_fa" class="solr.TextField" positionIncrementGap="100">
  625. <analyzer>
  626. <!-- for ZWNJ -->
  627. <charFilter class="solr.PersianCharFilterFactory"/>
  628. <tokenizer class="solr.StandardTokenizerFactory"/>
  629. <filter class="solr.LowerCaseFilterFactory"/>
  630. <filter class="solr.ArabicNormalizationFilterFactory"/>
  631. <filter class="solr.PersianNormalizationFilterFactory"/>
  632. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fa.txt" enablePositionIncrements="true"/>
  633. </analyzer>
  634. </fieldType>
  635. <!-- Finnish -->
  636. <fieldType name="text_fi" class="solr.TextField" positionIncrementGap="100">
  637. <analyzer>
  638. <tokenizer class="solr.StandardTokenizerFactory"/>
  639. <filter class="solr.LowerCaseFilterFactory"/>
  640. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fi.txt" format="snowball" enablePositionIncrements="true"/>
  641. <filter class="solr.SnowballPorterFilterFactory" language="Finnish"/>
  642. <!-- less aggressive: <filter class="solr.FinnishLightStemFilterFactory"/> -->
  643. </analyzer>
  644. </fieldType>
  645. <!-- French -->
  646. <fieldType name="text_fr" class="solr.TextField" positionIncrementGap="100">
  647. <analyzer>
  648. <tokenizer class="solr.StandardTokenizerFactory"/>
  649. <!-- removes l', etc -->
  650. <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_fr.txt"/>
  651. <filter class="solr.LowerCaseFilterFactory"/>
  652. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_fr.txt" format="snowball" enablePositionIncrements="true"/>
  653. <filter class="solr.FrenchLightStemFilterFactory"/>
  654. <!-- less aggressive: <filter class="solr.FrenchMinimalStemFilterFactory"/> -->
  655. <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="French"/> -->
  656. </analyzer>
  657. </fieldType>
  658. <!-- Irish -->
  659. <fieldType name="text_ga" class="solr.TextField" positionIncrementGap="100">
  660. <analyzer>
  661. <tokenizer class="solr.StandardTokenizerFactory"/>
  662. <!-- removes d', etc -->
  663. <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_ga.txt"/>
  664. <!-- removes n-, etc. position increments is intentionally false! -->
  665. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/hyphenations_ga.txt" enablePositionIncrements="false"/>
  666. <filter class="solr.IrishLowerCaseFilterFactory"/>
  667. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ga.txt" enablePositionIncrements="true"/>
  668. <filter class="solr.SnowballPorterFilterFactory" language="Irish"/>
  669. </analyzer>
  670. </fieldType>
  671. <!-- Galician -->
  672. <fieldType name="text_gl" class="solr.TextField" positionIncrementGap="100">
  673. <analyzer>
  674. <tokenizer class="solr.StandardTokenizerFactory"/>
  675. <filter class="solr.LowerCaseFilterFactory"/>
  676. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_gl.txt" enablePositionIncrements="true"/>
  677. <filter class="solr.GalicianStemFilterFactory"/>
  678. <!-- less aggressive: <filter class="solr.GalicianMinimalStemFilterFactory"/> -->
  679. </analyzer>
  680. </fieldType>
  681. <!-- Hindi -->
  682. <fieldType name="text_hi" class="solr.TextField" positionIncrementGap="100">
  683. <analyzer>
  684. <tokenizer class="solr.StandardTokenizerFactory"/>
  685. <filter class="solr.LowerCaseFilterFactory"/>
  686. <!-- normalizes unicode representation -->
  687. <filter class="solr.IndicNormalizationFilterFactory"/>
  688. <!-- normalizes variation in spelling -->
  689. <filter class="solr.HindiNormalizationFilterFactory"/>
  690. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hi.txt" enablePositionIncrements="true"/>
  691. <filter class="solr.HindiStemFilterFactory"/>
  692. </analyzer>
  693. </fieldType>
  694. <!-- Hungarian -->
  695. <fieldType name="text_hu" class="solr.TextField" positionIncrementGap="100">
  696. <analyzer>
  697. <tokenizer class="solr.StandardTokenizerFactory"/>
  698. <filter class="solr.LowerCaseFilterFactory"/>
  699. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hu.txt" format="snowball" enablePositionIncrements="true"/>
  700. <filter class="solr.SnowballPorterFilterFactory" language="Hungarian"/>
  701. <!-- less aggressive: <filter class="solr.HungarianLightStemFilterFactory"/> -->
  702. </analyzer>
  703. </fieldType>
  704. <!-- Armenian -->
  705. <fieldType name="text_hy" class="solr.TextField" positionIncrementGap="100">
  706. <analyzer>
  707. <tokenizer class="solr.StandardTokenizerFactory"/>
  708. <filter class="solr.LowerCaseFilterFactory"/>
  709. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_hy.txt" enablePositionIncrements="true"/>
  710. <filter class="solr.SnowballPorterFilterFactory" language="Armenian"/>
  711. </analyzer>
  712. </fieldType>
  713. <!-- Indonesian -->
  714. <fieldType name="text_id" class="solr.TextField" positionIncrementGap="100">
  715. <analyzer>
  716. <tokenizer class="solr.StandardTokenizerFactory"/>
  717. <filter class="solr.LowerCaseFilterFactory"/>
  718. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_id.txt" enablePositionIncrements="true"/>
  719. <!-- for a less aggressive approach (only inflectional suffixes), set stemDerivational to false -->
  720. <filter class="solr.IndonesianStemFilterFactory" stemDerivational="true"/>
  721. </analyzer>
  722. </fieldType>
  723. <!-- Italian -->
  724. <fieldType name="text_it" class="solr.TextField" positionIncrementGap="100">
  725. <analyzer>
  726. <tokenizer class="solr.StandardTokenizerFactory"/>
  727. <!-- removes l', etc -->
  728. <filter class="solr.ElisionFilterFactory" ignoreCase="true" articles="lang/contractions_it.txt"/>
  729. <filter class="solr.LowerCaseFilterFactory"/>
  730. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_it.txt" format="snowball" enablePositionIncrements="true"/>
  731. <filter class="solr.ItalianLightStemFilterFactory"/>
  732. <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Italian"/> -->
  733. </analyzer>
  734. </fieldType>
  735. <!-- Latvian -->
  736. <fieldType name="text_lv" class="solr.TextField" positionIncrementGap="100">
  737. <analyzer>
  738. <tokenizer class="solr.StandardTokenizerFactory"/>
  739. <filter class="solr.LowerCaseFilterFactory"/>
  740. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_lv.txt" enablePositionIncrements="true"/>
  741. <filter class="solr.LatvianStemFilterFactory"/>
  742. </analyzer>
  743. </fieldType>
  744. <!-- Dutch -->
  745. <fieldType name="text_nl" class="solr.TextField" positionIncrementGap="100">
  746. <analyzer>
  747. <tokenizer class="solr.StandardTokenizerFactory"/>
  748. <filter class="solr.LowerCaseFilterFactory"/>
  749. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_nl.txt" format="snowball" enablePositionIncrements="true"/>
  750. <filter class="solr.StemmerOverrideFilterFactory" dictionary="lang/stemdict_nl.txt" ignoreCase="false"/>
  751. <filter class="solr.SnowballPorterFilterFactory" language="Dutch"/>
  752. </analyzer>
  753. </fieldType>
  754. <!-- Norwegian -->
  755. <fieldType name="text_no" class="solr.TextField" positionIncrementGap="100">
  756. <analyzer>
  757. <tokenizer class="solr.StandardTokenizerFactory"/>
  758. <filter class="solr.LowerCaseFilterFactory"/>
  759. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_no.txt" format="snowball" enablePositionIncrements="true"/>
  760. <filter class="solr.SnowballPorterFilterFactory" language="Norwegian"/>
  761. <!-- less aggressive: <filter class="solr.NorwegianLightStemFilterFactory"/> -->
  762. <!-- singular/plural: <filter class="solr.NorwegianMinimalStemFilterFactory"/> -->
  763. </analyzer>
  764. </fieldType>
  765. <!-- Portuguese -->
  766. <fieldType name="text_pt" class="solr.TextField" positionIncrementGap="100">
  767. <analyzer>
  768. <tokenizer class="solr.StandardTokenizerFactory"/>
  769. <filter class="solr.LowerCaseFilterFactory"/>
  770. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_pt.txt" format="snowball" enablePositionIncrements="true"/>
  771. <filter class="solr.PortugueseLightStemFilterFactory"/>
  772. <!-- less aggressive: <filter class="solr.PortugueseMinimalStemFilterFactory"/> -->
  773. <!-- more aggressive: <filter class="solr.SnowballPorterFilterFactory" language="Portuguese"/> -->
  774. <!-- most aggressive: <filter class="solr.PortugueseStemFilterFactory"/> -->
  775. </analyzer>
  776. </fieldType>
  777. <!-- Romanian -->
  778. <fieldType name="text_ro" class="solr.TextField" positionIncrementGap="100">
  779. <analyzer>
  780. <tokenizer class="solr.StandardTokenizerFactory"/>
  781. <filter class="solr.LowerCaseFilterFactory"/>
  782. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ro.txt" enablePositionIncrements="true"/>
  783. <filter class="solr.SnowballPorterFilterFactory" language="Romanian"/>
  784. </analyzer>
  785. </fieldType>
  786. <!-- Russian -->
  787. <fieldType name="text_ru" class="solr.TextField" positionIncrementGap="100">
  788. <analyzer>
  789. <tokenizer class="solr.StandardTokenizerFactory"/>
  790. <filter class="solr.LowerCaseFilterFactory"/>
  791. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_ru.txt" format="snowball" enablePositionIncrements="true"/>
  792. <filter class="solr.SnowballPorterFilterFactory" language="Russian"/>
  793. <!-- less aggressive: <filter class="solr.RussianLightStemFilterFactory"/> -->
  794. </analyzer>
  795. </fieldType>
  796. <!-- Swedish -->
  797. <fieldType name="text_sv" class="solr.TextField" positionIncrementGap="100">
  798. <analyzer>
  799. <tokenizer class="solr.StandardTokenizerFactory"/>
  800. <filter class="solr.LowerCaseFilterFactory"/>
  801. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_sv.txt" format="snowball" enablePositionIncrements="true"/>
  802. <filter class="solr.SnowballPorterFilterFactory" language="Swedish"/>
  803. <!-- less aggressive: <filter class="solr.SwedishLightStemFilterFactory"/> -->
  804. </analyzer>
  805. </fieldType>
  806. <!-- Thai -->
  807. <fieldType name="text_th" class="solr.TextField" positionIncrementGap="100">
  808. <analyzer>
  809. <tokenizer class="solr.StandardTokenizerFactory"/>
  810. <filter class="solr.LowerCaseFilterFactory"/>
  811. <filter class="solr.ThaiWordFilterFactory"/>
  812. <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_th.txt" enablePositionIncrements="true"/>
  813. </analyzer>
  814. </fieldType>
  815. <!-- Turkish -->
  816. <fieldType name="text_tr" class="solr.TextField" positionIncrementGap="100">
  817. <analyzer>
  818. <tokenizer class="solr.StandardTokenizerFactory"/>
  819. <filter class="solr.TurkishLowerCaseFilterFactory"/>
  820. <filter class="solr.StopFilterFactory" ignoreCase="false" words="lang/stopwords_tr.txt" enablePositionIncrements="true"/>
  821. <filter class="solr.SnowballPorterFilterFactory" language="Turkish"/>
  822. </analyzer>
  823. </fieldType>
  824. </types>
  825. <!-- Similarity is the scoring routine for each document vs. a query.
  826. A custom Similarity or SimilarityFactory may be specified here, but
  827. the default is fine for most applications.
  828. For more info: http://wiki.apache.org/solr/SchemaXml#Similarity
  829. -->
  830. <!--
  831. <similarity class="com.example.solr.CustomSimilarityFactory">
  832. <str name="paramkey">param value</str>
  833. </similarity>
  834. -->
  835. </schema>