Advertisement
Guest User

scheme.xml

a guest
Mar 2nd, 2014
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 16.17 KB | None | 0 0
  1. <!--
  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. <schema name="sunspot" version="1.0">
  48. <types>
  49. <!--
  50. field type definitions. The "name" attribute is
  51.       just a label to be used by field definitions.  The "class"
  52.       attribute and any other attributes determine the real
  53.       behavior of the fieldType.
  54.         Class names starting with "solr" refer to java classes in the
  55.       org.apache.solr.analysis package.
  56.    
  57. -->
  58. <!--  *** This fieldType is used by Sunspot! ***  -->
  59. <fieldType name="string" class="solr.StrField" omitNorms="true"/>
  60. <!--  *** This fieldType is used by Sunspot! ***  -->
  61. <fieldType name="tdouble" class="solr.TrieDoubleField" omitNorms="true"/>
  62. <!--  *** This fieldType is used by Sunspot! ***  -->
  63. <fieldType name="rand" class="solr.RandomSortField" omitNorms="true"/>
  64. <!--  *** This fieldType is used by Sunspot! ***  -->
  65. <fieldType name="text" class="solr.TextField" omitNorms="false">
  66. <analyzer>
  67. <tokenizer class="solr.StandardTokenizerFactory"/>
  68. <filter class="solr.StandardFilterFactory"/>
  69. <filter class="solr.LowerCaseFilterFactory"/>
  70. <filter class="solr.PorterStemFilterFactory"/>
  71. </analyzer>
  72. </fieldType>
  73. <!--  *** This fieldType is used by Sunspot! ***  -->
  74. <fieldType name="boolean" class="solr.BoolField" omitNorms="true"/>
  75. <!--  *** This fieldType is used by Sunspot! ***  -->
  76. <fieldType name="date" class="solr.DateField" omitNorms="true"/>
  77. <!--  *** This fieldType is used by Sunspot! ***  -->
  78. <fieldType name="sdouble" class="solr.SortableDoubleField" omitNorms="true"/>
  79. <!--  *** This fieldType is used by Sunspot! ***  -->
  80. <fieldType name="sfloat" class="solr.SortableFloatField" omitNorms="true"/>
  81. <!--  *** This fieldType is used by Sunspot! ***  -->
  82. <fieldType name="sint" class="solr.SortableIntField" omitNorms="true"/>
  83. <!--  *** This fieldType is used by Sunspot! ***  -->
  84. <fieldType name="slong" class="solr.SortableLongField" omitNorms="true"/>
  85. <!--  *** This fieldType is used by Sunspot! ***  -->
  86. <fieldType name="tint" class="solr.TrieIntField" omitNorms="true"/>
  87. <!--  *** This fieldType is used by Sunspot! ***  -->
  88. <fieldType name="tfloat" class="solr.TrieFloatField" omitNorms="true"/>
  89. <!--  *** This fieldType is used by Sunspot! ***  -->
  90. <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true"/>
  91. <!--
  92. A specialized field for geospatial search. If indexed, this fieldType must not be multivalued.
  93. -->
  94. <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
  95. </types>
  96. <fields>
  97. <!--
  98. Valid attributes for fields:
  99.     name: mandatory - the name for the field
  100.     type: mandatory - the name of a previously defined type from the
  101.       <types> section
  102.     indexed: true if this field should be indexed (searchable or sortable)
  103.     stored: true if this field should be retrievable
  104.     compressed: [false] if this field should be stored using gzip compression
  105.       (this will only apply if the field type is compressable; among
  106.       the standard field types, only TextField and StrField are)
  107.     multiValued: true if this field may contain multiple values per document
  108.     omitNorms: (expert) set to true to omit the norms associated with
  109.       this field (this disables length normalization and index-time
  110.       boosting for the field, and saves some memory).  Only full-text
  111.       fields or fields that need an index-time boost need norms.
  112.     termVectors: [false] set to true to store the term vector for a
  113.       given field.
  114.       When using MoreLikeThis, fields used for similarity should be
  115.       stored for best performance.
  116.     termPositions: Store position information with the term vector.  
  117.       This will increase storage costs.
  118.     termOffsets: Store offset information with the term vector. This
  119.       will increase storage costs.
  120.     default: a value that should be used if no value is specified
  121.       when adding a document.
  122.  
  123. -->
  124. <!--  *** This field is used by Sunspot! ***  -->
  125. <field name="id" stored="true" type="string" multiValued="false" indexed="true"/>
  126. <!--  *** This field is used by Sunspot! ***  -->
  127. <field name="type" stored="false" type="string" multiValued="true" indexed="true"/>
  128. <!--  *** This field is used by Sunspot! ***  -->
  129. <field name="class_name" stored="false" type="string" multiValued="false" indexed="true"/>
  130. <!--  *** This field is used by Sunspot! ***  -->
  131. <field name="text" stored="false" type="string" multiValued="true" indexed="true"/>
  132. <!--  *** This field is used by Sunspot! ***  -->
  133. <field name="lat" stored="true" type="tdouble" multiValued="false" indexed="true"/>
  134. <!--  *** This field is used by Sunspot! ***  -->
  135. <field name="lng" stored="true" type="tdouble" multiValued="false" indexed="true"/>
  136. <!--  *** This dynamicField is used by Sunspot! ***  -->
  137. <dynamicField name="random_*" stored="false" type="rand" multiValued="false" indexed="true"/>
  138. <!--  *** This dynamicField is used by Sunspot! ***  -->
  139. <dynamicField name="_local*" stored="false" type="tdouble" multiValued="false" indexed="true"/>
  140. <!--  *** This dynamicField is used by Sunspot! ***  -->
  141. <dynamicField name="*_text" stored="false" type="text" multiValued="true" indexed="true"/>
  142. <!--  *** This dynamicField is used by Sunspot! ***  -->
  143. <dynamicField name="*_texts" stored="true" type="text" multiValued="true" indexed="true"/>
  144. <!--  *** This dynamicField is used by Sunspot! ***  -->
  145. <dynamicField name="*_b" stored="false" type="boolean" multiValued="false" indexed="true"/>
  146. <!--  *** This dynamicField is used by Sunspot! ***  -->
  147. <dynamicField name="*_bm" stored="false" type="boolean" multiValued="true" indexed="true"/>
  148. <!--  *** This dynamicField is used by Sunspot! ***  -->
  149. <dynamicField name="*_bs" stored="true" type="boolean" multiValued="false" indexed="true"/>
  150. <!--  *** This dynamicField is used by Sunspot! ***  -->
  151. <dynamicField name="*_bms" stored="true" type="boolean" multiValued="true" indexed="true"/>
  152. <!--  *** This dynamicField is used by Sunspot! ***  -->
  153. <dynamicField name="*_d" stored="false" type="date" multiValued="false" indexed="true"/>
  154. <!--  *** This dynamicField is used by Sunspot! ***  -->
  155. <dynamicField name="*_dm" stored="false" type="date" multiValued="true" indexed="true"/>
  156. <!--  *** This dynamicField is used by Sunspot! ***  -->
  157. <dynamicField name="*_ds" stored="true" type="date" multiValued="false" indexed="true"/>
  158. <!--  *** This dynamicField is used by Sunspot! ***  -->
  159. <dynamicField name="*_dms" stored="true" type="date" multiValued="true" indexed="true"/>
  160. <!--  *** This dynamicField is used by Sunspot! ***  -->
  161. <dynamicField name="*_e" stored="false" type="sdouble" multiValued="false" indexed="true"/>
  162. <!--  *** This dynamicField is used by Sunspot! ***  -->
  163. <dynamicField name="*_em" stored="false" type="sdouble" multiValued="true" indexed="true"/>
  164. <!--  *** This dynamicField is used by Sunspot! ***  -->
  165. <dynamicField name="*_es" stored="true" type="sdouble" multiValued="false" indexed="true"/>
  166. <!--  *** This dynamicField is used by Sunspot! ***  -->
  167. <dynamicField name="*_ems" stored="true" type="sdouble" multiValued="true" indexed="true"/>
  168. <!--  *** This dynamicField is used by Sunspot! ***  -->
  169. <dynamicField name="*_f" stored="false" type="sfloat" multiValued="false" indexed="true"/>
  170. <!--  *** This dynamicField is used by Sunspot! ***  -->
  171. <dynamicField name="*_fm" stored="false" type="sfloat" multiValued="true" indexed="true"/>
  172. <!--  *** This dynamicField is used by Sunspot! ***  -->
  173. <dynamicField name="*_fs" stored="true" type="sfloat" multiValued="false" indexed="true"/>
  174. <!--  *** This dynamicField is used by Sunspot! ***  -->
  175. <dynamicField name="*_fms" stored="true" type="sfloat" multiValued="true" indexed="true"/>
  176. <!--  *** This dynamicField is used by Sunspot! ***  -->
  177. <dynamicField name="*_i" stored="false" type="sint" multiValued="false" indexed="true"/>
  178. <!--  *** This dynamicField is used by Sunspot! ***  -->
  179. <dynamicField name="*_im" stored="false" type="sint" multiValued="true" indexed="true"/>
  180. <!--  *** This dynamicField is used by Sunspot! ***  -->
  181. <dynamicField name="*_is" stored="true" type="sint" multiValued="false" indexed="true"/>
  182. <!--  *** This dynamicField is used by Sunspot! ***  -->
  183. <dynamicField name="*_ims" stored="true" type="sint" multiValued="true" indexed="true"/>
  184. <!--  *** This dynamicField is used by Sunspot! ***  -->
  185. <dynamicField name="*_l" stored="false" type="slong" multiValued="false" indexed="true"/>
  186. <!--  *** This dynamicField is used by Sunspot! ***  -->
  187. <dynamicField name="*_lm" stored="false" type="slong" multiValued="true" indexed="true"/>
  188. <!--  *** This dynamicField is used by Sunspot! ***  -->
  189. <dynamicField name="*_ls" stored="true" type="slong" multiValued="false" indexed="true"/>
  190. <!--  *** This dynamicField is used by Sunspot! ***  -->
  191. <dynamicField name="*_lms" stored="true" type="slong" multiValued="true" indexed="true"/>
  192. <!--  *** This dynamicField is used by Sunspot! ***  -->
  193. <dynamicField name="*_s" stored="false" type="string" multiValued="false" indexed="true"/>
  194. <!--  *** This dynamicField is used by Sunspot! ***  -->
  195. <dynamicField name="*_sm" stored="false" type="string" multiValued="true" indexed="true"/>
  196. <!--  *** This dynamicField is used by Sunspot! ***  -->
  197. <dynamicField name="*_ss" stored="true" type="string" multiValued="false" indexed="true"/>
  198. <!--  *** This dynamicField is used by Sunspot! ***  -->
  199. <dynamicField name="*_sms" stored="true" type="string" multiValued="true" indexed="true"/>
  200. <!--  *** This dynamicField is used by Sunspot! ***  -->
  201. <dynamicField name="*_it" stored="false" type="tint" multiValued="false" indexed="true"/>
  202. <!--  *** This dynamicField is used by Sunspot! ***  -->
  203. <dynamicField name="*_itm" stored="false" type="tint" multiValued="true" indexed="true"/>
  204. <!--  *** This dynamicField is used by Sunspot! ***  -->
  205. <dynamicField name="*_its" stored="true" type="tint" multiValued="false" indexed="true"/>
  206. <!--  *** This dynamicField is used by Sunspot! ***  -->
  207. <dynamicField name="*_itms" stored="true" type="tint" multiValued="true" indexed="true"/>
  208. <!--  *** This dynamicField is used by Sunspot! ***  -->
  209. <dynamicField name="*_ft" stored="false" type="tfloat" multiValued="false" indexed="true"/>
  210. <!--  *** This dynamicField is used by Sunspot! ***  -->
  211. <dynamicField name="*_ftm" stored="false" type="tfloat" multiValued="true" indexed="true"/>
  212. <!--  *** This dynamicField is used by Sunspot! ***  -->
  213. <dynamicField name="*_fts" stored="true" type="tfloat" multiValued="false" indexed="true"/>
  214. <!--  *** This dynamicField is used by Sunspot! ***  -->
  215. <dynamicField name="*_ftms" stored="true" type="tfloat" multiValued="true" indexed="true"/>
  216. <!--  *** This dynamicField is used by Sunspot! ***  -->
  217. <dynamicField name="*_dt" stored="false" type="tdate" multiValued="false" indexed="true"/>
  218. <!--  *** This dynamicField is used by Sunspot! ***  -->
  219. <dynamicField name="*_dtm" stored="false" type="tdate" multiValued="true" indexed="true"/>
  220. <!--  *** This dynamicField is used by Sunspot! ***  -->
  221. <dynamicField name="*_dts" stored="true" type="tdate" multiValued="false" indexed="true"/>
  222. <!--  *** This dynamicField is used by Sunspot! ***  -->
  223. <dynamicField name="*_dtms" stored="true" type="tdate" multiValued="true" indexed="true"/>
  224. <!--  *** This dynamicField is used by Sunspot! ***  -->
  225. <dynamicField name="*_textv" stored="false" termVectors="true" type="text" multiValued="true" indexed="true"/>
  226. <!--  *** This dynamicField is used by Sunspot! ***  -->
  227. <dynamicField name="*_textsv" stored="true" termVectors="true" type="text" multiValued="true" indexed="true"/>
  228. <!--  *** This dynamicField is used by Sunspot! ***  -->
  229. <dynamicField name="*_et" stored="false" termVectors="true" type="tdouble" multiValued="false" indexed="true"/>
  230. <!--  *** This dynamicField is used by Sunspot! ***  -->
  231. <dynamicField name="*_etm" stored="false" termVectors="true" type="tdouble" multiValued="true" indexed="true"/>
  232. <!--  *** This dynamicField is used by Sunspot! ***  -->
  233. <dynamicField name="*_ets" stored="true" termVectors="true" type="tdouble" multiValued="false" indexed="true"/>
  234. <!--  *** This dynamicField is used by Sunspot! ***  -->
  235. <dynamicField name="*_etms" stored="true" termVectors="true" type="tdouble" multiValued="true" indexed="true"/>
  236. <!--
  237. Type used to index the lat and lon components for the "location" FieldType
  238. -->
  239. <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false" multiValued="false"/>
  240. <dynamicField name="*_p" type="location" indexed="true" stored="true" multiValued="false"/>
  241. <dynamicField name="*_ll" stored="false" type="location" multiValued="false" indexed="true"/>
  242. <dynamicField name="*_llm" stored="false" type="location" multiValued="true" indexed="true"/>
  243. <dynamicField name="*_lls" stored="true" type="location" multiValued="false" indexed="true"/>
  244. <dynamicField name="*_llms" stored="true" type="location" multiValued="true" indexed="true"/>
  245. <!--  Added for Blacklight -->
  246. <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
  247. <dynamicField name="*_facet" type="string" indexed="true" stored="true" multiValued="true"/>
  248. <dynamicField name="*_display" type="string" indexed="false" stored="true"/>
  249. <field name="pub_date" type="string" indexed="true" stored="true" multiValued="true"/>
  250. <field name="format" type="string" indexed="true" stored="true"/>
  251. <field name="material" type="string" indexed="true" stored="true"/>
  252. <!--  required by Solr 4  -->
  253. <field name="_version_" type="string" indexed="true" stored="true" multiValued="false"/>
  254. </fields>
  255. <!--
  256. Field to use to determine and enforce document uniqueness.
  257.      Unless this field is marked with required="false", it will be a required field
  258.  
  259. -->
  260. <uniqueKey>id</uniqueKey>
  261. <!--
  262. field for the QueryParser to use when an explicit fieldname is absent
  263. -->
  264. <defaultSearchField>text</defaultSearchField>
  265. <!--
  266. SolrQueryParser configuration: defaultOperator="AND|OR"
  267. -->
  268. <solrQueryParser defaultOperator="AND"/>
  269. <!--
  270. copyField commands copy one field to another at the time a document
  271.        is added to the index.  It's used either to index the same field differently,
  272.        or to add multiple fields to the same field for easier/faster searching.  
  273. -->
  274. </schema>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement