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