schema.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  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. <!DOCTYPE schema [
  17. <!ENTITY extrafields SYSTEM "schema_extra_fields.xml">
  18. <!ENTITY extratypes SYSTEM "schema_extra_types.xml">
  19. ]>
  20. <!--
  21. This is the Solr schema file. This file should be named "schema.xml" and
  22. should be in the conf directory under the solr home
  23. (i.e. ./solr/conf/schema.xml by default)
  24. or located where the classloader for the Solr webapp can find it.
  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. For more information, on how to customize this file, please see
  28. http://wiki.apache.org/solr/SchemaXml
  29. PERFORMANCE NOTE: this schema includes many optional features and should not
  30. be used for benchmarking. To improve performance one could
  31. - set stored="false" for all fields possible (esp large fields) when you
  32. only need to search on the field but don't need to return the original
  33. value.
  34. - set indexed="false" if you don't need to search on the field, but only
  35. return the field as a result of searching on other indexed fields.
  36. - remove all unneeded copyField statements
  37. - for best index size and searching performance, set "index" to false
  38. for all general text fields, use copyField to copy them to the
  39. catchall "text" field, and use that for searching.
  40. - For maximum indexing performance, use the ConcurrentUpdateSolrServer
  41. java client.
  42. - Remember to run the JVM in server mode, and use a higher logging level
  43. that avoids logging every request
  44. -->
  45. <schema name="drupal-4.2.1-solr-8.x-0" version="1.6">
  46. <!-- attribute "name" is the name of this schema and is only used for display purposes.
  47. version="x.y" is Solr's version number for the schema syntax and
  48. semantics. It should not normally be changed by applications.
  49. 1.0: multiValued attribute did not exist, all fields are multiValued
  50. by nature
  51. 1.1: multiValued attribute introduced, false by default
  52. 1.2: omitTermFreqAndPositions attribute introduced, true by default
  53. except for text fields.
  54. 1.3: removed optional field compress feature
  55. 1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser
  56. behavior when a single string produces multiple tokens. Defaults
  57. to off for version >= 1.4
  58. 1.5: omitNorms defaults to true for primitive field types
  59. (int, float, boolean, string...)
  60. 1.6: useDocValuesAsStored defaults to true.
  61. -->
  62. <!-- Valid attributes for fields:
  63. name: mandatory - the name for the field
  64. type: mandatory - the name of a field type from the
  65. fieldTypes
  66. indexed: true if this field should be indexed (searchable or sortable)
  67. stored: true if this field should be retrievable
  68. docValues: true if this field should have doc values. Doc values are
  69. useful (required, if you are using *Point fields) for faceting,
  70. grouping, sorting and function queries. Doc values will make the index
  71. faster to load, more NRT-friendly and more memory-efficient.
  72. They however come with some limitations: they are currently only
  73. supported by StrField, UUIDField, all *PointFields, and depending
  74. on the field type, they might require the field to be single-valued,
  75. be required or have a default value (check the documentation
  76. of the field type you're interested in for more information)
  77. multiValued: true if this field may contain multiple values per document
  78. omitNorms: (expert) set to true to omit the norms associated with
  79. this field (this disables length normalization and index-time
  80. boosting for the field, and saves some memory). Only full-text
  81. fields or fields that need an index-time boost need norms.
  82. Norms are omitted for primitive (non-analyzed) types by default.
  83. termVectors: [false] set to true to store the term vector for a
  84. given field.
  85. When using MoreLikeThis, fields used for similarity should be
  86. stored for best performance.
  87. termPositions: Store position information with the term vector.
  88. This will increase storage costs.
  89. termOffsets: Store offset information with the term vector. This
  90. will increase storage costs.
  91. termPayloads: Store payload information with the term vector. This
  92. will increase storage costs.
  93. required: The field is required. It will throw an error if the
  94. value does not exist
  95. default: a value that should be used if no value is specified
  96. when adding a document.
  97. -->
  98. <!-- field names should consist of alphanumeric or underscore characters only and
  99. not start with a digit. This is not currently strictly enforced,
  100. but other field names will not have first class support from all components
  101. and back compatibility is not guaranteed. Names with both leading and
  102. trailing underscores (e.g. _version_) are reserved.
  103. -->
  104. <!-- If you remove this field, you must _also_ disable the update log in solrconfig.xml
  105. or Solr won't start. _version_ and update log are required for SolrCloud
  106. -->
  107. <!-- doc values are enabled by default for primitive types such as long so we don't index the version field -->
  108. <field name="_version_" type="plong" indexed="false" stored="false"/>
  109. <!-- points to the root document of a block of nested documents. Required for nested
  110. document support, may be removed otherwise
  111. -->
  112. <field name="_root_" type="string" indexed="true" stored="false" docValues="false"/>
  113. <!-- Only remove the "id" field if you have a very good reason to. While not strictly
  114. required, it is highly recommended. A <uniqueKey> is present in almost all Solr
  115. installations. See the <uniqueKey> declaration below where <uniqueKey> is set to "id".
  116. -->
  117. <!-- The document id is usually derived from a site-specific key (hash) and the
  118. entity type and ID like:
  119. Search Api 7.x:
  120. The format used is $document->id = $index_id . '-' . $item_id
  121. Search Api 8.x:
  122. The format used is $document->id = $site_hash . '-' . $index_id . '-' . $item_id
  123. Apache Solr Search Integration 7.x:
  124. The format used is $document->id = $site_hash . '/' . $entity_type . '/' . $entity->id;
  125. -->
  126. <!-- The Highlighter Component requires the id field to be "stored" even if docValues are set. -->
  127. <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" docValues="true"/>
  128. <!-- Search Api specific fields -->
  129. <!-- index_id is the machine name of the search index this entry belongs to. -->
  130. <field name="index_id" type="string" indexed="true" stored="false" multiValued="false" docValues="true"/>
  131. <!-- Here, default is used to create a "timestamp" field indicating
  132. when each document was indexed.-->
  133. <field name="timestamp" type="pdate" indexed="true" stored="false" default="NOW" multiValued="false" docValues="true"/>
  134. <field name="site" type="string" indexed="true" stored="false" multiValued="false" docValues="true"/>
  135. <field name="hash" type="string" indexed="true" stored="false" multiValued="false" docValues="true"/>
  136. <field name="boost_document" type="pfloat" indexed="true" stored="false" multiValued="false" docValues="true"/>
  137. <field name="boost_term" type="boost_term_payload" indexed="true" stored="false" multiValued="true"/>
  138. <!-- Currently the suggester context filter query (suggest.cfq) accesses the tags using the stored values, neither the indexed terms nor the docValues.
  139. Therefore the dynamicField sm_* isn't suitable at the moment -->
  140. <field name="sm_context_tags" type="string" indexed="true" stored="true" multiValued="true" docValues="false"/>
  141. <!-- Dynamic field definitions. If a field name is not found, dynamicFields
  142. will be used if the name matches any of the patterns.
  143. RESTRICTION: the glob-like pattern in the name attribute must have
  144. a "*" only at the start or the end.
  145. EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i)
  146. Longer patterns will be matched first. if equal size patterns
  147. both match, the first appearing in the schema will be used. -->
  148. <!-- For 2 and 3 letter prefix dynamic fields, the 1st letter indicates the data type and
  149. the last letter is 's' for single valued, 'm' for multi-valued -->
  150. <!-- We use plong for integer since 64 bit ints are now common in PHP. -->
  151. <dynamicField name="is_*" type="plong" indexed="true" stored="false" multiValued="false" docValues="true" termVectors="true"/>
  152. <dynamicField name="im_*" type="plong" indexed="true" stored="false" multiValued="true" docValues="true" termVectors="true"/>
  153. <!-- List of floats can be saved in a regular float field -->
  154. <dynamicField name="fs_*" type="pfloat" indexed="true" stored="false" multiValued="false" docValues="true"/>
  155. <dynamicField name="fm_*" type="pfloat" indexed="true" stored="false" multiValued="true" docValues="true"/>
  156. <!-- List of doubles can be saved in a regular double field -->
  157. <dynamicField name="ps_*" type="pdouble" indexed="true" stored="false" multiValued="false" docValues="true"/>
  158. <dynamicField name="pm_*" type="pdouble" indexed="true" stored="false" multiValued="true" docValues="true"/>
  159. <!-- List of booleans can be saved in a regular boolean field -->
  160. <dynamicField name="bm_*" type="boolean" indexed="true" stored="false" multiValued="true" docValues="true" termVectors="true"/>
  161. <dynamicField name="bs_*" type="boolean" indexed="true" stored="false" multiValued="false" docValues="true" termVectors="true"/>
  162. <!-- Regular text (without processing) can be stored in a string field-->
  163. <dynamicField name="ss_*" type="string" indexed="true" stored="false" multiValued="false" docValues="true" termVectors="true"/>
  164. <!-- For field types using SORTED_SET, multiple identical entries are collapsed into a single value.
  165. Thus if I insert values 4, 5, 2, 4, 1, my return will be 1, 2, 4, 5 when enabling docValues.
  166. If you need to preserve the order and duplicate entries, consider to store the values as zm_* (twice). -->
  167. <dynamicField name="sm_*" type="string" indexed="true" stored="false" multiValued="true" docValues="true" termVectors="true"/>
  168. <!-- Special-purpose text fields -->
  169. <dynamicField name="tws_*" type="text_ws" indexed="true" stored="true" multiValued="false"/>
  170. <dynamicField name="twm_*" type="text_ws" indexed="true" stored="true" multiValued="true"/>
  171. <!-- Trie fields are deprecated. Point fields solve all needs. But we keep the dedicated field names for backward compatibility. -->
  172. <dynamicField name="ds_*" type="pdate" indexed="true" stored="false" multiValued="false" docValues="true"/>
  173. <dynamicField name="dm_*" type="pdate" indexed="true" stored="false" multiValued="true" docValues="true"/>
  174. <!-- This field is used to store date ranges -->
  175. <dynamicField name="drs_*" type="date_range" indexed="true" stored="true" multiValued="false"/>
  176. <dynamicField name="drm_*" type="date_range" indexed="true" stored="true" multiValued="true"/>
  177. <dynamicField name="its_*" type="plong" indexed="true" stored="false" multiValued="false" docValues="true" termVectors="true"/>
  178. <dynamicField name="itm_*" type="plong" indexed="true" stored="false" multiValued="true" docValues="true" termVectors="true"/>
  179. <dynamicField name="fts_*" type="pfloat" indexed="true" stored="false" multiValued="false" docValues="true"/>
  180. <dynamicField name="ftm_*" type="pfloat" indexed="true" stored="false" multiValued="true" docValues="true"/>
  181. <dynamicField name="pts_*" type="pdouble" indexed="true" stored="false" multiValued="false" docValues="true"/>
  182. <dynamicField name="ptm_*" type="pdouble" indexed="true" stored="false" multiValued="true" docValues="true"/>
  183. <!-- Binary fields can be populated using base64 encoded data. Useful e.g. for embedding
  184. a small image in a search result using the data URI scheme -->
  185. <dynamicField name="xs_*" type="binary" indexed="false" stored="true" multiValued="false"/>
  186. <dynamicField name="xm_*" type="binary" indexed="false" stored="true" multiValued="true"/>
  187. <!-- Trie fields are deprecated. Point fields solve all needs. But we keep the dedicated field names for backward compatibility. -->
  188. <dynamicField name="dds_*" type="pdate" indexed="true" stored="false" multiValued="false" docValues="true"/>
  189. <dynamicField name="ddm_*" type="pdate" indexed="true" stored="false" multiValued="true" docValues="true"/>
  190. <!-- In case a 32 bit int is really needed, we provide these fields. 'h' is mnemonic for 'half word', i.e. 32 bit on 64 arch -->
  191. <dynamicField name="hs_*" type="pint" indexed="true" stored="false" multiValued="false" docValues="true"/>
  192. <dynamicField name="hm_*" type="pint" indexed="true" stored="false" multiValued="true" docValues="true"/>
  193. <!-- Trie fields are deprecated. Point fields solve all needs. But we keep the dedicated field names for backward compatibility. -->
  194. <dynamicField name="hts_*" type="pint" indexed="true" stored="false" multiValued="false" docValues="true"/>
  195. <dynamicField name="htm_*" type="pint" indexed="true" stored="false" multiValued="true" docValues="true"/>
  196. <!-- Unindexed string fields that can be used to store values that won't be searchable -->
  197. <dynamicField name="zs_*" type="string" indexed="false" stored="true" multiValued="false"/>
  198. <dynamicField name="zm_*" type="string" indexed="false" stored="true" multiValued="true"/>
  199. <!-- Fields for location searches.
  200. http://wiki.apache.org/solr/SpatialSearch#geodist_-_The_distance_function -->
  201. <dynamicField name="points_*" type="point" indexed="true" stored="true" multiValued="false"/>
  202. <dynamicField name="pointm_*" type="point" indexed="true" stored="true" multiValued="true"/>
  203. <dynamicField name="locs_*" type="location" indexed="true" stored="true" multiValued="false"/>
  204. <dynamicField name="locm_*" type="location" indexed="true" stored="true" multiValued="true"/>
  205. <!-- GeoHash fields are deprecated. LatLonPointSpatial fields solve all needs. But we keep the dedicated field names for backward compatibility. -->
  206. <dynamicField name="geos_*" type="location" indexed="true" stored="true" multiValued="false"/>
  207. <dynamicField name="geom_*" type="location" indexed="true" stored="true" multiValued="true"/>
  208. <dynamicField name="bboxs_*" type="bbox" indexed="true" stored="true" multiValued="false" />
  209. <dynamicField name="bboxm_*" type="bbox" indexed="true" stored="true" multiValued="true" />
  210. <dynamicField name="rpts_*" type="location_rpt" indexed="true" stored="true" multiValued="false" />
  211. <dynamicField name="rptm_*" type="location_rpt" indexed="true" stored="true" multiValued="true" />
  212. <!-- External file fields -->
  213. <dynamicField name="eff_*" type="file"/>
  214. <!-- A random sort field -->
  215. <dynamicField name="random_*" type="random" indexed="true" stored="true"/>
  216. <!-- This field is used to store access information (e.g. node access grants), as opposed to field data -->
  217. <dynamicField name="access_*" type="pint" indexed="true" stored="false" multiValued="true" docValues="true"/>
  218. <!-- The following causes solr to ignore any fields that don't already match an existing
  219. field name or dynamic field, rather than reporting them as an error.
  220. Alternately, change the type="ignored" to some other type e.g. "text" if you want
  221. unknown fields indexed and/or stored by default -->
  222. <dynamicField name="*" type="ignored" multiValued="true" />
  223. <!-- field type definitions. The "name" attribute is
  224. just a label to be used by field definitions. The "class"
  225. attribute and any other attributes determine the real
  226. behavior of the fieldType.
  227. Class names starting with "solr" refer to java classes in a
  228. standard package such as org.apache.solr.analysis
  229. -->
  230. <!-- The StrField type is not analyzed, but indexed/stored verbatim.
  231. It supports doc values but in that case the field needs to be
  232. single-valued and either required or have a default value.
  233. -->
  234. <fieldType name="string" class="solr.StrField"/>
  235. <!-- boolean type: "true" or "false" -->
  236. <fieldType name="boolean" class="solr.BoolField"/>
  237. <!-- sortMissingLast and sortMissingFirst attributes are optional attributes are
  238. currently supported on types that are sorted internally as strings
  239. and on numeric types.
  240. This includes "string", "boolean", "pint", "pfloat", "plong", "pdate", "pdouble".
  241. - If sortMissingLast="true", then a sort on this field will cause documents
  242. without the field to come after documents with the field,
  243. regardless of the requested sort order (asc or desc).
  244. - If sortMissingFirst="true", then a sort on this field will cause documents
  245. without the field to come before documents with the field,
  246. regardless of the requested sort order.
  247. - If sortMissingLast="false" and sortMissingFirst="false" (the default),
  248. then default lucene sorting will be used which places docs without the
  249. field first in an ascending sort and last in a descending sort.
  250. -->
  251. <!--
  252. Numeric field types that index values using KD-trees.
  253. Point fields don't support FieldCache, so they must have docValues="true" if needed for sorting, faceting, functions, etc.
  254. -->
  255. <fieldType name="pint" class="solr.IntPointField" docValues="true"/>
  256. <fieldType name="pfloat" class="solr.FloatPointField" docValues="true"/>
  257. <fieldType name="plong" class="solr.LongPointField" docValues="true"/>
  258. <fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>
  259. <fieldType name="pints" class="solr.IntPointField" docValues="true" multiValued="true"/>
  260. <fieldType name="pfloats" class="solr.FloatPointField" docValues="true" multiValued="true"/>
  261. <fieldType name="plongs" class="solr.LongPointField" docValues="true" multiValued="true"/>
  262. <fieldType name="pdoubles" class="solr.DoublePointField" docValues="true" multiValued="true"/>
  263. <!--
  264. The ExternalFileField type gets values from an external file instead of the
  265. index. This is useful for data such as rankings that might change frequently
  266. and require different update frequencies than the documents they are
  267. associated with.
  268. -->
  269. <fieldType name="file" keyField="id" defVal="1" stored="false" indexed="false" class="solr.ExternalFileField"/>
  270. <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
  271. is a more restricted form of the canonical representation of dateTime
  272. http://www.w3.org/TR/xmlschema-2/#dateTime
  273. The trailing "Z" designates UTC time and is mandatory.
  274. Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
  275. All other components are mandatory.
  276. Expressions can also be used to denote calculations that should be
  277. performed relative to "NOW" to determine the value, ie...
  278. NOW/HOUR
  279. ... Round to the start of the current hour
  280. NOW-1DAY
  281. ... Exactly 1 day prior to now
  282. NOW/DAY+6MONTHS+3DAYS
  283. ... 6 months and 3 days in the future from the start of
  284. the current day
  285. Consult the DatePointField javadocs for more information.
  286. -->
  287. <!-- KD-tree versions of date fields -->
  288. <fieldType name="pdate" class="solr.DatePointField" docValues="true"/>
  289. <fieldType name="pdates" class="solr.DatePointField" docValues="true" multiValued="true"/>
  290. <!-- A date range field -->
  291. <fieldType name="date_range" class="solr.DateRangeField"/>
  292. <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
  293. <fieldType name="binary" class="solr.BinaryField"/>
  294. <!-- The "RandomSortField" is not used to store or search any
  295. data. You can declare fields of this type it in your schema
  296. to generate pseudo-random orderings of your docs for sorting
  297. or function purposes. The ordering is generated based on the field
  298. name and the version of the index. As long as the index version
  299. remains unchanged, and the same field name is reused,
  300. the ordering of the docs will be consistent.
  301. If you want different psuedo-random orderings of documents,
  302. for the same version of the index, use a dynamicField and
  303. change the field name in the request.
  304. -->
  305. <fieldType name="random" class="solr.RandomSortField" indexed="true" />
  306. <!-- solr.TextField allows the specification of custom text analyzers
  307. specified as a tokenizer and a list of token filters. Different
  308. analyzers may be specified for indexing and querying.
  309. The optional positionIncrementGap puts space between multiple fields of
  310. this type on the same document, with the purpose of preventing false phrase
  311. matching across fields.
  312. For more info on customizing your analyzer chain, please see
  313. http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
  314. -->
  315. <!-- One can also specify an existing Analyzer class that has a
  316. default constructor via the class attribute on the analyzer element.
  317. Example:
  318. <fieldType name="text_greek" class="solr.TextField">
  319. <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
  320. </fieldType>
  321. -->
  322. <!-- A text field that only splits on whitespace for exact matching of words -->
  323. <fieldType name="text_ws" class="solr.TextField" omitNorms="true" positionIncrementGap="100">
  324. <analyzer>
  325. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  326. <filter class="solr.LowerCaseFilterFactory"/>
  327. </analyzer>
  328. </fieldType>
  329. <fieldType name="boost_term_payload" stored="false" indexed="true" class="solr.TextField" >
  330. <analyzer>
  331. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  332. <filter class="solr.LengthFilterFactory" min="2" max="100"/>
  333. <filter class="solr.LowerCaseFilterFactory"/>
  334. <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  335. <!--
  336. The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
  337. a token of "foo|1.4" would be indexed as "foo" with a payload of 1.4f
  338. Attributes of the DelimitedPayloadTokenFilterFactory :
  339. "delimiter" - a one character delimiter. Default is | (pipe)
  340. "encoder" - how to encode the following value into a playload
  341. float -> org.apache.lucene.analysis.payloads.FloatEncoder,
  342. integer -> o.a.l.a.p.IntegerEncoder
  343. identity -> o.a.l.a.p.IdentityEncoder
  344. Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
  345. -->
  346. <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
  347. </analyzer>
  348. </fieldType>
  349. <!-- since fields of this type are by default not stored or indexed,
  350. any data added to them will be ignored outright. -->
  351. <fieldType name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
  352. <!-- This point type indexes the coordinates as separate fields (subFields)
  353. If subFieldType is defined, it references a type, and a dynamic field
  354. definition is created matching *___<typename>. Alternately, if
  355. subFieldSuffix is defined, that is used to create the subFields.
  356. Example: if subFieldType="double", then the coordinates would be
  357. indexed in fields myloc_0___double,myloc_1___double.
  358. Example: if subFieldSuffix="_d" then the coordinates would be indexed
  359. in fields myloc_0_d,myloc_1_d
  360. The subFields are an implementation detail of the fieldType, and end
  361. users normally should not need to know about them.
  362. -->
  363. <!-- In Drupal we only use prefixes for dynmaic fields. Tht might change in
  364. the future but for now we keep this pattern.
  365. -->
  366. <fieldType name="point" class="solr.PointType" dimension="2" subFieldType="pdouble"/>
  367. <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
  368. <fieldType name="location" class="solr.LatLonPointSpatialField" docValues="true"/>
  369. <!-- An alternative geospatial field type new to Solr 4. It supports multiValued and polygon shapes.
  370. For more information about this and other Spatial fields new to Solr 4, see:
  371. http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
  372. -->
  373. <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
  374. geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers" />
  375. <!-- Spatial rectangle (bounding box) field. It supports most spatial predicates, and has
  376. special relevancy modes: score=overlapRatio|area|area2D (local-param to the query). DocValues is recommended for
  377. relevancy. -->
  378. <fieldType name="bbox" class="solr.BBoxField"
  379. geo="true" distanceUnits="kilometers" numberType="_bbox_coord" />
  380. <fieldType name="_bbox_coord" class="solr.DoublePointField" docValues="true" stored="false"/>
  381. <!-- Money/currency field type. See http://wiki.apache.org/solr/MoneyFieldType
  382. Parameters:
  383. amountLongSuffix: Required. Refers to a dynamic field for the raw amount sub-field.
  384. The dynamic field must have a field type that extends LongValueFieldType.
  385. Note: If you expect to use Atomic Updates, this dynamic field may not be stored.
  386. codeStrSuffix: Required. Refers to a dynamic field for the currency code sub-field.
  387. The dynamic field must have a field type that extends StrField.
  388. Note: If you expect to use Atomic Updates, this dynamic field may not be stored.
  389. defaultCurrency: Specifies the default currency if none specified. Defaults to "USD"
  390. providerClass: Lets you plug in other exchange provider backend:
  391. solr.FileExchangeRateProvider is the default and takes one parameter:
  392. currencyConfig: name of an xml file holding exchange rates
  393. solr.OpenExchangeRatesOrgProvider uses rates from openexchangerates.org:
  394. ratesFileLocation: URL or path to rates JSON file (default latest.json on the web)
  395. refreshInterval: Number of minutes between each rates fetch (default: 1440, min: 60)
  396. -->
  397. <!-- <fieldType name="currency" class="solr.CurrencyFieldType" amountLongSuffix="_l_ns" codeStrSuffix="_s_ns"
  398. defaultCurrency="USD" currencyConfig="currency.xml" /> -->
  399. <!-- Following is a dynamic way to include other fields, added by other contrib modules -->
  400. &extrafields;
  401. <!-- Following is a dynamic way to include other types, added by other contrib modules -->
  402. &extratypes;
  403. <!-- Field to use to determine and enforce document uniqueness.
  404. Unless this field is marked with required="false", it will be a required field
  405. -->
  406. <uniqueKey>id</uniqueKey>
  407. <!-- Similarity is the scoring routine for each document vs. a query.
  408. A custom Similarity or SimilarityFactory may be specified here, but
  409. the default is fine for most applications.
  410. For more info: http://wiki.apache.org/solr/SchemaXml#Similarity
  411. -->
  412. <!--
  413. <similarity class="com.example.solr.CustomSimilarityFactory">
  414. <str name="paramkey">param value</str>
  415. </similarity>
  416. -->
  417. </schema>