Migrated to solr 1.4. Added a filter factory so that solr can use the greek lower...
[pithos] / solr / conf / schema.xml
1 <?xml version="1.0" encoding="UTF-8" ?>\r
2 <!--\r
3  Licensed to the Apache Software Foundation (ASF) under one or more\r
4  contributor license agreements.  See the NOTICE file distributed with\r
5  this work for additional information regarding copyright ownership.\r
6  The ASF licenses this file to You under the Apache License, Version 2.0\r
7  (the "License"); you may not use this file except in compliance with\r
8  the License.  You may obtain a copy of the License at\r
9 \r
10      http://www.apache.org/licenses/LICENSE-2.0\r
11 \r
12  Unless required by applicable law or agreed to in writing, software\r
13  distributed under the License is distributed on an "AS IS" BASIS,\r
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
15  See the License for the specific language governing permissions and\r
16  limitations under the License.\r
17 -->\r
18 \r
19 <!--  \r
20  This is the Solr schema file. This file should be named "schema.xml" and\r
21  should be in the conf directory under the solr home\r
22  (i.e. ./solr/conf/schema.xml by default) \r
23  or located where the classloader for the Solr webapp can find it.\r
24 \r
25  This example schema is the recommended starting point for users.\r
26  It should be kept correct and concise, usable out-of-the-box.\r
27 \r
28  For more information, on how to customize this file, please see\r
29  http://wiki.apache.org/solr/SchemaXml\r
30 \r
31  PERFORMANCE NOTE: this schema includes many optional features and should not\r
32  be used for benchmarking.  To improve performance one could\r
33   - set stored="false" for all fields possible (esp large fields) when you\r
34     only need to search on the field but don't need to return the original\r
35     value.\r
36   - set indexed="false" if you don't need to search on the field, but only\r
37     return the field as a result of searching on other indexed fields.\r
38   - remove all unneeded copyField statements\r
39   - for best index size and searching performance, set "index" to false\r
40     for all general text fields, use copyField to copy them to the\r
41     catchall "text" field, and use that for searching.\r
42   - For maximum indexing performance, use the StreamingUpdateSolrServer\r
43     java client.\r
44   - Remember to run the JVM in server mode, and use a higher logging level\r
45     that avoids logging every request\r
46 -->\r
47 \r
48 <schema name="example" version="1.2">\r
49   <!-- attribute "name" is the name of this schema and is only used for display purposes.\r
50        Applications should change this to reflect the nature of the search collection.\r
51        version="1.2" is Solr's version number for the schema syntax and semantics.  It should\r
52        not normally be changed by applications.\r
53        1.0: multiValued attribute did not exist, all fields are multiValued by nature\r
54        1.1: multiValued attribute introduced, false by default \r
55        1.2: omitTermFreqAndPositions attribute introduced, true by default except for text fields.\r
56      -->\r
57 \r
58   <types>\r
59     <!-- field type definitions. The "name" attribute is\r
60        just a label to be used by field definitions.  The "class"\r
61        attribute and any other attributes determine the real\r
62        behavior of the fieldType.\r
63          Class names starting with "solr" refer to java classes in the\r
64        org.apache.solr.analysis package.\r
65     -->\r
66 \r
67     <!-- The StrField type is not analyzed, but indexed/stored verbatim.  \r
68        - StrField and TextField support an optional compressThreshold which\r
69        limits compression (if enabled in the derived fields) to values which\r
70        exceed a certain size (in characters).\r
71     -->\r
72     <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>\r
73 \r
74     <!-- boolean type: "true" or "false" -->\r
75     <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>\r
76     <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->\r
77     <fieldtype name="binary" class="solr.BinaryField"/>\r
78 \r
79     <!-- The optional sortMissingLast and sortMissingFirst attributes are\r
80          currently supported on types that are sorted internally as strings.\r
81                This includes "string","boolean","sint","slong","sfloat","sdouble","pdate"\r
82        - If sortMissingLast="true", then a sort on this field will cause documents\r
83          without the field to come after documents with the field,\r
84          regardless of the requested sort order (asc or desc).\r
85        - If sortMissingFirst="true", then a sort on this field will cause documents\r
86          without the field to come before documents with the field,\r
87          regardless of the requested sort order.\r
88        - If sortMissingLast="false" and sortMissingFirst="false" (the default),\r
89          then default lucene sorting will be used which places docs without the\r
90          field first in an ascending sort and last in a descending sort.\r
91     -->    \r
92 \r
93     <!--\r
94       Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.\r
95     -->\r
96     <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>\r
97     <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>\r
98     <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>\r
99     <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>\r
100 \r
101     <!--\r
102      Numeric field types that index each value at various levels of precision\r
103      to accelerate range queries when the number of values between the range\r
104      endpoints is large. See the javadoc for NumericRangeQuery for internal\r
105      implementation details.\r
106 \r
107      Smaller precisionStep values (specified in bits) will lead to more tokens\r
108      indexed per value, slightly larger index size, and faster range queries.\r
109      A precisionStep of 0 disables indexing at different precision levels.\r
110     -->\r
111     <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>\r
112     <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>\r
113     <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>\r
114     <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>\r
115 \r
116     <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and\r
117          is a more restricted form of the canonical representation of dateTime\r
118          http://www.w3.org/TR/xmlschema-2/#dateTime    \r
119          The trailing "Z" designates UTC time and is mandatory.\r
120          Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z\r
121          All other components are mandatory.\r
122 \r
123          Expressions can also be used to denote calculations that should be\r
124          performed relative to "NOW" to determine the value, ie...\r
125 \r
126                NOW/HOUR\r
127                   ... Round to the start of the current hour\r
128                NOW-1DAY\r
129                   ... Exactly 1 day prior to now\r
130                NOW/DAY+6MONTHS+3DAYS\r
131                   ... 6 months and 3 days in the future from the start of\r
132                       the current day\r
133                       \r
134          Consult the DateField javadocs for more information.\r
135 \r
136          Note: For faster range queries, consider the tdate type\r
137       -->\r
138     <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>\r
139 \r
140     <!-- A Trie based date field for faster date range queries and date faceting. -->\r
141     <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>\r
142 \r
143 \r
144     <!--\r
145       Note:\r
146       These should only be used for compatibility with existing indexes (created with older Solr versions)\r
147       or if "sortMissingFirst" or "sortMissingLast" functionality is needed. Use Trie based fields instead.\r
148 \r
149       Plain numeric field types that store and index the text\r
150       value verbatim (and hence don't support range queries, since the\r
151       lexicographic ordering isn't equal to the numeric ordering)\r
152     -->\r
153     <fieldType name="pint" class="solr.IntField" omitNorms="true"/>\r
154     <fieldType name="plong" class="solr.LongField" omitNorms="true"/>\r
155     <fieldType name="pfloat" class="solr.FloatField" omitNorms="true"/>\r
156     <fieldType name="pdouble" class="solr.DoubleField" omitNorms="true"/>\r
157     <fieldType name="pdate" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>\r
158 \r
159 \r
160     <!--\r
161       Note:\r
162       These should only be used for compatibility with existing indexes (created with older Solr versions)\r
163       or if "sortMissingFirst" or "sortMissingLast" functionality is needed. Use Trie based fields instead.\r
164 \r
165       Numeric field types that manipulate the value into\r
166       a string value that isn't human-readable in its internal form,\r
167       but with a lexicographic ordering the same as the numeric ordering,\r
168       so that range queries work correctly.\r
169     -->\r
170     <fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>\r
171     <fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>\r
172     <fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>\r
173     <fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>\r
174 \r
175 \r
176     <!-- The "RandomSortField" is not used to store or search any\r
177          data.  You can declare fields of this type it in your schema\r
178          to generate pseudo-random orderings of your docs for sorting \r
179          purposes.  The ordering is generated based on the field name \r
180          and the version of the index, As long as the index version\r
181          remains unchanged, and the same field name is reused,\r
182          the ordering of the docs will be consistent.  \r
183          If you want different psuedo-random orderings of documents,\r
184          for the same version of the index, use a dynamicField and\r
185          change the name\r
186      -->\r
187     <fieldType name="random" class="solr.RandomSortField" indexed="true" />\r
188 \r
189     <!-- solr.TextField allows the specification of custom text analyzers\r
190          specified as a tokenizer and a list of token filters. Different\r
191          analyzers may be specified for indexing and querying.\r
192 \r
193          The optional positionIncrementGap puts space between multiple fields of\r
194          this type on the same document, with the purpose of preventing false phrase\r
195          matching across fields.\r
196 \r
197          For more info on customizing your analyzer chain, please see\r
198          http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters\r
199      -->\r
200 \r
201     <!-- One can also specify an existing Analyzer class that has a\r
202          default constructor via the class attribute on the analyzer element-->\r
203     <fieldType name="text_greek" class="solr.TextField">\r
204       <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>\r
205     </fieldType>\r
206 \r
207     <!-- A text field that only splits on whitespace for exact matching of words -->\r
208     <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">\r
209       <analyzer>\r
210         <tokenizer class="solr.WhitespaceTokenizerFactory"/>\r
211       </analyzer>\r
212     </fieldType>\r
213 \r
214     <!-- A text field that uses WordDelimiterFilter to enable splitting and matching of\r
215         words on case-change, alpha numeric boundaries, and non-alphanumeric chars,\r
216         so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".\r
217         Synonyms and stopwords are customized by external files, and stemming is enabled.\r
218         -->\r
219     <fieldType name="text" class="solr.TextField" positionIncrementGap="100">\r
220       <analyzer type="index">\r
221         <tokenizer class="solr.WhitespaceTokenizerFactory"/>\r
222         <!-- in this example, we will only use synonyms at query time\r
223         <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>\r
224         -->\r
225         <!-- Case insensitive stop word removal.\r
226           add enablePositionIncrements=true in both the index and query\r
227           analyzers to leave a 'gap' for more accurate phrase queries.\r
228         -->\r
229         <filter class="solr.StopFilterFactory"\r
230                 ignoreCase="true"\r
231                 words="stopwords.txt"\r
232                 enablePositionIncrements="true"\r
233                 />\r
234         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="1" splitOnCaseChange="1"/>\r
235         <filter class="solr.LowerCaseFilterFactory"/>\r
236         <filter class="gr.ebs.gss.solr.analysis.GreekLowerCaseFilterFactory"/>\r
237         <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>\r
238       </analyzer>\r
239       <analyzer type="query">\r
240         <tokenizer class="solr.WhitespaceTokenizerFactory"/>\r
241         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>\r
242         <filter class="solr.StopFilterFactory"\r
243                 ignoreCase="true"\r
244                 words="stopwords.txt"\r
245                 enablePositionIncrements="true"\r
246                 />\r
247         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>\r
248         <filter class="solr.LowerCaseFilterFactory"/>\r
249         <filter class="gr.ebs.gss.solr.analysis.GreekLowerCaseFilterFactory"/>\r
250         <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>\r
251       </analyzer>\r
252     </fieldType>\r
253 \r
254 \r
255     <!-- Less flexible matching, but less false matches.  Probably not ideal for product names,\r
256          but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->\r
257     <fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >\r
258       <analyzer>\r
259         <tokenizer class="solr.WhitespaceTokenizerFactory"/>\r
260         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>\r
261         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>\r
262         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>\r
263         <filter class="solr.LowerCaseFilterFactory"/>\r
264         <filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>\r
265         <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes\r
266              possible with WordDelimiterFilter in conjuncton with stemming. -->\r
267         <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>\r
268       </analyzer>\r
269     </fieldType>\r
270 \r
271 \r
272     <!-- A general unstemmed text field - good if one does not know the language of the field -->\r
273     <fieldType name="textgen" class="solr.TextField" positionIncrementGap="100">\r
274       <analyzer type="index">\r
275         <tokenizer class="solr.WhitespaceTokenizerFactory"/>\r
276         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />\r
277         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>\r
278         <filter class="solr.LowerCaseFilterFactory"/>\r
279       </analyzer>\r
280       <analyzer type="query">\r
281         <tokenizer class="solr.WhitespaceTokenizerFactory"/>\r
282         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>\r
283         <filter class="solr.StopFilterFactory"\r
284                 ignoreCase="true"\r
285                 words="stopwords.txt"\r
286                 enablePositionIncrements="true"\r
287                 />\r
288         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>\r
289         <filter class="solr.LowerCaseFilterFactory"/>\r
290       </analyzer>\r
291     </fieldType>\r
292 \r
293 \r
294     <!-- A general unstemmed text field that indexes tokens normally and also\r
295          reversed (via ReversedWildcardFilterFactory), to enable more efficient \r
296          leading wildcard queries. -->\r
297     <fieldType name="text_rev" class="solr.TextField" positionIncrementGap="100">\r
298       <analyzer type="index">\r
299         <tokenizer class="solr.WhitespaceTokenizerFactory"/>\r
300         <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />\r
301         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>\r
302         <filter class="solr.LowerCaseFilterFactory"/>\r
303         <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"\r
304            maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>\r
305       </analyzer>\r
306       <analyzer type="query">\r
307         <tokenizer class="solr.WhitespaceTokenizerFactory"/>\r
308         <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>\r
309         <filter class="solr.StopFilterFactory"\r
310                 ignoreCase="true"\r
311                 words="stopwords.txt"\r
312                 enablePositionIncrements="true"\r
313                 />\r
314         <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>\r
315         <filter class="solr.LowerCaseFilterFactory"/>\r
316       </analyzer>\r
317     </fieldType>\r
318 \r
319     <!-- charFilter + WhitespaceTokenizer  -->\r
320     <!--\r
321     <fieldType name="textCharNorm" class="solr.TextField" positionIncrementGap="100" >\r
322       <analyzer>\r
323         <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>\r
324         <tokenizer class="solr.WhitespaceTokenizerFactory"/>\r
325       </analyzer>\r
326     </fieldType>\r
327     -->\r
328 \r
329     <!-- This is an example of using the KeywordTokenizer along\r
330          With various TokenFilterFactories to produce a sortable field\r
331          that does not include some properties of the source text\r
332       -->\r
333     <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">\r
334       <analyzer>\r
335         <!-- KeywordTokenizer does no actual tokenizing, so the entire\r
336              input string is preserved as a single token\r
337           -->\r
338         <tokenizer class="solr.KeywordTokenizerFactory"/>\r
339         <!-- The LowerCase TokenFilter does what you expect, which can be\r
340              when you want your sorting to be case insensitive\r
341           -->\r
342         <filter class="solr.LowerCaseFilterFactory" />\r
343         <!-- The TrimFilter removes any leading or trailing whitespace -->\r
344         <filter class="solr.TrimFilterFactory" />\r
345         <!-- The PatternReplaceFilter gives you the flexibility to use\r
346              Java Regular expression to replace any sequence of characters\r
347              matching a pattern with an arbitrary replacement string, \r
348              which may include back references to portions of the original\r
349              string matched by the pattern.\r
350              \r
351              See the Java Regular Expression documentation for more\r
352              information on pattern and replacement string syntax.\r
353              \r
354              http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html\r
355           -->\r
356         <filter class="solr.PatternReplaceFilterFactory"\r
357                 pattern="([^a-z])" replacement="" replace="all"\r
358         />\r
359       </analyzer>\r
360     </fieldType>\r
361     \r
362     <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >\r
363       <analyzer>\r
364         <tokenizer class="solr.StandardTokenizerFactory"/>\r
365         <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>\r
366       </analyzer>\r
367     </fieldtype>\r
368 \r
369     <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >\r
370       <analyzer>\r
371         <tokenizer class="solr.WhitespaceTokenizerFactory"/>\r
372         <!--\r
373         The DelimitedPayloadTokenFilter can put payloads on tokens... for example,\r
374         a token of "foo|1.4"  would be indexed as "foo" with a payload of 1.4f\r
375         Attributes of the DelimitedPayloadTokenFilterFactory : \r
376          "delimiter" - a one character delimiter. Default is | (pipe)\r
377          "encoder" - how to encode the following value into a playload\r
378             float -> org.apache.lucene.analysis.payloads.FloatEncoder,\r
379             integer -> o.a.l.a.p.IntegerEncoder\r
380             identity -> o.a.l.a.p.IdentityEncoder\r
381             Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.\r
382          -->\r
383         <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>\r
384       </analyzer>\r
385     </fieldtype>\r
386 \r
387     <!-- lowercases the entire field value, keeping it as a single token.  -->\r
388     <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">\r
389       <analyzer>\r
390         <tokenizer class="solr.KeywordTokenizerFactory"/>\r
391         <filter class="solr.LowerCaseFilterFactory" />\r
392       </analyzer>\r
393     </fieldType>\r
394 \r
395 \r
396     <!-- since fields of this type are by default not stored or indexed,\r
397          any data added to them will be ignored outright.  --> \r
398     <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" /> \r
399 \r
400  </types>\r
401 \r
402 \r
403  <fields>\r
404    <!-- Valid attributes for fields:\r
405      name: mandatory - the name for the field\r
406      type: mandatory - the name of a previously defined type from the \r
407        <types> section\r
408      indexed: true if this field should be indexed (searchable or sortable)\r
409      stored: true if this field should be retrievable\r
410      compressed: [false] if this field should be stored using gzip compression\r
411        (this will only apply if the field type is compressable; among\r
412        the standard field types, only TextField and StrField are)\r
413      multiValued: true if this field may contain multiple values per document\r
414      omitNorms: (expert) set to true to omit the norms associated with\r
415        this field (this disables length normalization and index-time\r
416        boosting for the field, and saves some memory).  Only full-text\r
417        fields or fields that need an index-time boost need norms.\r
418      termVectors: [false] set to true to store the term vector for a\r
419        given field.\r
420        When using MoreLikeThis, fields used for similarity should be\r
421        stored for best performance.\r
422      termPositions: Store position information with the term vector.  \r
423        This will increase storage costs.\r
424      termOffsets: Store offset information with the term vector. This \r
425        will increase storage costs.\r
426      default: a value that should be used if no value is specified\r
427        when adding a document.\r
428    -->\r
429 \r
430    <field name="id" type="string" indexed="true" stored="true" required="true" /> \r
431    <field name="name" type="text" indexed="true" stored="true" required="true"/>\r
432    <field name="tag" type="text" indexed="true" stored="true" multiValued="true"/>\r
433 <!--   <field name="sku" type="textTight" indexed="true" stored="true" omitNorms="true"/>\r
434    <field name="name" type="textgen" indexed="true" stored="true"/>\r
435    <field name="alphaNameSort" type="alphaOnlySort" indexed="true" stored="false"/>\r
436    <field name="manu" type="textgen" indexed="true" stored="true" omitNorms="true"/>\r
437    <field name="cat" type="text_ws" indexed="true" stored="true" multiValued="true" omitNorms="true" />\r
438    <field name="features" type="text" indexed="true" stored="true" multiValued="true"/>\r
439    <field name="includes" type="text" indexed="true" stored="true" termVectors="true" termPositions="true" termOffsets="true" />\r
440 \r
441    <field name="weight" type="float" indexed="true" stored="true"/>\r
442    <field name="price"  type="float" indexed="true" stored="true"/>\r
443    <field name="popularity" type="int" indexed="true" stored="true" />\r
444    <field name="inStock" type="boolean" indexed="true" stored="true" />-->\r
445 \r
446 \r
447    <!-- Common metadata fields, named specifically to match up with\r
448      SolrCell metadata when parsing rich documents such as Word, PDF.\r
449      Some fields are multiValued only because Tika currently may return\r
450      multiple values for them.\r
451    -->\r
452 <!--   <field name="title" type="text" indexed="true" stored="true" multiValued="true"/>\r
453    <field name="subject" type="text" indexed="true" stored="true"/>\r
454    <field name="description" type="text" indexed="true" stored="true"/>\r
455    <field name="comments" type="text" indexed="true" stored="true"/>\r
456    <field name="author" type="textgen" indexed="true" stored="true"/>\r
457    <field name="keywords" type="textgen" indexed="true" stored="true"/>\r
458    <field name="category" type="textgen" indexed="true" stored="true"/>\r
459    <field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/>\r
460    <field name="last_modified" type="date" indexed="true" stored="true"/>\r
461    <field name="links" type="string" indexed="true" stored="true" multiValued="true"/>\r
462 -->\r
463 \r
464    <!-- catchall field, containing all other searchable text fields (implemented\r
465         via copyField further on in this schema  -->\r
466    <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>\r
467 \r
468    <!-- catchall text field that indexes tokens both normally and in reverse for efficient\r
469         leading wildcard queries. -->\r
470 <!--   <field name="text_rev" type="text_rev" indexed="true" stored="false" multiValued="true"/>-->\r
471 \r
472    <!-- non-tokenized version of manufacturer to make it easier to sort or group\r
473         results by manufacturer.  copied from "manu" via copyField -->\r
474 <!--   <field name="manu_exact" type="string" indexed="true" stored="false"/>\r
475 \r
476    <field name="payloads" type="payloads" indexed="true" stored="true"/>-->\r
477 \r
478    <!-- Uncommenting the following will create a "timestamp" field using\r
479         a default value of "NOW" to indicate when each document was indexed.\r
480      -->\r
481    <!--\r
482    <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>\r
483      -->\r
484    \r
485 \r
486    <!-- Dynamic field definitions.  If a field name is not found, dynamicFields\r
487         will be used if the name matches any of the patterns.\r
488         RESTRICTION: the glob-like pattern in the name attribute must have\r
489         a "*" only at the start or the end.\r
490         EXAMPLE:  name="*_i" will match any field ending in _i (like myid_i, z_i)\r
491         Longer patterns will be matched first.  if equal size patterns\r
492         both match, the first appearing in the schema will be used.  -->\r
493    <dynamicField name="*_i"  type="int"    indexed="true"  stored="true"/>\r
494    <dynamicField name="*_s"  type="string"  indexed="true"  stored="true"/>\r
495    <dynamicField name="*_l"  type="long"   indexed="true"  stored="true"/>\r
496    <dynamicField name="*_t"  type="text"    indexed="true"  stored="true"/>\r
497    <dynamicField name="*_b"  type="boolean" indexed="true"  stored="true"/>\r
498    <dynamicField name="*_f"  type="float"  indexed="true"  stored="true"/>\r
499    <dynamicField name="*_d"  type="double" indexed="true"  stored="true"/>\r
500    <dynamicField name="*_dt" type="date"    indexed="true"  stored="true"/>\r
501 \r
502    <!-- some trie-coded dynamic fields for faster range queries -->\r
503    <dynamicField name="*_ti" type="tint"    indexed="true"  stored="true"/>\r
504    <dynamicField name="*_tl" type="tlong"   indexed="true"  stored="true"/>\r
505    <dynamicField name="*_tf" type="tfloat"  indexed="true"  stored="true"/>\r
506    <dynamicField name="*_td" type="tdouble" indexed="true"  stored="true"/>\r
507    <dynamicField name="*_tdt" type="tdate"  indexed="true"  stored="true"/>\r
508 \r
509    <dynamicField name="*_pi"  type="pint"    indexed="true"  stored="true"/>\r
510 \r
511    <dynamicField name="ignored_*" type="ignored" multiValued="true"/>\r
512    <dynamicField name="attr_*" type="textgen" indexed="true" stored="true" multiValued="true"/>\r
513 \r
514    <dynamicField name="random_*" type="random" />\r
515 \r
516    <!-- uncomment the following to ignore any fields that don't already match an existing \r
517         field name or dynamic field, rather than reporting them as an error. \r
518         alternately, change the type="ignored" to some other type e.g. "text" if you want \r
519         unknown fields indexed and/or stored by default --> \r
520    <!--dynamicField name="*" type="ignored" multiValued="true" /-->\r
521    \r
522  </fields>\r
523 \r
524  <!-- Field to use to determine and enforce document uniqueness. \r
525       Unless this field is marked with required="false", it will be a required field\r
526    -->\r
527  <uniqueKey>id</uniqueKey>\r
528 \r
529  <!-- field for the QueryParser to use when an explicit fieldname is absent -->\r
530  <defaultSearchField>text</defaultSearchField>\r
531 \r
532  <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->\r
533  <solrQueryParser defaultOperator="AND"/>\r
534 \r
535   <!-- copyField commands copy one field to another at the time a document\r
536         is added to the index.  It's used either to index the same field differently,\r
537         or to add multiple fields to the same field for easier/faster searching.  -->\r
538 \r
539    <copyField source="id" dest="text"/>\r
540    <copyField source="name" dest="text"/>\r
541    <copyField source="tag" dest="text"/>\r
542 <!--   <copyField source="cat" dest="text"/>\r
543    <copyField source="name" dest="text"/>\r
544    <copyField source="manu" dest="text"/>\r
545    <copyField source="features" dest="text"/>\r
546    <copyField source="includes" dest="text"/>\r
547    <copyField source="manu" dest="manu_exact"/>-->\r
548         \r
549    <!-- Above, multiple source fields are copied to the [text] field. \r
550           Another way to map multiple source fields to the same \r
551           destination field is to use the dynamic field syntax. \r
552           copyField also supports a maxChars to copy setting.  -->\r
553            \r
554    <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->\r
555 \r
556    <!-- copy name to alphaNameSort, a field designed for sorting by name -->\r
557    <!-- <copyField source="name" dest="alphaNameSort"/> -->\r
558  \r
559 \r
560  <!-- Similarity is the scoring routine for each document vs. a query.\r
561       A custom similarity may be specified here, but the default is fine\r
562       for most applications.  -->\r
563  <!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->\r
564  <!-- ... OR ...\r
565       Specify a SimilarityFactory class name implementation\r
566       allowing parameters to be used.\r
567  -->\r
568  <!--\r
569  <similarity class="com.example.solr.CustomSimilarityFactory">\r
570    <str name="paramkey">param value</str>\r
571  </similarity>\r
572  -->\r
573 \r
574 \r
575 </schema>\r