annotate sites/all/modules/custom/solrconnect/solr-conf/solr-4.x/schema.xml @ 0:015d06b10d37 default tip

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