schema.xml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. This is the Solr schema file. This file should be named "schema.xml" and
  4. should be in the conf directory under the solr home
  5. (i.e. ./solr/conf/schema.xml by default)
  6. or located where the classloader for the Solr webapp can find it.
  7. For more information, on how to customize this file, please see
  8. http://wiki.apache.org/solr/SchemaXml
  9. -->
  10. <schema name="drupal-4.2-solr-4.x" version="1.3">
  11. <!-- attribute "name" is the name of this schema and is only used for display purposes.
  12. Applications should change this to reflect the nature of the search collection.
  13. version="1.2" is Solr's version number for the schema syntax and semantics. It should
  14. not normally be changed by applications.
  15. 1.0: multiValued attribute did not exist, all fields are multiValued by nature
  16. 1.1: multiValued attribute introduced, false by default
  17. 1.2: omitTermFreqAndPositions attribute introduced, true by default except for text fields.
  18. 1.3: removed optional field compress feature
  19. -->
  20. <types>
  21. <!-- field type definitions. The "name" attribute is
  22. just a label to be used by field definitions. The "class"
  23. attribute and any other attributes determine the real
  24. behavior of the fieldType.
  25. Class names starting with "solr" refer to java classes in the
  26. org.apache.solr.analysis package.
  27. -->
  28. <!-- The StrField type is not analyzed, but indexed/stored verbatim.
  29. - StrField and TextField support an optional compressThreshold which
  30. limits compression (if enabled in the derived fields) to values which
  31. exceed a certain size (in characters).
  32. -->
  33. <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
  34. <!-- boolean type: "true" or "false" -->
  35. <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
  36. <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
  37. <fieldtype name="binary" class="solr.BinaryField"/>
  38. <!-- The optional sortMissingLast and sortMissingFirst attributes are
  39. currently supported on types that are sorted internally as strings.
  40. - If sortMissingLast="true", then a sort on this field will cause documents
  41. without the field to come after documents with the field,
  42. regardless of the requested sort order (asc or desc).
  43. - If sortMissingFirst="true", then a sort on this field will cause documents
  44. without the field to come before documents with the field,
  45. regardless of the requested sort order.
  46. - If sortMissingLast="false" and sortMissingFirst="false" (the default),
  47. then default lucene sorting will be used which places docs without the
  48. field first in an ascending sort and last in a descending sort.
  49. -->
  50. <!-- numeric field types that can be sorted, but are not optimized for range queries -->
  51. <fieldType name="integer" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  52. <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  53. <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  54. <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
  55. <!--
  56. Note:
  57. These should only be used for compatibility with existing indexes (created with older Solr versions)
  58. or if "sortMissingFirst" or "sortMissingLast" functionality is needed. Use Trie based fields instead.
  59. Numeric field types that manipulate the value into
  60. a string value that isn't human-readable in its internal form,
  61. but with a lexicographic ordering the same as the numeric ordering,
  62. so that range queries work correctly.
  63. -->
  64. <fieldType name="sint" class="solr.TrieIntField" sortMissingLast="true" omitNorms="true"/>
  65. <fieldType name="sfloat" class="solr.TrieFloatField" sortMissingLast="true" omitNorms="true"/>
  66. <fieldType name="slong" class="solr.TrieLongField" sortMissingLast="true" omitNorms="true"/>
  67. <fieldType name="sdouble" class="solr.TrieDoubleField" sortMissingLast="true" omitNorms="true"/>
  68. <!--
  69. Numeric field types that index each value at various levels of precision
  70. to accelerate range queries when the number of values between the range
  71. endpoints is large. See the javadoc for NumericRangeQuery for internal
  72. implementation details.
  73. Smaller precisionStep values (specified in bits) will lead to more tokens
  74. indexed per value, slightly larger index size, and faster range queries.
  75. A precisionStep of 0 disables indexing at different precision levels.
  76. -->
  77. <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  78. <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  79. <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  80. <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
  81. <!--
  82. The ExternalFileField type gets values from an external file instead of the
  83. index. This is useful for data such as rankings that might change frequently
  84. and require different update frequencies than the documents they are
  85. associated with.
  86. -->
  87. <fieldType name="pfloat" class="solr.FloatField" omitNorms="true"/>
  88. <fieldType name="file" keyField="id" defVal="1" stored="false" indexed="false" class="solr.ExternalFileField" valType="pfloat"/>
  89. <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
  90. is a more restricted form of the canonical representation of dateTime
  91. http://www.w3.org/TR/xmlschema-2/#dateTime
  92. The trailing "Z" designates UTC time and is mandatory.
  93. Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
  94. All other components are mandatory.
  95. Expressions can also be used to denote calculations that should be
  96. performed relative to "NOW" to determine the value, ie...
  97. NOW/HOUR
  98. ... Round to the start of the current hour
  99. NOW-1DAY
  100. ... Exactly 1 day prior to now
  101. NOW/DAY+6MONTHS+3DAYS
  102. ... 6 months and 3 days in the future from the start of
  103. the current day
  104. Consult the DateField javadocs for more information.
  105. -->
  106. <fieldType name="date" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
  107. <!-- A Trie based date field for faster date range queries and date faceting. -->
  108. <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
  109. <!-- solr.TextField allows the specification of custom text analyzers
  110. specified as a tokenizer and a list of token filters. Different
  111. analyzers may be specified for indexing and querying.
  112. The optional positionIncrementGap puts space between multiple fields of
  113. this type on the same document, with the purpose of preventing false phrase
  114. matching across fields.
  115. For more info on customizing your analyzer chain, please see
  116. http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
  117. -->
  118. <!-- One can also specify an existing Analyzer class that has a
  119. default constructor via the class attribute on the analyzer element
  120. <fieldType name="text_greek" class="solr.TextField">
  121. <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
  122. </fieldType>
  123. -->
  124. <!-- A text field that only splits on whitespace for exact matching of words -->
  125. <fieldType name="text_ws" class="solr.TextField" omitNorms="true" positionIncrementGap="100">
  126. <analyzer>
  127. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  128. <filter class="solr.LowerCaseFilterFactory"/>
  129. </analyzer>
  130. </fieldType>
  131. <!-- A text field that uses WordDelimiterFilter to enable splitting and matching of
  132. words on case-change, alpha numeric boundaries, and non-alphanumeric chars,
  133. so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".
  134. Synonyms and stopwords are customized by external files, and stemming is enabled.
  135. Duplicate tokens at the same position (which may result from Stemmed Synonyms or
  136. WordDelim parts) are removed.
  137. -->
  138. <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
  139. <analyzer type="index">
  140. <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
  141. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  142. <!-- in this example, we will only use synonyms at query time
  143. <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
  144. -->
  145. <!-- Case insensitive stop word removal.
  146. add enablePositionIncrements=true in both the index and query
  147. analyzers to leave a 'gap' for more accurate phrase queries.
  148. -->
  149. <filter class="solr.StopFilterFactory"
  150. ignoreCase="true"
  151. words="stopwords.txt"
  152. enablePositionIncrements="true"
  153. />
  154. <filter class="solr.WordDelimiterFilterFactory"
  155. protected="protwords.txt"
  156. generateWordParts="1"
  157. generateNumberParts="1"
  158. catenateWords="1"
  159. catenateNumbers="1"
  160. catenateAll="0"
  161. splitOnCaseChange="0"
  162. preserveOriginal="1"/>
  163. <filter class="solr.LengthFilterFactory" min="2" max="100" />
  164. <filter class="solr.LowerCaseFilterFactory"/>
  165. <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
  166. <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  167. </analyzer>
  168. <analyzer type="query">
  169. <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
  170. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  171. <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  172. <filter class="solr.StopFilterFactory"
  173. ignoreCase="true"
  174. words="stopwords.txt"
  175. enablePositionIncrements="true"
  176. />
  177. <filter class="solr.WordDelimiterFilterFactory"
  178. protected="protwords.txt"
  179. generateWordParts="1"
  180. generateNumberParts="1"
  181. catenateWords="0"
  182. catenateNumbers="0"
  183. catenateAll="0"
  184. splitOnCaseChange="0"
  185. preserveOriginal="1"/>
  186. <filter class="solr.LengthFilterFactory" min="2" max="100" />
  187. <filter class="solr.LowerCaseFilterFactory"/>
  188. <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
  189. <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
  190. </analyzer>
  191. </fieldType>
  192. <!-- An unstemmed text field - good if one does not know the language of the field -->
  193. <fieldType name="text_und" class="solr.TextField" positionIncrementGap="100">
  194. <analyzer type="index">
  195. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  196. <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
  197. <filter class="solr.WordDelimiterFilterFactory"
  198. protected="protwords.txt"
  199. generateWordParts="1"
  200. generateNumberParts="1"
  201. catenateWords="1"
  202. catenateNumbers="1"
  203. catenateAll="0"
  204. splitOnCaseChange="0"/>
  205. <filter class="solr.LengthFilterFactory" min="2" max="100" />
  206. <filter class="solr.LowerCaseFilterFactory"/>
  207. </analyzer>
  208. <analyzer type="query">
  209. <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  210. <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
  211. <filter class="solr.StopFilterFactory"
  212. ignoreCase="true"
  213. words="stopwords.txt"
  214. enablePositionIncrements="true"
  215. />
  216. <filter class="solr.WordDelimiterFilterFactory"
  217. protected="protwords.txt"
  218. generateWordParts="1"
  219. generateNumberParts="1"
  220. catenateWords="0"
  221. catenateNumbers="0"
  222. catenateAll="0"
  223. splitOnCaseChange="0"/>
  224. <filter class="solr.LengthFilterFactory" min="2" max="100" />
  225. <filter class="solr.LowerCaseFilterFactory"/>
  226. </analyzer>
  227. </fieldType>
  228. <!-- Edge N gram type - for example for matching against queries with results
  229. KeywordTokenizer leaves input string intact as a single term.
  230. see: http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/
  231. -->
  232. <fieldType name="edge_n2_kw_text" class="solr.TextField" omitNorms="true" positionIncrementGap="100">
  233. <analyzer type="index">
  234. <tokenizer class="solr.KeywordTokenizerFactory"/>
  235. <filter class="solr.LowerCaseFilterFactory"/>
  236. <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="25" />
  237. </analyzer>
  238. <analyzer type="query">
  239. <tokenizer class="solr.KeywordTokenizerFactory"/>
  240. <filter class="solr.LowerCaseFilterFactory"/>
  241. </analyzer>
  242. </fieldType>
  243. <!-- Setup simple analysis for spell checking -->
  244. <fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100">
  245. <analyzer>
  246. <tokenizer class="solr.StandardTokenizerFactory" />
  247. <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
  248. <filter class="solr.LengthFilterFactory" min="4" max="20" />
  249. <filter class="solr.LowerCaseFilterFactory" />
  250. <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
  251. </analyzer>
  252. </fieldType>
  253. <!-- This is an example of using the KeywordTokenizer along
  254. With various TokenFilterFactories to produce a sortable field
  255. that does not include some properties of the source text
  256. -->
  257. <fieldType name="sortString" class="solr.TextField" sortMissingLast="true" omitNorms="true">
  258. <analyzer>
  259. <!-- KeywordTokenizer does no actual tokenizing, so the entire
  260. input string is preserved as a single token
  261. -->
  262. <tokenizer class="solr.KeywordTokenizerFactory"/>
  263. <!-- The LowerCase TokenFilter does what you expect, which can be
  264. when you want your sorting to be case insensitive
  265. -->
  266. <filter class="solr.LowerCaseFilterFactory" />
  267. <!-- The TrimFilter removes any leading or trailing whitespace -->
  268. <filter class="solr.TrimFilterFactory" />
  269. <!-- The PatternReplaceFilter gives you the flexibility to use
  270. Java Regular expression to replace any sequence of characters
  271. matching a pattern with an arbitrary replacement string,
  272. which may include back refrences to portions of the orriginal
  273. string matched by the pattern.
  274. See the Java Regular Expression documentation for more
  275. infomation on pattern and replacement string syntax.
  276. http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
  277. <filter class="solr.PatternReplaceFilterFactory"
  278. pattern="(^\p{Punct}+)" replacement="" replace="all"
  279. />
  280. -->
  281. </analyzer>
  282. </fieldType>
  283. <!-- A random sort type -->
  284. <fieldType name="rand" class="solr.RandomSortField" indexed="true" />
  285. <!-- since fields of this type are by default not stored or indexed, any data added to
  286. them will be ignored outright
  287. -->
  288. <fieldtype name="ignored" stored="false" indexed="false" class="solr.StrField" />
  289. <!-- Begin added types to use features in Solr 3.4+ -->
  290. <fieldType name="point" class="solr.PointType" dimension="2" subFieldType="tdouble"/>
  291. <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
  292. <fieldType name="location" class="solr.LatLonType" subFieldType="tdouble"/>
  293. <!-- A Geohash is a compact representation of a latitude longitude pair in a single field.
  294. See http://wiki.apache.org/solr/SpatialSearch
  295. -->
  296. <fieldtype name="geohash" class="solr.GeoHashField"/>
  297. <!-- End added Solr 3.4+ types -->
  298. </types>
  299. <!-- Following is a dynamic way to include other types, added by other contrib modules -->
  300. <xi:include href="schema_extra_types.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
  301. <xi:fallback></xi:fallback>
  302. </xi:include>
  303. <fields>
  304. <!-- Valid attributes for fields:
  305. name: mandatory - the name for the field
  306. type: mandatory - the name of a previously defined type from the <types> section
  307. indexed: true if this field should be indexed (searchable or sortable)
  308. stored: true if this field should be retrievable
  309. compressed: [false] if this field should be stored using gzip compression
  310. (this will only apply if the field type is compressable; among
  311. the standard field types, only TextField and StrField are)
  312. multiValued: true if this field may contain multiple values per document
  313. omitNorms: (expert) set to true to omit the norms associated with
  314. this field (this disables length normalization and index-time
  315. boosting for the field, and saves some memory). Only full-text
  316. fields or fields that need an index-time boost need norms.
  317. -->
  318. <!-- The document id is usually derived from a site-spcific key (hash) and the
  319. entity type and ID like:
  320. Search Api :
  321. The format used is $document->id = $index_id . '-' . $item_id
  322. Apache Solr Search Integration
  323. The format used is $document->id = $site_hash . '/' . $entity_type . '/' . $entity->id;
  324. -->
  325. <field name="id" type="string" indexed="true" stored="true" required="true" />
  326. <!-- Add Solr Cloud version field as mentioned in
  327. http://wiki.apache.org/solr/SolrCloud#Required_Config
  328. -->
  329. <field name="_version_" type="long" indexed="true" stored="true" multiValued="false"/>
  330. <!-- Search Api specific fields -->
  331. <!-- item_id contains the entity ID, e.g. a node's nid. -->
  332. <field name="item_id" type="string" indexed="true" stored="true" />
  333. <!-- index_id is the machine name of the search index this entry belongs to. -->
  334. <field name="index_id" type="string" indexed="true" stored="true" />
  335. <!-- Since sorting by ID is explicitly allowed, store item_id also in a sortable way. -->
  336. <copyField source="item_id" dest="sort_search_api_id" />
  337. <!-- Apache Solr Search Integration specific fields -->
  338. <!-- entity_id is the numeric object ID, e.g. Node ID, File ID -->
  339. <field name="entity_id" type="long" indexed="true" stored="true" />
  340. <!-- entity_type is 'node', 'file', 'user', or some other Drupal object type -->
  341. <field name="entity_type" type="string" indexed="true" stored="true" />
  342. <!-- bundle is a node type, or as appropriate for other entity types -->
  343. <field name="bundle" type="string" indexed="true" stored="true"/>
  344. <field name="bundle_name" type="string" indexed="true" stored="true"/>
  345. <field name="site" type="string" indexed="true" stored="true"/>
  346. <field name="hash" type="string" indexed="true" stored="true"/>
  347. <field name="url" type="string" indexed="true" stored="true"/>
  348. <!-- label is the default field for a human-readable string for this entity (e.g. the title of a node) -->
  349. <field name="label" type="text" indexed="true" stored="true" termVectors="true" omitNorms="true"/>
  350. <!-- The string version of the title is used for sorting -->
  351. <copyField source="label" dest="sort_label"/>
  352. <!-- content is the default field for full text search - dump crap here -->
  353. <field name="content" type="text" indexed="true" stored="true" termVectors="true"/>
  354. <field name="teaser" type="text" indexed="false" stored="true"/>
  355. <field name="path" type="string" indexed="true" stored="true"/>
  356. <field name="path_alias" type="text" indexed="true" stored="true" termVectors="true" omitNorms="true"/>
  357. <!-- These are the fields that correspond to a Drupal node. The beauty of having
  358. Lucene store title, body, type, etc., is that we retrieve them with the search
  359. result set and don't need to go to the database with a node_load. -->
  360. <field name="tid" type="long" indexed="true" stored="true" multiValued="true"/>
  361. <field name="taxonomy_names" type="text" indexed="true" stored="false" termVectors="true" multiValued="true" omitNorms="true"/>
  362. <!-- Copy terms to a single field that contains all taxonomy term names -->
  363. <copyField source="tm_vid_*" dest="taxonomy_names"/>
  364. <!-- Here, default is used to create a "timestamp" field indicating
  365. when each document was indexed.-->
  366. <field name="timestamp" type="tdate" indexed="true" stored="true" default="NOW" multiValued="false"/>
  367. <!-- This field is used to build the spellchecker index -->
  368. <field name="spell" type="textSpell" indexed="true" stored="true" multiValued="true"/>
  369. <!-- copyField commands copy one field to another at the time a document
  370. is added to the index. It's used either to index the same field differently,
  371. or to add multiple fields to the same field for easier/faster searching. -->
  372. <copyField source="label" dest="spell"/>
  373. <copyField source="content" dest="spell"/>
  374. <copyField source="ts_*" dest="spell"/>
  375. <copyField source="tm_*" dest="spell"/>
  376. <!-- Dynamic field definitions. If a field name is not found, dynamicFields
  377. will be used if the name matches any of the patterns.
  378. RESTRICTION: the glob-like pattern in the name attribute must have
  379. a "*" only at the start or the end.
  380. EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i)
  381. Longer patterns will be matched first. if equal size patterns
  382. both match, the first appearing in the schema will be used. -->
  383. <!-- A set of fields to contain text extracted from HTML tag contents which we
  384. can boost at query time. -->
  385. <dynamicField name="tags_*" type="text" indexed="true" stored="false" omitNorms="true"/>
  386. <!-- For 2 and 3 letter prefix dynamic fields, the 1st letter indicates the data type and
  387. the last letter is 's' for single valued, 'm' for multi-valued -->
  388. <!-- We use long for integer since 64 bit ints are now common in PHP. -->
  389. <dynamicField name="is_*" type="long" indexed="true" stored="true" multiValued="false"/>
  390. <dynamicField name="im_*" type="long" indexed="true" stored="true" multiValued="true"/>
  391. <!-- List of floats can be saved in a regular float field -->
  392. <dynamicField name="fs_*" type="float" indexed="true" stored="true" multiValued="false"/>
  393. <dynamicField name="fm_*" type="float" indexed="true" stored="true" multiValued="true"/>
  394. <!-- List of doubles can be saved in a regular double field -->
  395. <dynamicField name="ps_*" type="double" indexed="true" stored="true" multiValued="false"/>
  396. <dynamicField name="pm_*" type="double" indexed="true" stored="true" multiValued="true"/>
  397. <!-- List of booleans can be saved in a regular boolean field -->
  398. <dynamicField name="bm_*" type="boolean" indexed="true" stored="true" multiValued="true"/>
  399. <dynamicField name="bs_*" type="boolean" indexed="true" stored="true" multiValued="false"/>
  400. <!-- Regular text (without processing) can be stored in a string field-->
  401. <dynamicField name="ss_*" type="string" indexed="true" stored="true" multiValued="false"/>
  402. <dynamicField name="sm_*" type="string" indexed="true" stored="true" multiValued="true"/>
  403. <!-- Normal text fields are for full text - the relevance of a match depends on the length of the text -->
  404. <dynamicField name="ts_*" type="text" indexed="true" stored="true" multiValued="false" termVectors="true"/>
  405. <dynamicField name="tm_*" type="text" indexed="true" stored="true" multiValued="true" termVectors="true"/>
  406. <!-- Unstemmed text fields for full text - the relevance of a match depends on the length of the text -->
  407. <dynamicField name="tus_*" type="text_und" indexed="true" stored="true" multiValued="false" termVectors="true"/>
  408. <dynamicField name="tum_*" type="text_und" indexed="true" stored="true" multiValued="true" termVectors="true"/>
  409. <!-- These text fields omit norms - useful for extracted text like taxonomy_names -->
  410. <dynamicField name="tos_*" type="text" indexed="true" stored="true" multiValued="false" termVectors="true" omitNorms="true"/>
  411. <dynamicField name="tom_*" type="text" indexed="true" stored="true" multiValued="true" termVectors="true" omitNorms="true"/>
  412. <!-- Special-purpose text fields -->
  413. <dynamicField name="tes_*" type="edge_n2_kw_text" indexed="true" stored="true" multiValued="false" omitTermFreqAndPositions="true" />
  414. <dynamicField name="tem_*" type="edge_n2_kw_text" indexed="true" stored="true" multiValued="true" omitTermFreqAndPositions="true" />
  415. <dynamicField name="tws_*" type="text_ws" indexed="true" stored="true" multiValued="false"/>
  416. <dynamicField name="twm_*" type="text_ws" indexed="true" stored="true" multiValued="true"/>
  417. <!-- trie dates are preferred, so give them the 2 letter prefix -->
  418. <dynamicField name="ds_*" type="tdate" indexed="true" stored="true" multiValued="false"/>
  419. <dynamicField name="dm_*" type="tdate" indexed="true" stored="true" multiValued="true"/>
  420. <dynamicField name="its_*" type="tlong" indexed="true" stored="true" multiValued="false"/>
  421. <dynamicField name="itm_*" type="tlong" indexed="true" stored="true" multiValued="true"/>
  422. <dynamicField name="fts_*" type="tfloat" indexed="true" stored="true" multiValued="false"/>
  423. <dynamicField name="ftm_*" type="tfloat" indexed="true" stored="true" multiValued="true"/>
  424. <dynamicField name="pts_*" type="tdouble" indexed="true" stored="true" multiValued="false"/>
  425. <dynamicField name="ptm_*" type="tdouble" indexed="true" stored="true" multiValued="true"/>
  426. <!-- Binary fields can be populated using base64 encoded data. Useful e.g. for embedding
  427. a small image in a search result using the data URI scheme -->
  428. <dynamicField name="xs_*" type="binary" indexed="false" stored="true" multiValued="false"/>
  429. <dynamicField name="xm_*" type="binary" indexed="false" stored="true" multiValued="true"/>
  430. <!-- In rare cases a date rather than tdate is needed for sortMissingLast -->
  431. <dynamicField name="dds_*" type="date" indexed="true" stored="true" multiValued="false"/>
  432. <dynamicField name="ddm_*" type="date" indexed="true" stored="true" multiValued="true"/>
  433. <!-- Sortable fields, good for sortMissingLast support &
  434. We use long for integer since 64 bit ints are now common in PHP. -->
  435. <dynamicField name="iss_*" type="slong" indexed="true" stored="true" multiValued="false"/>
  436. <dynamicField name="ism_*" type="slong" indexed="true" stored="true" multiValued="true"/>
  437. <!-- In rare cases a sfloat rather than tfloat is needed for sortMissingLast -->
  438. <dynamicField name="fss_*" type="sfloat" indexed="true" stored="true" multiValued="false"/>
  439. <dynamicField name="fsm_*" type="sfloat" indexed="true" stored="true" multiValued="true"/>
  440. <dynamicField name="pss_*" type="sdouble" indexed="true" stored="true" multiValued="false"/>
  441. <dynamicField name="psm_*" type="sdouble" indexed="true" stored="true" multiValued="true"/>
  442. <!-- 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 -->
  443. <dynamicField name="hs_*" type="integer" indexed="true" stored="true" multiValued="false"/>
  444. <dynamicField name="hm_*" type="integer" indexed="true" stored="true" multiValued="true"/>
  445. <dynamicField name="hss_*" type="sint" indexed="true" stored="true" multiValued="false"/>
  446. <dynamicField name="hsm_*" type="sint" indexed="true" stored="true" multiValued="true"/>
  447. <dynamicField name="hts_*" type="tint" indexed="true" stored="true" multiValued="false"/>
  448. <dynamicField name="htm_*" type="tint" indexed="true" stored="true" multiValued="true"/>
  449. <!-- Unindexed string fields that can be used to store values that won't be searchable -->
  450. <dynamicField name="zs_*" type="string" indexed="false" stored="true" multiValued="false"/>
  451. <dynamicField name="zm_*" type="string" indexed="false" stored="true" multiValued="true"/>
  452. <!-- Begin added fields to use features in Solr 3.4+
  453. http://wiki.apache.org/solr/SpatialSearch#geodist_-_The_distance_function -->
  454. <dynamicField name="points_*" type="point" indexed="true" stored="true" multiValued="false"/>
  455. <dynamicField name="pointm_*" type="point" indexed="true" stored="true" multiValued="true"/>
  456. <dynamicField name="locs_*" type="location" indexed="true" stored="true" multiValued="false"/>
  457. <dynamicField name="locm_*" type="location" indexed="true" stored="true" multiValued="true"/>
  458. <dynamicField name="geos_*" type="geohash" indexed="true" stored="true" multiValued="false"/>
  459. <dynamicField name="geom_*" type="geohash" indexed="true" stored="true" multiValued="true"/>
  460. <!-- External file fields -->
  461. <dynamicField name="eff_*" type="file"/>
  462. <!-- End added fields for Solr 3.4+ -->
  463. <!-- Sortable version of the dynamic string field -->
  464. <dynamicField name="sort_*" type="sortString" indexed="true" stored="false"/>
  465. <copyField source="ss_*" dest="sort_*"/>
  466. <!-- A random sort field -->
  467. <dynamicField name="random_*" type="rand" indexed="true" stored="true"/>
  468. <!-- This field is used to store access information (e.g. node access grants), as opposed to field data -->
  469. <dynamicField name="access_*" type="integer" indexed="true" stored="false" multiValued="true"/>
  470. <!-- The following causes solr to ignore any fields that don't already match an existing
  471. field name or dynamic field, rather than reporting them as an error.
  472. Alternately, change the type="ignored" to some other type e.g. "text" if you want
  473. unknown fields indexed and/or stored by default -->
  474. <dynamicField name="*" type="ignored" multiValued="true" />
  475. </fields>
  476. <!-- Following is a dynamic way to include other fields, added by other contrib modules -->
  477. <xi:include href="schema_extra_fields.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
  478. <xi:fallback></xi:fallback>
  479. </xi:include>
  480. <!-- Field to use to determine and enforce document uniqueness.
  481. Unless this field is marked with required="false", it will be a required field
  482. -->
  483. <uniqueKey>id</uniqueKey>
  484. <!-- field for the QueryParser to use when an explicit fieldname is absent -->
  485. <defaultSearchField>content</defaultSearchField>
  486. <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
  487. <solrQueryParser defaultOperator="AND"/>
  488. </schema>