Guest User

schema.xml

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